Spoiler
Long text, clamped to a few lines, with an honest way out. No fade tricks hiding the rest.
Example
Plot twist the first: the butler refactored the codebase at midnight, and every test passed on the first run. Plot twist the second: the code review found nothing to complain about. Plot twist the third: it shipped on a Friday and the weekend stayed quiet.
<Spoiler lines={3}>
<p>Plot twist the first...</p>
</Spoiler>Props
| Prop | Type | Default | Description |
|---|---|---|---|
lines | number | 3 | Visible lines when closed. |
showLabel / hideLabel | string | Show more / Show less | Toggle text. |
Accessibility
- Toggle is a button with
aria-expanded. - Full text stays in the DOM: screen readers can reach it either way.