Overview
Layout shell for bounded previews with consistent header, status, optional tabs, body, and footer regions.
Usage
Props
PreviewPanel supports title, status, leading, actions, tabs, children, footer, and class.
Accessibility
The panel is layout-only for non-error states. status="error" promotes the panel to role="alert" so the error preview state is announced assertively.
status defaults to idle; use loading, ready, warning, error, or empty to describe the preview state without inventing a second status vocabulary. Keep retry, dismiss, or open actions in the actions snippet and leave the last useful preview mounted while a replacement is loading or fails.
Artifact preview
readyPreview content is ready.
When to use
- Framing a generated preview, artifact inspection area, or side-by-side review surface.
- A preview needs consistent header, tabs, body, and footer slots without owning product-specific behavior.
- Communicating an urgent standalone message — use alert.
- You only need generic spacing — use stack.
Examples
Preview panel
A bounded preview with status and footer content.
Props
Name | Type | Default | Description |
|---|---|---|---|
title required | text | Visible panel title. | |
status | 'idle''loading''ready''warning''error''empty' | 'idle' | Status taxonomy for the preview surface. |
leading | Snippet | undefined | Leading visual or control rendered before the title. | |
actions | Snippet | undefined | Action controls rendered in the header. | |
tabs | Snippet | undefined | Tab controls rendered below the header. | |
children required | snippet | Main preview content. | |
footer | Snippet | undefined | Footer content such as metadata or secondary controls. |