Shiny Button
atlas-ui/shiny-buttonFreeComponent
A shiny button with a sleek animation effect.
Live preview
live · rendered by the registry
Rendered by atlas-ui on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://atlasui.dev/r/shiny-button.jsonSource
1"use client";23import { ButtonHTMLAttributes } from "react";45import { MotionProps, motion } from "motion/react";67import { cn } from "@/lib/utils";89type MergedProps = Omit<10 ButtonHTMLAttributes<HTMLButtonElement>,11 keyof MotionProps12> &13 MotionProps;1415interface ShinyButtonProps extends MergedProps {16 children: React.ReactNode;17 className?: string;18}1920export const ShinyButton = ({21 children,22 className,23 ...props24}: ShinyButtonProps) => {25 return (26 <motion.button27 className={cn("radial-gradient relative rounded-md px-6 py-2", className)}28 initial={{ "--x": "100%", scale: 1 }}29 animate={{ "--x": "-100%" }}30 whileTap={{ scale: 0.97 }}31 transition={{32 repeat: Infinity,33 repeatType: "loop",34 repeatDelay: 1,35 type: "spring",36 stiffness: 20,37 damping: 15,38 mass: 2,39 scale: {40 type: "spring",41 stiffness: 10,42 damping: 5,43 mass: 0.1,44 },45 }}46 {...props}47 >48 <span className="linear-mask relative block h-full w-full font-light tracking-wide text-neutral-100">49 {children}50 </span>51 <span className="linear-overlay absolute inset-0 block rounded-md p-px" />52 </motion.button>53 );54};
What it pulls in
npm packages
Other registry items
Files it writes
More from atlas-ui
All 99 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Animated Mobile Navbaranimated-mobile-navbar | atlas-ui | Components | Free | 2 deps | |
| Blend Mouse Trailerblend-mouse-trailer | atlas-ui | Components | Free | 1 dep | |
| Blob Mouse Trailerblob-mouse-trailer | atlas-ui | Components | Free | 1 dep | |
| Box Revealbox-reveal | atlas-ui | Components | Free | 1 dep | |
| Cascade Textcascade-text | atlas-ui | Components | Free | 1 dep | |
| Dot And Circle Mouse Trailerdot-and-circle-mouse-trailer | atlas-ui | Components | Free | 1 dep | |
| Fancy Theme Togglefancy-theme-toggle | atlas-ui | Components | Free | 1 dep | |
| Hacker Texthacker-text | atlas-ui | Components | Free | no deps |
