Installation
Usage
The Data Reveal component follows a compound component pattern for maximum flexibility:- Preview
- Code
Basic example showing how to reveal sensitive data on demand.
Component Structure
The component uses a compound component pattern with four main parts:API Reference
DataReveal
The root component that manages the reveal state and provides context to child components.The child components (Button, Container, Items)
Whether content is revealed by default
Callback function called when reveal state changes
Whether the reveal functionality is disabled
Whether to automatically hide content after reveal
Delay in milliseconds before auto-hiding (when autoHide is true)
RevealButton
The button that triggers the reveal/hide animation.Custom button content (overrides text prop)
Button text when no children provided
Additional CSS classes for the button
RevealContainer
The container that wraps and animates the reveal items.The RevealItem components to animate
Additional CSS classes for the container
RevealItem
Individual items that animate in with staggered timing.Custom item content (overrides content prop)
Text content when no children provided
Animation index for staggered timing (starts from 0)
Additional CSS classes for the item
Examples
With Auto-Hide
Automatically hide revealed content after a delay for enhanced security:With Callback
Track when content is revealed or hidden:Custom Content
Use custom React components instead of text:Features
Smooth Animations - Beautiful staggered animations with configurable timing, blur effects, and smooth transitions for revealing content.
Security Focused - Perfect for displaying sensitive information like API keys, personal data, or confidential details with user consent.