Placeholders shown while assistant responses load.
Use ChatLoader while an assistant response or thread is loading.
import {ChatLoader} from "@heroui-pro/react";
<ChatLoader.Skeleton>
<ChatLoader.SkeletonAvatar /> {/* Optional */}
<ChatLoader.SkeletonBlock>
<ChatLoader.SkeletonLine />
</ChatLoader.SkeletonBlock>
</ChatLoader.Skeleton>;HeroUI follows the BEM methodology to ensure component variants and states are reusable and easy to customize.
The Chat Loader component uses these CSS classes:
.chat-loader__dots: Dots loader.chat-loader__dot: Individual dot.chat-loader__pulse: Pulse loader.chat-loader__spinner: Spinner loader.chat-loader__skeleton: Skeleton layout.chat-loader__skeleton-avatar: Avatar placeholder.chat-loader__skeleton-block: Loading line group.chat-loader__skeleton-line: Individual loading lineSized parts also get a --sm or --lg modifier, such as .chat-loader__dot--sm.
Chat-message-shaped loading skeleton. Without children, it renders an avatar and a block of three lines. Supports native div props.
| Prop | Type | Default | Description |
|---|---|---|---|
label | string | - | Status text announced while the skeleton shows |
size | "sm" | "md" | "lg" | "md" | Avatar and line size |
Composable skeleton primitives used by ChatLoader.Skeleton.
Deprecated loaders; see Deprecated API. Support native span props.
| Prop | Type | Default | Description |
|---|---|---|---|
label | string | - | Screen-reader status text. Omit for a decorative loader |
size | "sm" | "md" | "lg" | "md" | Loader size |
| API | Use instead |
|---|---|
ChatLoader.Dots | Loader with variant="dots" |
ChatLoader.Pulse | Loader with variant="pulse" |
ChatLoader.Spinner | Loader with variant="ring"; size="md" (24px) becomes size="lg" |
The deprecated loaders still render. Keep the same size when you switch, and pass aria-label for a hidden name, since Loader's label is visible. See v1.0.0 for the full migration.
Resources