Introduction
hantui is a library of 243 animated, accessible React components. You don't install it as a package. You copy each component into your codebase and own it from there.
Every component is built with React 19, Tailwind CSS v4 and Motion, and is styled with the same tokens as shadcn/ui. A component you install looks at home in an existing shadcn project, and picks up your colors and radius without extra work.
Principles
- Motion has a job.Animation explains where something came from, confirms an action, or shows a change in state. If it does none of those, it doesn't ship.
- Compositor-first animation. Components animate transform, opacity, filter and clip-path. Size changes use layout animations or the grid-rows technique; only a few rows and panels that must push neighboring content animate their height or width.
- Accessible by default. Full keyboard support, visible focus, correct roles and labels, and a reduced-motion path that replaces movement with simple fades.
- One component, one folder. No global state and no external images. Remote assets are replaced with generated gradients and SVG.
How it works
Each component page has a live preview, its demo code, an install command for the shadcn CLI, the full source for manual installs, and a props table generated from the component's own TypeScript types.
The CLI copies the component into components/ui/<name>/, along with the shared lib/motion.ts tokens it imports, and installs its npm dependencies. Start with Installation, then read Motion to learn the shared vocabulary.
Categories
- Buttons & ActionsPresses, confirmations and micro-interactions.11
- Inputs & FormsFields that format, validate and feel alive.12
- Toggles & SelectionSwitches, tabs, pickers and choice controls.11
- Overlays & FeedbackModals, sheets, menus, tooltips and toasts.10
- NavigationDocks, palettes, menus and wayfinding.10
- Navbars & HeadersSite headers with mega menus, floating islands and scroll-aware bars.16
- Text AnimationsType that scrambles, streams and reveals.11
- Numbers & Data DisplayCounters, charts, rings and stat cards.10
- Cards & LayoutTilt, stack, flip, expand and reorder.13
- Media, Scroll & BackgroundsMarquees, lightboxes and ambient fields.10
- Loaders, AI & WidgetsLoading states and AI-native interfaces.12
- Web3: Wallet & IdentityConnect, identify and track transactions.10
- Web3: DeFi & TradingSwaps, bridges, charts, staking and gas.10
- Marketing Sections & Logo CloudsLogo clouds, pricing, stats and CTAs.21
- Shaders & BackgroundsGPU shaders and canvas scenes: clouds, gradients, fields and an ASCII aquarium.15
- Orbits, Beams & IllustrationsOrbits, beams, globes and graphs.12
- 3D Galleries & CarouselsWebGL and CSS 3D image galleries you can drag, scroll and throw.11
- Physical Surfaces & NavigationMaterial cards and tab bars driven by continuous motion values.3
- Prediction MarketsOdds, trades, order books and leaderboards on simulated data.10
- Usage, Billing & Agent CommerceSpend meters, credit charts, receipts and a wallet agent.5
- HTML in CanvasLive, interactive DOM drawn into a canvas and distorted (experimental).10
- Studio Pieces & Glyph ArtPortfolio heroes, hanging cards, paper and images redrawn as glyphs and dithered pixels.10