View composer
Describe a view and watch it assemble. Reasoning steps appear as they finish, placeholders hold the layout, then each tile fills in. A follow-up reshapes what is there instead of starting over: tiles that stay glide to their new place and their figures run to the new values.
When to use
- Assistants that answer with a screen rather than a paragraph.
- Analytics tools where a question should change the view in place.
When not to use
- A fixed dashboard that never changes; use the metrics dashboard.
Installation
pnpm dlx shadcn@latest add @caliper/view-composer
Adds its 18 files to components/ui/, each with its own stylesheet, and installs their packages. Pro installs with your access token, set up once per project. See Pro access. The first part also adds Caliper UI’s tokens; import them once as in Installation.
API reference
ViewComposer
7 props
Keyboard
- No custom key handling; Tab and the native activation keys do the work.
Accessibility
It exposes img and status semantics, with aria-label, aria-hidden, aria-current and aria-busy kept in step with state. Changes that matter are announced through a live region.
Motion
- State changes animate with the library's shared durations and curves, so its timing matches every other part.
- Under reduced motion each change lands on its end state without movement; nothing is hidden or skipped.
Notes for AI
Give your coding assistant this page as Markdown instead of screenshots: the props, keyboard and examples in one file.
/docs/components/view-composer.mdThe index of every part is at /llms.txt.