Conceal content behind a clickable overlay—perfect for hiding spoilers or sensitive information until the user chooses to reveal it.
<Spoiler>Click to reveal the spoiler!</Spoiler>
Customize the appearance and animation:
<Spoiler overlayColor="gray" fadeDuration={1000}>
Spoiler text with custom settings.
</Spoiler>
Prop | Type | Default | Description |
---|---|---|---|
overlayColor |
string | 'black' |
Color of the overlay covering the content. |
fadeDuration |
number | 500 |
Duration of fade-out effect (ms). |