243 React components with motion, keyboard support and a reduced-motion fallback. Copy the source or install with the shadcn CLI.
npx shadcn@latest add https://hantui-theta.vercel.app/r/lens-tab-bar.jsonFind yours.
22 categories, from buttons to WebGL backgrounds. Hover one to see its first component.
- Buttons & Actions11
- Inputs & Forms12
- Toggles & Selection11
- Overlays & Feedback10
- Navigation10
- Navbars & Headers16
- Text Animations11
- Numbers & Data Display10
- Cards & Layout13
- Media, Scroll & Backgrounds10
- Loaders, AI & Widgets12
- Web3: Wallet & Identity10
- Web3: DeFi & Trading10
- Marketing Sections & Logo Clouds21
- Shaders & Backgrounds15
- Orbits, Beams & Illustrations12
- 3D Galleries & Carousels11
- Physical Surfaces & Navigation3
- Prediction Markets10
- Usage, Billing & Agent Commerce5
- HTML in Canvas10
- Studio Pieces & Glyph Art10
Anatomy of a component.
Every component ships with keyboard support, a visible focus ring, a reduced-motion fallback and tokens that follow your theme. Flip the switches and watch this one change.
Press and hold, or hold Space
Files
- components/ui/hold-to-confirm-button/
- hold-to-confirm-button.tsx
- demo.tsx
- docs.ts
"use client";
import { useEffect, useId, useRef, useState, type ComponentProps, type ReactNode } from "react";
import {
AnimatePresence,
animate,
motion,
useMotionValue,
useReducedMotion,
useTransform,
type AnimationPlaybackControls,
} from "motion/react";
import { Check } from "lucide-react";
import { cn } from "@/lib/utils";
import { duration as durations, ease, spring } from "@/lib/motion";
export interface HoldToConfirmButtonProps
extends Omit<ComponentProps<"button">, "onAnimationStart" | "onDrag" | "onDragStart" | "onDragEnd"> {
/** Called once the hold completes. */
onConfirm?: () => void;
/** Milliseconds the button must be held. @default 1500 */
duration?: number;
/** Label shown after confirming. @default "Confirmed" */
confirmedLabel?: ReactNode;
/** Milliseconds before resetting after a confirm. 0 keeps it confirmed. @default 2000 */
resetAfter?: number;Install it.
With the shadcn CLI
One command adds the component, its dependencies and the shared helpers to your project.
npx shadcn@latest add https://hantui-theta.vercel.app/r/hold-to-confirm-button.jsonBy copying the source
- Open a component and switch to its Code tab.
- Copy the file into components/ui in your project.
- Install the packages listed under Manual on the same page.