Loading component…
Components /Tap Reveal
Content hidden behind a shimmering pixel field that dissolves cell by cell from the tap point
Run the following command
npx shadcn@latest add https://raw.githubusercontent.com/Ashutoshx7/VengeanceUI/main/public/r/tap-reveal.json| Prop Name | Type | Default | Description |
|---|---|---|---|
| children | ReactNode | - | Content hidden behind the pixel field. |
| label | ReactNode | 'Tap to reveal' | Text in the chip over the sealed field. A string label is also the accessible name. |
| cellSize | number | 8 | Size of one pixel cell in CSS pixels, including its 1px gap. Very large cards use bigger cells so the field stays under 40,000 cells. |
| duration | number | 650 | Length of the dissolve in milliseconds. Values that are not finite fall back to 650. |
| shimmer | boolean | true | Lets a few cells brighten and settle while the field is sealed. |
| revealed | boolean | - | Controlled revealed state. |
| defaultRevealed | boolean | false | Initial revealed state when uncontrolled. |
| onRevealedChange | (revealed: boolean) => void | - | Called when the content is revealed or sealed again. |
| hideable | boolean | true | Shows a button in the corner that seals the content again. |
| hideLabel | string | 'Hide again' | Accessible name of the hide button. |
| contentClassName | string | - | Classes for the wrapper around children, merged with cn. It has p-5 by default. |
| className | string | - | Additional classes for the card, merged with cn. |
Designed and contributed this component to the Vengeance UI catalog.