Code
In context
Install · Free Web Component
One file, no dependencies. Aurora 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 (button or link, every native prop passes through) with TypeScript types and the full source
- Sunset, Mint and Mono tints, plus custom tints from Brand Fit
- The vanilla Web Component with every tint, a demo page, README and license
Attributes & props
| Name | Type | Default | Description |
|---|---|---|---|
| strength | 0..1 | 0.5 | How far the button follows the pointer. 0 turns the pull off and keeps the highlight. |
| radius | number (px) | 90 | Reach of the field, measured from the edge of the button. The pull fades to nothing at this distance. |
| size | number (px) | 52 | Height; the type and the padding scale with it. |
| href | string | — | Makes it a link (an <a> inside). target and rel pass through. |
| type | 'button' | 'submit' | 'reset' | 'button' | For a button inside a form. |
| disabled | boolean | false | No pull, no press, dimmed. A disabled link loses its href. |
| label | string | — | Accessible name when the content is only an icon. |
| theme | 'light' | 'dark' | 'light' | White porcelain or dark. |
| sound | boolean | off | A porcelain tap on press. Also on for everything inside an element with data-ui-sound="on". |
| setPoint(x, y) / release() | methods | — | A virtual pointer, in px from the centre of the button, for demos and guided tours. In React it is the point prop. |
| tint Pro | 'aurora' | 'sunset' | 'mint' | 'mono' | object | 'aurora' | Colours of the pearl fringe round the highlight, the rim and the light under the button, or a custom tint. Free build ships Aurora only. |
The real <button> or <a> is inside the element, so click, Enter and Space, focus and form submission work natively; listen for click as usual. The element itself keeps its place in the layout and only the body inside moves, so nothing around it shifts. Leave free space of about strength × size round the button. The pull is for a mouse or a pen only: on touch screens and with reduced motion the button just sinks when pressed. Every button on a page shares one pointer listener and animates only while it moves. All CSS and a small spring, no WebGL.
More components
- Ink Sphere
- Liquid Metal Button
- Firefly Button
- Pearl Button
- Prism Button
- Tide Slide
- Pearl Code
- Frost Card
- Holo Card
- Stream Text
- Lens Compare
- 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
- Beam Border
- Spotlight Card
- Scratch Reveal
- Glass Sidebar
- Pearl Pagination
- Pearl Breadcrumb
- Glass Dock
- Pearl Slider
- Pearl Segmented
- Mercury Orb
- Prompt Input
- Voice Orb
- Aurora Ring
- Glass Toggle
- Pearl Loader
- Alien Face
- Liquid Carousel
- Orbit Carousel
- Deck Carousel