Button
unlumen-ui/buttonFreeComponent
A simple button that animates on hover and tap.
Live preview
live · rendered by the registry
Rendered by Unlumen Ui on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://ui.unlumen.com/r/button.jsonSource
1"use client";23import * as React from "react";4import { motion, type HTMLMotionProps } from "motion/react";56import { Slot, type WithAsChild } from "@/components/unlumen-ui/primitives/slot";78type ButtonProps = WithAsChild<9 HTMLMotionProps<"button"> & {10 hoverScale?: number;11 tapScale?: number;12 }13>;1415function Button({16 hoverScale = 1.05,17 tapScale = 0.95,18 asChild = false,19 ...props20}: ButtonProps) {21 const Component = asChild ? Slot : motion.button;2223 return (24 <Component25 whileTap={{ scale: tapScale }}26 whileHover={{ scale: hoverScale }}27 {...props}28 />29 );30}3132export { Button, type ButtonProps };
What it pulls in
npm packages
Other registry items
Files it writes
More from Unlumen Ui
All 225 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| AI Chatai-chat | Unlumen Ui | Components | Paid | 2 deps | |
| Vercel Animate Countanimate-count | Unlumen Ui | Components | Free | 1 dep | |
| Animate Digitsanimate-digits | Unlumen Ui | Components | Free | 1 dep | |
| Animate Text Input Typinganimate-text-input-typing | Unlumen Ui | Components | Free | 1 dep | |
| Animated Listanimated-list | Unlumen Ui | Components | Free | 1 dep | |
| Apple Switchapple-switch | Unlumen Ui | Components | Free | 1 dep | |
| Aurora Barsaurora-bars | Unlumen Ui | Components | Free | 1 dep | |
| Aurora Bluraurora-blur | Unlumen Ui | Components | Free | 2 deps |
