Skip to Content

Sphere Button

Round planetary call to action button lit by a radial highlight and crescent inset shadows, in teal, blue and coral. A void variant opens a dark center on hover, and labels use the display typeface.

Installation

pnpm dlx shadcn@latest add @01orbital/sphere-button

Usage

import { SphereButton } from "@/components/sphere-button/sphere-button"

// Every word on the page. Change copy here, not in the markup.
const COPY = {
  cta: "Explore",
  enter: "Enter",
} as const

export default function SphereButtonDemo() {
  return (
    <div className="grid w-full flex-wrap place-items-center gap-10 p-6">
      <SphereButton>{COPY.cta}</SphereButton>
      <SphereButton variant="void" size="lg">
        {COPY.enter}
      </SphereButton>
    </div>
  )
}

This example installs with everything it uses:

pnpm dlx shadcn@latest add @01orbital/sphere-button-demo

Examples

Newsletter Readersphere-button-newsletter-reader

Example of the Sphere Button in coral on a newsletter issue card, where pressing it opens the letter in a dialog reader.

pnpm dlx shadcn@latest add @01orbital/sphere-button-newsletter-reader

Rover Puzzlesphere-button-rover-puzzle

Example of the Sphere Button in its void variant on a game title card that starts, and later restarts, a two-choice rover puzzle.

pnpm dlx shadcn@latest add @01orbital/sphere-button-rover-puzzle

Start Smallsphere-button-start-small

Example of the Sphere Button at a small size: a teal planetary button on a pale canvas with an offset caption and a popover note.

pnpm dlx shadcn@latest add @01orbital/sphere-button-start-small

Into The Voidsphere-button-into-the-void

Example of the Sphere Button: a large coral void button with woven paint, centered on plum-black grain, with a popover note.

pnpm dlx shadcn@latest add @01orbital/sphere-button-into-the-void

Ambersphere-button-amber

Sphere Button example: bright gold spheres with dark pill labels on an ink ground, a solid one that lifts beside a void one that opens on hover. Use it to pick a warm call to action on dark.

pnpm dlx shadcn@latest add @01orbital/sphere-button-amber

App Downloadsphere-button-app-download

Sphere Button App Download: an example of sphere-button.

pnpm dlx shadcn@latest add @01orbital/sphere-button-app-download

Checkout Paysphere-button-checkout-pay

Sphere Button Checkout Pay: an example of sphere-button.

pnpm dlx shadcn@latest add @01orbital/sphere-button-checkout-pay

Cloud Dancer Rosesphere-button-cloud-dancer-rose

Sphere Button Cloud Dancer Rose: an example of sphere-button.

pnpm dlx shadcn@latest add @01orbital/sphere-button-cloud-dancer-rose

Cobaltsphere-button-cobalt

Sphere Button Cobalt: an example of sphere-button.

pnpm dlx shadcn@latest add @01orbital/sphere-button-cobalt

Collection Choicesphere-button-collection-choice

Sphere Button Collection Choice: an example of sphere-button.

pnpm dlx shadcn@latest add @01orbital/sphere-button-collection-choice

Detail Disclosuresphere-button-detail-disclosure

Sphere Button Detail Disclosure: an example of sphere-button.

pnpm dlx shadcn@latest add @01orbital/sphere-button-detail-disclosure

Empty Statesphere-button-empty-state

Sphere Button Empty State: an example of sphere-button.

pnpm dlx shadcn@latest add @01orbital/sphere-button-empty-state

Event Rsvpsphere-button-event-rsvp

Sphere Button Event Rsvp: an example of sphere-button.

pnpm dlx shadcn@latest add @01orbital/sphere-button-event-rsvp

Glaciersphere-button-glacier

Sphere Button Glacier: an example of sphere-button.

pnpm dlx shadcn@latest add @01orbital/sphere-button-glacier

Light Noirsphere-button-light-noir

Sphere Button Light Noir: an example of sphere-button.

pnpm dlx shadcn@latest add @01orbital/sphere-button-light-noir

Mintsphere-button-mint

Sphere Button example: mint green spheres on an ink ground, one solid and lifting, one void and opening, both in the same clean green family. Use it to pick a green call to action on dark.

pnpm dlx shadcn@latest add @01orbital/sphere-button-mint

Monotone Graphitesphere-button-monotone-graphite

Sphere Button Monotone Graphite: an example of sphere-button.

pnpm dlx shadcn@latest add @01orbital/sphere-button-monotone-graphite

Monotone Silversphere-button-monotone-silver

Sphere Button Monotone Silver: an example of sphere-button.

pnpm dlx shadcn@latest add @01orbital/sphere-button-monotone-silver

Onboarding Startsphere-button-onboarding-start

Sphere Button Onboarding Start: an example of sphere-button.

pnpm dlx shadcn@latest add @01orbital/sphere-button-onboarding-start

Original Pairsphere-button-original-pair

Sphere Button Original Pair: an example of sphere-button.

pnpm dlx shadcn@latest add @01orbital/sphere-button-original-pair

Small Invitationsphere-button-small-invitation

Sphere Button Small Invitation: an example of sphere-button.

pnpm dlx shadcn@latest add @01orbital/sphere-button-small-invitation

Upgrade Cardsphere-button-upgrade-card

Sphere Button Upgrade Card: an example of sphere-button.

pnpm dlx shadcn@latest add @01orbital/sphere-button-upgrade-card

Violetsphere-button-violet

Sphere Button Violet: an example of sphere-button.

pnpm dlx shadcn@latest add @01orbital/sphere-button-violet

Voidsphere-button-void

Example of the Sphere Button in its void variant at the large size: a textured coral sphere whose dark center opens on hover or focus.

pnpm dlx shadcn@latest add @01orbital/sphere-button-void

Waitlist Joinsphere-button-waitlist-join

Sphere Button Waitlist Join: an example of sphere-button.

pnpm dlx shadcn@latest add @01orbital/sphere-button-waitlist-join

Webinar Registersphere-button-webinar-register

Sphere Button Webinar Register: an example of sphere-button.

pnpm dlx shadcn@latest add @01orbital/sphere-button-webinar-register

API reference

A round call-to-action button painted as a lit planet, with its label in the display face. It renders a <button> with type="button" unless you pass another type. Pass render to use another element, such as a link: <SphereButton render={<a href="/pricing" />}>See pricing</SphereButton>. A link keeps its own semantics and focus, and gets the same hover and keyboard-focus effects.

variant sets the paint: default is teal, then blue and coral. These three grow by 5% on hover and keyboard focus, and their shadow deepens on hover. void rests as coral, and on hover or keyboard focus a dark circle opens from its center. size sets the diameter: sm 96px, md 128px (the default) or lg 160px. The label is always light, whatever the theme. With reduced motion on, nothing grows and the void opens at once.

Prop

Type

It also accepts the props of the Base UI part it wraps, and the HTML attributes of the element it renders.

Dependencies

npm: @base-ui/react, class-variance-authority, cn. The CLI installs them for you.

Last updated on