Skip to content

Components

Button

A pill button, filled with its colour by default. Glass and outline are the quieter weights for secondary actions.

Preview

Variants

Pick a variant with the controls. The preview and both code blocks follow.

Variant
Tone
Size
Icon
Disabled
Variant.tsx
<AppButton glyph="compass">Explore</AppButton>

Implementation

The React tab is this site's own component, the same source that draws the preview, styled by the CSS below it. The Flutter tab is the Dart a screen builds it with, from the app's tokens.

Usage
<AppButton glyph="compass" tone="deep-space">Explore</AppButton><AppButton tone="sodium-airglow" variant="outline">Details</AppButton>
app-icons.tsx · AppButton
/** Button. Filled is the default; glass and outline are quieter. */export function AppButton({  glyph,  tone = "deep-space",  variant = "filled",  size,  disabled,  children,}: {  glyph?: GlyphName;  tone?: TileTone;  variant?: ButtonVariant;  size?: "sm";  disabled?: boolean;  children: string;}) {  const cls = ["app-ui app-button", variant !== "filled" && `is-${variant}`, size && `is-${size}`].filter(Boolean).join(" ");  return (    <button type="button" className={cls} style={{ ["--tone" as string]: toneVar(tone) }} disabled={disabled}>      {glyph && <Glyph name={glyph} />}      {children}    </button>  );}
app-ui.css
.app-button {  --tone: var(--color-deep-space-200);  position: relative;  display: inline-flex;  align-items: center;  justify-content: center;  gap: var(--spacing-f8);  height: var(--spacing-f55);  padding: 0 var(--spacing-f21);  border-radius: var(--radius-full);  border: var(--spacing-f1) solid color-mix(in srgb, var(--c-text) var(--mag-3), var(--tone));  background: linear-gradient(180deg, color-mix(in srgb, var(--c-text) var(--mag-3), var(--tone)), var(--tone));  color: var(--c-ink);  font-family: inherit;  font-size: var(--text-s0);  line-height: 1;  font-weight: 700;  cursor: pointer;  box-shadow: var(--highlight), 0 var(--spacing-f8) var(--spacing-f21) calc(var(--spacing-f8) * -1) var(--tone);  transition: transform 0.4s cubic-bezier(0.215, 0.61, 0.355, 1), box-shadow 0.4s;}.app-button svg { width: var(--spacing-f21); height: var(--spacing-f21); fill: currentColor; }.app-button:hover { transform: translateY(calc(var(--spacing-f2) * -1)); box-shadow: var(--highlight), 0 var(--spacing-f13) var(--spacing-f21) calc(var(--spacing-f5) * -1) var(--tone); }.app-button.is-glass {  background: linear-gradient(180deg, color-mix(in srgb, var(--tone) var(--mag-3), var(--c-ink)), color-mix(in srgb, var(--tone) var(--mag-5), var(--c-ink)));  border-color: color-mix(in srgb, var(--tone) var(--mag-2), transparent);  color: var(--c-text);  font-weight: 500;}.app-button.is-outline { background: transparent; border-color: var(--tone); color: var(--tone); box-shadow: none; font-weight: 500; }.app-button.is-sm { height: var(--spacing-f34); padding: 0 var(--spacing-f13); font-size: var(--text-s-1); }

API reference

React propFlutter parameterTypeDefaultMeaning
childrenlabelstringrequiredThe text.
glyphiconGlyphName / IconDatanoneLeading glyph.
tonetoneAstrTonedeep-spaceAccent colour.
variantvariantfilled, glass, outlinefilledVisual weight.
sizecompactsm / boolean55 tall55 is the touch target; sm is 34.
disabledonPressed: nullbooleanfalseNot interactive.

Design tokens

Every value on this component is a system token. The last column is what the app widget uses today, so the gap to close is visible.

RoleCSS tokenDart tokenApp widget today
Height--spacing-f55 (touch target), --spacing-f34 compactAstrSize.control, AstrSize.controlCompactExplore button 27
Shape--radius-fullBorderRadius.circular(…) pillkExploreButtonRadius 8
Padding0 --spacing-f21, compact f13AstrSpace.f21, f13none
Type--text-s0 w700, compact --text-s-1AstrType.s0, sNeg1labelMd 12 w500
Filled filltone, lightened by --color-space-grey-50 at --mag-3Color.alphaBlend(text, Mag.m3)AppColors.accent #448AFF
Text on fill--color-space-grey-950_inktextPrimary on accent
Glyph--spacing-f21AstrSize.iconnone
Disabledopacity --mag-2Mag.m2none
Pressedscale 0.97, glow like hover (quiet variants glow while held)AnimatedScale 0.97, BoxShadownone