Version History
ProNewRelease notes newest first, with the latest marked, long notes cut to three lines with a button to open them, and older versions behind one button.
Installation
pnpm dlx shadcn@latest add @viewport/version-history
First time? Add the @viewport registry to components.json. Setup takes one minute.
Usage
The code behind the preview above comes with Truffle Pro.
Props
| Prop | Type | Default |
|---|---|---|
| releases* | Release[]Releases, newest first. | — |
| initial | numberHow many releases to show before "Show older versions". | 3 |
| className | string | — |
Accessibility
- An ordered list; the latest release is labelled in words.
- Showing older versions moves focus to the first one revealed.
- The more button says which version it opens and reports its state.
- Respects prefers-reduced-motion.