Skip to content

Latest commit

 

History

History
21 lines (16 loc) · 721 Bytes

ClickDisappear.md

File metadata and controls

21 lines (16 loc) · 721 Bytes

ClickDisappear

A component that, when clicked, disappears. Note that while the content will not be visible (technically, it will have no opacity), it will still exist within the document and take up space within the flow of the page.

Example

<ClickDisappear
  className="test"
  fadeOutDuration={500}
>
  {/* children */}
  I slowly fade out from full opacity.
</ClickDisappear>

Property arguments

  • children (ReactNode): The content that will initially appear at full opacity.
  • fadeOutDuration (number): The number of milliseconds the fade-out will take to complete.
  • className (string, optional): An optional, extra class that will be passed on to the rendered container element.