Search...
K

Stagger Button

A button with a stagger animation on hover

Documentation

pnpm dlx @t7blocks/cli add stagger-button

Usage

import { StaggerButton } from "@/components/T7blocks/StaggerButton";

export default function Home() {
  return (
    <div className="min-h-screen flex items-center justify-center bg-white">
      <StaggerButton
          text="Staggering Button"
          href="https://t7blocks.xyz/gallery"
          fontSize="25px"/>
    </div>
  );
}

Properties

PropertyTypeDefaultDescription
textstring"Staggering Button"The text to display on the button
hrefstring"#"The URL the button links to
colorstring"#fafafa"The text color
backgroundColorstring"#303030"The background color of the button
hoverBackgroundInsetstring"0.125em"The inset for the background on hover
fontSizestring"2em"The font size of the text
borderRadiusstring"0.4em"The border radius of the button
offsetIncrementnumber0.01The delay between each character animation
transitionDurationstring"0.6s"The duration of the transition
transitionEasingstring"cubic-bezier(0.625, 0.05, 0, 1)"The easing function for the transition
onClick() => voidundefinedThe click handler function
classNamestring"font-[instrument-serif]"Additional CSS classes for the button

Related resources

Dot Launch Button

Knob Toggle