---
title: "Quick Start"
description: "Your first skeleton in a minute."
canonical_url: "https://kukson777.github.io/boneprint/docs/getting-started/quick-start"
---
# Quick Start

> Your first skeleton in a minute.

<note>

The examples use Nuxt's `useFetch`. In Vue, pass a TanStack Query result to `:of` instead, as shown in [Vue + Vite](https://kukson777.github.io/boneprint/docs/getting-started/vue#loading-the-data).

</note>

<steps>

### Load the data on the client

A skeleton is only needed while the data isn't there yet, so the request shouldn't hold up the server:

```ts
const posts = useFetch<Post[]>('/api/posts', { lazy: true, server: false })
```

### Describe a sample

The sample mirrors the shape of the response, with text of about the real length. It draws the shape on the first visit:

```ts
const sample: Post[] = [{ id: 1, title: 'A title of about this length' }]
```

### Wrap your markup

```vue
<Skeleton :of="posts" :sample>
  <template #default="{ data }">
    <PostCard v-for="post in data" :key="post.id" :post />
  </template>
</Skeleton>
```

</steps>

`data` in the slot is typed from `useFetch`, so a typo in a field is a compile error.

## The result

A real request to [DummyJSON](https://dummyjson.com), delayed by 1.2 seconds:

<code-preview>
<quick-start-demo>



</quick-start-demo>

<template v-slot:code="">

```vue
<script setup lang="ts">
const posts = useFetch<Posts>('https://dummyjson.com/posts?limit=3&delay=1200', {
  lazy: true,
  server: false,
})

const sample: Posts = {
  posts: [{ id: 1, title: 'A post title of about this length', reactions: { likes: 100 } }],
}
</script>

<template>
  <Skeleton :of="posts" :sample>
    <template #default="{ data }">
      <ul>
        <li v-for="post in data.posts" :key="post.id">
          {{ post.title }}

          <UBadge :label="`${post.reactions.likes} likes`" />
        </li>
      </ul>
    </template>
  </Skeleton>
</template>
```

</template>
</code-preview>


## Sitemap

See the full [sitemap](https://kukson777.github.io/boneprint/sitemap.md) for all pages.
