Rotation

Smooth rotation effect on interaction

$ npx @hritik-sharmaa/repeat-ui add button-rotation
Category
Button
Added
Aug 14, 2025
Version
2.0.0
Packages
None
Flavors
TS · JS · Tailwind · CSS
Live preview
Customize
3s
2px
import ButtonRotation from "@/components/repeat-ui/button-rotation/preview";

<ButtonRotation>Rotate</ButtonRotation>

Installation

  1. Run the command

    Adds the files and installs any packages they need. Works with npm, pnpm, yarn and bun.

    $ npx @hritik-sharmaa/repeat-ui add button-rotation --variant ts-tailwind
  2. Use it

    The files are in components/repeat-ui/button-rotation/.

    import ButtonRotation from "@/components/repeat-ui/button-rotation/preview";
    
    export default function Page() {
      return <ButtonRotation />;
    }

Props

PropTypeDefaultDescriptionOptions
childrenReactNode-The button label.-
size"sm" | "md" | "lg""md"Height, padding and font size. Every Repeat UI button shares this scale.sm | md | lg
colorsstring[]["#00ff88", "#00ccff", "#ff00ff", "#ffaa00"]Colours of the spinning border.-
backgroundstring"#1f2937"Background colour.-
textColorstring"#ffffff"Text colour.-
speednumber3Seconds per turn.-
borderWidthnumber2Border thickness in pixels.-
alwaysOnbooleanfalseSpin all the time, not only on hover.-
onClick(event: MouseEvent) => void-Click event handler.-
classNamestring""Extra classes for the button.-

More button

See all