Spec Inspector
ProNewInteractive visual spacing and design-token inspector that highlights nested layers with animated dimension guides.
Installation
pnpm dlx shadcn@latest add @viewport/spec-inspector
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 |
|---|---|---|
| targets* | SpecTarget[]Inspectable elements with their design token measurements. | — |
| className | string | — |
Accessibility
- Each inspectable layer is a focusable button with aria-pressed state.
- Hover, click, and keyboard focus all move the active inspection frame.
- Frame gliding snaps directly under reduced motion.