> For AI agents: the complete documentation index is at [llms.txt](https://reflex.dev/docs/llms.txt). Markdown versions are available by appending `.md` or sending `Accept: text/markdown`.

---
description: Skeleton, a loading placeholder component for content that is not yet available.
components:
  - rx.skeleton
---

```python exec
import reflex as rx
```

# Skeleton (loading placeholder)

`Skeleton` is a loading placeholder component that serves as a visual placeholder while content is loading.
It is useful for maintaining the layout's structure and providing users with a sense of progression while awaiting the final content.

```python demo
(
    rx.vstack(
        rx.skeleton(rx.button("button-small"), height="10px"),
        rx.skeleton(rx.button("button-big"), height="20px"),
        rx.skeleton(
            rx.text("Text is loaded."),
            loading=True,
        ),
        rx.skeleton(
            rx.text("Text is already loaded."),
            loading=False,
        ),
    ),
)
```

When using `Skeleton` with text, wrap the text itself instead of the parent element to have a placeholder of the same size.

Use the loading prop to control whether the skeleton or its children are displayed. Skeleton preserves the dimensions of children when they are hidden and disables interactive elements.

## API Reference

### rx.skeleton

Skeleton component.

#### Props

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `loading` | bool | - | If set, show an rx.spinner instead of the component children. |
| `width` | str, Breakpoints[str, str] | - | The width of the skeleton. |
| `min_width` | str, Breakpoints[str, str] | - | The minimum width of the skeleton. |
| `max_width` | str, Breakpoints[str, str] | - | The maximum width of the skeleton. |
| `height` | str, Breakpoints[str, str] | - | The height of the skeleton. |
| `min_height` | str, Breakpoints[str, str] | - | The minimum height of the skeleton. |
| `max_height` | str, Breakpoints[str, str] | - | The maximum height of the skeleton. |

#### Event Triggers

Base event triggers: https://reflex.dev/docs/api-reference/event-triggers/
