Code
In context
Install · Free Web Component
One file, no dependencies. Ice preset, every other option included. Host it yourself so your visitors never load anything from our servers.
The shadcn command adds a typed React wrapper for you. Using the file directly? Custom elements work in React as-is; for type checking add:
Pro · React + TypeScript Pro
One payment of $4.99, yours forever. Use it in unlimited personal and commercial projects; no resale.
- React component with TypeScript types and a ref-free API
- Mist and Smoke frosts, plus custom frost objects (tint, sheen, grain colour)
- The vanilla Web Component with every frost, a demo page, README and license
Attributes & props
| Name | Type | Default | Description |
|---|---|---|---|
| sound | boolean | off | Plays a short synthesised frost scrape (and a tap of vibration on phones) when used. Also on for everything inside an element with data-ui-sound="on". |
| width | number (px) | 360 | Card width; the height follows the ratio. |
| ratio | number | 1.586 | Width / height. 1.586 is a bank card. |
| brush | number (px) | 46 | Radius of the clear patch the pointer leaves. |
| regrow | number (s) | 4 | How long a cleared patch takes to frost over. 0 keeps it clear. |
| blur | number (px) | 12 | How thick the frost is. |
| radius | number (px) | 22 | Corner radius. |
| hint | string | 'Wipe to reveal' | Line shown until the first touch. Empty hides it. |
| theme | 'light' | 'dark' | 'light' | Shadow colour for light or dark pages. |
| tint Pro | 'ice' | 'mist' | 'smoke' | 'ice' | Frost colour. Free build ships Ice only. |
The frost is a real blur of your content, so whatever you put inside shows through as colour and shape, never as readable text. The clear trail is a small mask that the pointer erases and time fills back in, grain first, so it closes up like ice rather than fading. Keyboard users get the content by focusing the card (it frosts again on blur); with touch, wipe sideways — vertical swipes still scroll the page. Screen readers read the content as normal: the frost is visual, not a lock, so don't rely on it to protect a secret.
More components
- Holo Card
- Lens Compare
- Beam Border
- Spotlight Card
- Scratch Reveal
- Tide Slide
- Pearl Code
- Ink Sphere
- Stream Text
- Pearl Dial
- Nova Rating
- Pearl Check
- Pearl Input
- Glass Toast
- Pearl Select
- Glass Sheet
- Pearl Accordion
- Glass Tip
- Pearl Calendar
- Glass Nav
- Pearl Tabs
- Glass Command
- Halo Avatar
- Pearl Steps
- Pearl Skeleton
- Pearl Table
- Pearl Chip
- Pearl Empty
- Roll Counter
- Glass Marquee
- Reveal Text
- Mesh Gradient
- Silk Waves
- Dot Field
- Plasma Orb
- Voice Wave
- Plush Buddy
- Gummy Agent
- Glass Tabbar
- Glass Menu
- Pearl Pricing
- Glass Bento
- Quote Wall
- Glass Cta
- Magnet Button
- Glass Sidebar
- Pearl Pagination
- Pearl Breadcrumb
- Glass Dock
- Pearl Slider
- Pearl Segmented
- Liquid Metal Button
- Mercury Orb
- Prompt Input
- Voice Orb
- Aurora Ring
- Glass Toggle
- Firefly Button
- Pearl Button
- Pearl Loader
- Alien Face
- Prism Button
- Liquid Carousel
- Orbit Carousel
- Deck Carousel