Back to UI

Pro Button

A call-to-action button with an animated pixel arrow, in four sizes and any colour.

Updated Added Changelog

motion

Preview

Installation

pnpm dlx shadcn@latest add @satoriui/pro-button

Adds components/satori-ui/pro-button.tsx to your project and installs its dependencies.

Usage

app/page.tsx
import ProButton from "@/components/satori-ui/pro-button";
export default function Example() {
return (
<ProButton>Upgrade to Pro</ProButton>
);
}

Examples

In a pricing card

The call to action of a plan. Add data-pro-button-group to the card, and hovering anywhere on it stops the arrow, turns the pixels into a smile and runs a shimmer across the label.

Team

$24 / seat / month

  • Unlimited projects
  • Shared design tokens
  • Priority support

Sizes and colours

Small (36px), medium (48px, the default) and large (60px), each in a different colour. There is also xs (28px) for dense rows. A size sets the height, radius, text and pixel box together.

Props

children

The label.

TypeReactNode
color

Colour of the pixel box beside the label, as any CSS colour, including a theme variable such as var(--primary). The box shades it a little darker towards the bottom.

TypestringDefault"#007bff"
pixelColor

Colour of the lit pixels in the arrow. Unlit pixels show it faintly.

TypestringDefault"#ffffff"
size

Size step: 28, 36, 48 or 60px tall. Each sets the height, radius, text and pixel box together.

Type"xs""sm""md""lg"Default"md"
reducedMotion

"user" follows a surrounding MotionConfig, then the visitor's reduce-motion setting. "always" and "never" force the calm or the full version.

Type"user""always""never"Default"user"

Also takes every <button> prop, such as className, style and event handlers.

Reduced motion

Pro Button follows the visitor's “reduce motion” device setting on its own: movement, blur and looping effects stop, and fades stay. Use the Reduced motion button on the preview to see that version. To decide yourself, set the reducedMotion prop on one instance, or wrap a whole section or app in Motion's MotionConfig.

app/page.tsx
// Follows the visitor's device setting (the default, "user")
<ProButton>…</ProButton>
// Always the calm version, or always full motion
<ProButton reducedMotion="always">…</ProButton>
<ProButton reducedMotion="never">…</ProButton>
// Or for everything inside, with Motion's MotionConfig
import { MotionConfig } from "motion/react";
<MotionConfig reducedMotion="always">
<ProButton>…</ProButton>
</MotionConfig>