Typographytypographyshimmerglass
Glass Text Shimmer
Text that transitions from blurred to crisp.
Live Preview
Glass Text Shimmer
Usage
Copy and paste this code into your React component:
tsx
import { GlassTextReveal } from 'react-component-kit-ui/typography';
<GlassTextReveal>Content</GlassTextReveal>Manual Installation
If you are not using the npm package, create a new file and paste the following code: src/components/GlassTextReveal.tsx + GlassTextReveal.css:
GlassTextReveal.tsx
'use client';
import type { ReactNode } from 'react';
import './GlassTextReveal.css';
/** GlassTextReveal โ ported from astro-component-kit. */
export interface GlassTextRevealProps {
children?: ReactNode;
}
export function GlassTextReveal({ children }: GlassTextRevealProps) {
return (
<>
<h3 className="shimmer-txt" data-rk-ca8ede="">{children}</h3>
</>
);
}
export default GlassTextReveal;GlassTextReveal.css
/* GlassTextReveal โ ported from astro-component-kit (typography/GlassTextReveal.astro) */
.shimmer-txt:where([data-rk-ca8ede]) { font-size: 2rem; color: rgba(255,255,255,0.2); background: linear-gradient(90deg, transparent, #fff, transparent); background-size: 200% 100%; -webkit-background-clip: text; animation: glass-text-reveal-shimmer-anim 3s infinite linear; margin: 0; font-weight: 800; }
@keyframes glass-text-reveal-shimmer-anim { 0% { background-position: -100% 0; } 100% { background-position: 100% 0; } }Quick Info
- Category
- Typography
- Filename
GlassTextReveal.tsx- Dependencies
- None โ pure React + CSS
- Tags
- typographyshimmerglass