Skip to content
Liquidify
HomeDocsComponentsExamplesPlayground
⌘K
(opens in new tab)
Liquidify

Accessible React controls with a CSS and SVG material engine.

Product

ComponentsExamplesPlaygroundPackages

Learn

DocumentationGetting startedConceptsAI resources

Project

CommunityShowcaseVersionsGitHub

Independent open-source software. Not affiliated with or endorsed by Apple Inc.

LicenseBrand

Component catalog

Browse the public controls by interaction purpose. Every result links to generated API facts, accessibility behavior, source, and exhaustive stories.

Button

A user-invokable control that performs an immediate action.

import { Button } from "@liquidify/react/button"

Overview

Styles

Seven buttonStyle variants — automatic adapts to context; glass and glassProminent apply the Liquid Glass material.

Sizes

Three controlSize steps — small, regular, large — applied to bordered; capsule height and font scale together.

Roles

Three SwiftUI button roles with bordered style — Default (primary), Delete (destructive, red label), Cancel (neutral).

States & Content

borderedProminent across enabled, disabled, and icon+label — disabled desaturates fill and lowers opacity.

Tint palette

All 13 system tints on borderedProminent — fill colour and label colour both track the active tint token.

Translucent

The translucent ButtonVariant — a tint-accent capsule mixed toward transparent so the engine glass refracts through it.

As Child

A glass Button merged onto an anchor via asChild, disabled — it remains focusable but does not navigate or activate.

Icons

Leading, trailing, and icon-only slots — glyphs inherit the label colour through the Button content.

API

PropTypeDefaultDescription
aria-label
required
string | undefined—Provides an accessible name, required when the button has no visible text.
aria-labelledbystring | undefined—References another element that provides the button's accessible name.
asChildfalse | undefinedfalseApplies the Button surface and behavior to one child element instead of rendering a native button.
childrenReactNode—Visible button label or content.
classNamestring | undefined—Adds a CSS class to the button surface for token-based customization.
disabledboolean | undefined—Prevents interaction and removes a native button from the tab order.
leadingIconReactNode—Renders an icon before the label. Icon-only buttons need an accessible name.
loadingboolean | undefined—Shows a progress indicator and temporarily prevents activation while remaining focusable.
onClick((event: MouseEvent<HTMLButtonElement>) => void) | undefined—Receives the native click event. Use onPress for the primary action.
onPress(() => void) | undefined—Runs when the button is activated, unless it is disabled or loading.
refRef<HTMLButtonElement> | undefined—Receives a reference to the rendered native button.
roleButtonRole | undefined—Communicates the action's intent, such as destructive or cancel, without changing its visual variant.
sizeButtonSize | undefinedregularSets the button size: small, regular, or large.
tintLiquidTintValue | undefined—Sets the system accent color without changing the button variant.
trailingIconReactNode—Renders an icon after the label. Icon-only buttons need an accessible name.
variantButtonVariant | undefinedautomaticSets the button's visual treatment, such as bordered, prominent, glass, or plain.

Guidelines

Do
  • Use concise, action-oriented labels.
  • Reserve the prominent treatment for the primary action.
  • Use destructive styling only for consequential actions.
Don't
  • Do not use a Button to navigate to another destination.
  • Do not make multiple actions equally prominent.
  • Do not use vague labels such as “Click here.”

Accessibility

Button uses native button semantics, preserves visible focus, and supports keyboard activation by default.

Keyboard
  • Press Space or Enter to activate the button.
  • Press Tab to focus the button.
  • Arrow keys do not affect the button.

Tokens

NameValue
--lq-button-fill (automatic, borderless, plain)transparent
--lq-button-fill (borderedProminent, glassProminent)#007AFF
--lq-button-fill (bordered, glass)rgba(255, 255, 255, 0.5)rgba(24, 24, 24, 0.5)
--lq-button-fill (translucent)#007AFF40%transparent
--lq-button-label (prominent)#FFFFFF
--lq-button-label (tinted)#0088FF#0091FF
--lq-button-label (plain)#000000#FFFFFF
--lq-button-label (destructive)#FF383C#FF4245
--lq-button-ring#007AFF
--lq-focus-ring-color#007AFF
--lq-color-accent#007AFF
--lq-color-action-primary#007AFF
--lq-color-action-secondaryrgba(120, 120, 128, 0.16)
--lq-color-action-destructive#FF3B30
--lq-color-on-action-primary#FFFFFF
--lq-color-label-primary-light#000000
--lq-color-label-primary-dark#FFFFFF
--lq-space-20.125rem
--lq-space-80.5rem
--lq-space-120.75rem
--lq-space-161rem
--lq-space-201.25rem
--lq-space-322rem
--lq-space-402.5rem
--lq-space-483rem
--lq-radius-pill9999rem
--lq-hit-target-touch2.75rem
--lq-font-weight-medium500
--lq-font-size-callout0.75rem
--lq-font-size-body0.8125rem
--lq-font-size-title30.9375rem
--lq-line-height-callout1.22
--lq-line-height-body1.25
--lq-line-height-title31.25
--lq-duration-snappy80ms
--lq-duration-fast120ms
--lq-duration-lazy500ms
--lq-motion-press-duration500ms
--lq-motion-hover-scale1.025
--lq-motion-press-clarity0.9
--lq-opacity-disabled0.6
--lq-easing-standardcubic-bezier(0.25, 0.1, 0.25, 1)

Key features

  • Real material

    Rendered by Liquidify’s CSS and glass engine.

  • Generated API

    16 public props from the package declaration.

  • Accessible

    3 documented keyboard behaviors.

  • Customizable

    42 documented design tokens.

Resources

  • Source
  • Markdown
  • JSON
  • Storybook
Components