Aperture Preview
ProNewStep through eight apertures and see the depth of field change in a live viewfinder.
Installation
pnpm dlx shadcn@latest add @viewport/aperture-preview
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 |
|---|---|---|
| image* | stringURL of the photograph to preview. | — |
| alt* | stringAlternative text describing the photograph. | — |
| onChange | (fStop: number) => voidCalled with the selected f-number. | — |
| className | string | — |
Accessibility
- A native range selects a labeled f-stop. Reduced motion makes each aperture change immediate.