---
title: "Skeleton"
description: "Props, slots and events of the component."
canonical_url: "https://kukson777.github.io/boneprint/docs/api/skeleton"
---
# Skeleton

> Props, slots and events of the component.

## Props

<table>
<thead>
  <tr>
    <th>
      Prop
    </th>
    
    <th>
      Purpose
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        of
      </code>
    </td>
    
    <td>
      the result of <code>
        useFetch
      </code>
      
      , <code>
        useAsyncData
      </code>
      
       or <code>
        useQuery
      </code>
      
      : anything with <code>
        data
      </code>
      
      , <code>
        status
      </code>
      
       and <code>
        error
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        data
      </code>
      
      , <code>
        loading
      </code>
      
      , <code>
        empty
      </code>
      
      , <code>
        error
      </code>
    </td>
    
    <td>
      set by hand, instead of or on top of <code>
        of
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        sample
      </code>
    </td>
    
    <td>
      sample data that draws the shape
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        id
      </code>
    </td>
    
    <td>
      key for the remembered shape; defaults to the page plus the order skeletons appear on it
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        label
      </code>
    </td>
    
    <td>
      read to screen readers while loading
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        persist
      </code>
    </td>
    
    <td>
      whether to remember the shape between visits; defaults to the module option
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        reveal
      </code>
    </td>
    
    <td>
      <code>
        fade
      </code>
      
      , <code>
        sequence
      </code>
      
       or <code>
        sweep
      </code>
      
      ; defaults to the module option
    </td>
  </tr>
</tbody>
</table>

## Slots

<table>
<thead>
  <tr>
    <th>
      Slot
    </th>
    
    <th>
      Props
    </th>
    
    <th>
      Shown for
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      default
    </td>
    
    <td>
      <code>
        { data }
      </code>
    </td>
    
    <td>
      content and the skeleton
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        skeleton
      </code>
    </td>
    
    <td>
      none
    </td>
    
    <td>
      instead of the measured skeleton
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        empty
      </code>
    </td>
    
    <td>
      none
    </td>
    
    <td>
      an empty response
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        error
      </code>
    </td>
    
    <td>
      <code>
        { error }
      </code>
    </td>
    
    <td>
      an error
    </td>
  </tr>
</tbody>
</table>

## Events

`reveal` fires when content has replaced the skeleton.

## SkeletonBox

One placeholder box in the same style as the measured bones.

<table>
<thead>
  <tr>
    <th>
      Prop
    </th>
    
    <th>
      Default
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        width
      </code>
    </td>
    
    <td>
      <code>
        60%
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        height
      </code>
    </td>
    
    <td>
      <code>
        1em
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        radius
      </code>
    </td>
    
    <td>
      <code>
        --skeleton-radius
      </code>
    </td>
  </tr>
</tbody>
</table>

## SkeletonSuspense

A Suspense boundary with a measured fallback. Takes the suspending component in the default slot, sample markup in `#skeleton`, and a `label`. It fires `reveal` when the component has resolved.


## Sitemap

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