Skip to content

Files

Latest commit

 

History

History

Spoiler

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Spoiler Component

Conceal content behind a clickable overlay—perfect for hiding spoilers or sensitive information until the user chooses to reveal it.

Usage

<Spoiler>Click to reveal the spoiler!</Spoiler>

Customization

Customize the appearance and animation:

<Spoiler overlayColor="gray" fadeDuration={1000}>
  Spoiler text with custom settings.
</Spoiler>

Props

Prop Type Default Description
overlayColor string 'black' Color of the overlay covering the content.
fadeDuration number 500 Duration of fade-out effect (ms).