Colour theme

CtaButton

  • Primitives

  • buttons

One thing to press that asks to be pressed. Button grows only by axes that combine with everything — size, emphasis, pill, intent — and stays small. CtaButton is the umbrella for the buttons a designer means with 'but this one should…': it grows by variants, one look with a name, each owning its effect layers and its CSS. The list is a project's to extend; gradient is the house's first. Same anatomy as Button, same button voice as tokens — a special button may invent effects, never typography.

gradient

A sweep through four semantic stops, all in the blue — indigo, deeper indigo, deep onsen water, the deepest indigo: the YU family's first role — with a sheen along the top edge and the same sweep cast as a shadow toward the viewer. Hover lifts the button and hurries the sweep; prefers-reduced-motion stills both; forced colours draw a border and drop the effects.

astro
---
import CtaLinkButton from "tsugite/CtaButton/CtaLinkButton.astro";
---
{/* The first variant: a sweep through four semantic stops, all in the blue — indigo,
    deeper indigo, deep onsen water, the deepest indigo — a sheen along the top, and the same sweep cast as a shadow toward the viewer.
    Hover lifts it and hurries the sweep; reduced motion stills both. */}
<div style="display: flex; flex-wrap: wrap; gap: var(--size-md); padding-block-end: 2.5em;">
  <CtaLinkButton href="#" size="lg">Click me!</CtaLinkButton>
</div>

Sizes

Button's three sizes: the button voice's stops, Button's padding, the same height as a Button beside it. The effects are multiples of the label's size, so the sheen, the lift and the shadow scale with the words.

astro
---
import CtaLinkButton from "tsugite/CtaButton/CtaLinkButton.astro";
---
{/* Button's three sizes: the button voice's stops and Button's padding. The effects
    are multiples of the label's size, so the sheen and the shadow scale with the words. */}
<div style="display: flex; flex-wrap: wrap; align-items: start; gap: var(--size-md); padding-block-end: 2.5em;">
  <CtaLinkButton href="#" size="sm">Small</CtaLinkButton>
  <CtaLinkButton href="#" size="md">Medium</CtaLinkButton>
  <CtaLinkButton href="#" size="lg">Large</CtaLinkButton>
</div>

Shadow and reflection

Two gates a variant owns, on by default. A caller turns them off where the layout has no room under the button or no light above it; the geometry does not change.

astro
---
import CtaLinkButton from "tsugite/CtaButton/CtaLinkButton.astro";
---
{/* The two effects are gates, on by default. A variant owns its effects; a caller may
    turn them off where the layout has no room under the button, or no light above it. */}
<div style="display: flex; flex-wrap: wrap; gap: var(--size-md); padding-block-end: 2.5em;">
  <CtaLinkButton href="#" size="lg">Both</CtaLinkButton>
  <CtaLinkButton href="#" size="lg" shadow={false}>No shadow</CtaLinkButton>
  <CtaLinkButton href="#" size="lg" reflection={false}>No reflection</CtaLinkButton>
</div>

Link or action, with an icon

Button's shape exactly: one table, the element as the gate, CtaLinkButton and CtaActionButton as front doors. The action can be disabled; the icon sits right of the words unless asked otherwise.

Start free trial
astro
---
import CtaLinkButton from "tsugite/CtaButton/CtaLinkButton.astro";
import CtaActionButton from "tsugite/CtaButton/CtaActionButton.astro";
---
{/* Button's shape: one table, the element as the gate, two front doors. A link goes
    somewhere; an action does something and can be disabled. An icon sits right of the
    words unless asked otherwise. */}
<div style="display: flex; flex-wrap: wrap; gap: var(--size-md); padding-block-end: 2.5em;">
  <CtaLinkButton href="#" icon="icon-panel-left-open">Start free trial</CtaLinkButton>
  <CtaActionButton icon="icon-panel-left-open" icon-position="left">Watch the demo</CtaActionButton>
  <CtaActionButton disabled={true}>Sold out</CtaActionButton>
</div>

Test bench

The CtaButton fixture — both front doors at three sizes, every state, and the effects toggled, mounted unchanged.

CtaButton

One thing to press that asks to be pressed. Button grows by axes that combine with everything; CtaButton grows by variants — one look with a name, its own effects. The first is gradient: a sweep through four semantic stops, a sheen, and the sweep cast as a shadow toward the viewer. Same button voice as Button.

gradient · size sm

resthoveractivefocusdisabled
CtaLinkButtonGet startedGet startedGet startedGet startedGet started
CtaActionButton

gradient · size md

resthoveractivefocusdisabled
CtaLinkButtonGet startedGet startedGet startedGet startedGet started
CtaActionButton

gradient · size lg

resthoveractivefocusdisabled
CtaLinkButtonGet startedGet startedGet startedGet startedGet started
CtaActionButton

shadow and reflection

both (default)Get startedno shadowGet startedno reflectionGet started