GFA Design System is still in development; component APIs and styles may change in upcoming releases.

Ask a Question
Language

Back Button

Return to the previous screen or parent context; ghost stays quiet in headers.

Preview & code

GFA Studio CLI · Coming soon
Back Button

Interactive states

Interactive states

GFA Button uses the native button element with Tailwind transitions. Styles respond to real pointer and keyboard interaction (not simulated CSS-only states in screenshots).

  • Hover / active: hover:* and active:* (with group/button for nested icons where needed).
  • Focus: focus-visible:border-ring and focus-visible:ring-* — always test with keyboard, not only mouse.
  • Disabled: disabled:pointer-events-none + disabled:opacity-50 — no hover/active while disabled.
  • Busy: pair disabled with aria-busy for in-flight actions so assistive tech and styles stay honest.
  • Invalid: aria-invalid toggles error ring tokens (aria-invalid:ring-*).
  • Link overlay: avoid wrapping live demos in anchor (a) elements; use a hit target that skips the preview (data-docs-no-nav) so hover/focus/click demos stay real.

Tokens & attributes

Most states are controlled by native attributes and CSS selectors: :hover, :active, :focus-visible, disabled, aria-busy, aria-invalid.

Color tokens come from CSS variables (e.g. --primary, --border, --ring ) and are applied by Tailwind utilities in the React version.

Hover & active

GFA Studio CLI · Coming soon

Hover the control; press and hold for active styles (where the variant defines them).

Focus-visible

GFA Studio CLI · Coming soon

Click the control above first (user-gesture focus), then inspect the ring — or Tab from the keyboard through the page.

Disabled

GFA Studio CLI · Coming soon

Busy (in-flight)

GFA Studio CLI · Coming soon

Invalid

GFA Studio CLI · Coming soon

Installation

CLI

GFA Studio CLI — Coming soon

The `npx gfa-studio` installer is not published yet. Use Manual install below or download the artifact JSON.

Artifact JSON
https://ui.gkhn.dev/gfa/back-button.json

Manual

  1. Download the component source from https://ui.gkhn.dev/gfa/back-button.json (or copy from this repo: apps/web/src/components/gfa/button.tsx).
  2. Place it in your project (for example: ./src/components/ui/button.tsx) and adjust imports/aliases.
  3. Ensure cn from @/lib/utils exists.
  4. Theme tokens and utilities should align with globals.css.

Step-by-step getting started guide →

Props

PropTypeDefaultDescription
variant"default" | "outline" | "secondary" | "ghost" | "destructive" | "destructiveFilled" | "link""default"Visual style and tone.
size"default" | "xs" | "sm" | "lg" | "icon" | "icon-xs" | "icon-sm" | "icon-lg""default"Height, padding, and icon scale.
type"button" | "submit" | "reset""button"Native button type (button, submit, reset).
disabledbooleanfalseDisables the control; removes pointer interaction and dims via token styles.
aria-busybooleanMarks in-flight work; often pair with disabled to block repeat submits. The loading showcase preview uses aria-busy without disabled so it stays visually active.
aria-invalidbooleanSurfaces validation errors via destructive ring tokens.
...propsButtonHTMLAttributes<HTMLButtonElement>Standard button attributes (onClick, disabled, aria-*, etc.).
classNamestringExtra classes merged with cn(...).

Release note

Published
10 Apr 2026, 12:00(Türkiye — Ankara, Europe/Istanbul)
Last updated
12 May 2026, 17:09(Türkiye — Ankara, Europe/Istanbul)

Instants are stored as UTC (ISO) in the repo; above are the same moments in Türkiye local time. Ankara uses the Europe/Istanbul zone (same offset as İstanbul and the rest of the country).