IFFDAYIFFDAYDesign
Film and community

Spoiler

Content with spoilers, hidden until the reader asks for it.

import { Spoiler } from '@iffday/web/src/components';

Example

With spoiler set, the content is replaced by a button, Contains spoilers. Reveal, and appears once clicked; without it the content shows straight away. The text is already in the page and only waits to render. When the text has to be fetched, open it the way ShortReview does.

Props

PropTypeDefault
spoiler*boolean
children*ReactNode

Not used directly in apps/web yet.