UNPKG

reactbits-mcp-server

Version:

MCP Server for React Bits - Access 99+ React components with animations, backgrounds, and UI elements

31 lines (26 loc) 646 B
import './GlitchText.css'; const GlitchText = ({ children, speed = 1, enableShadows = true, enableOnHover = true, className = '', }) => { const inlineStyles = { '--after-duration': `${speed * 3}s`, '--before-duration': `${speed * 2}s`, '--after-shadow': enableShadows ? '-5px 0 red' : 'none', '--before-shadow': enableShadows ? '5px 0 cyan' : 'none', }; const hoverClass = enableOnHover ? 'enable-on-hover' : ''; return ( <div className={`glitch ${hoverClass} ${className}`} style={inlineStyles} data-text={children} > {children} </div> ); }; export default GlitchText;