Umbra UI

Button

Triggers an action. Four variants, three tones, three sizes, loading and icon support.

Staticimport { Button } from 'umbra-ui'

Props

Button

PropTypeDefaultDescription
asChild booleanfalseRender the single child element (e.g. a router link) with button styling instead of a `<button>`.
endIcon ReactNode—Icon rendered after the label (decorative).
fullWidth booleanfalseStretch to the container width.
loading booleanfalseShows a spinner, sets `aria-busy` and ignores clicks while keeping focus.
size "sm" | "md" | "lg"mdControl height.
startIcon ReactNode—Icon rendered before the label (decorative).
tone "accent" | "neutral" | "danger"neutralColour intent.
variant "solid" | "soft" | "outline" | "ghost"ghostVisual weight.

IconButton

PropTypeDefaultDescription
aria-label requiredstring—Accessible name. Required because the button has no visible text.
children requiredReactNode—The icon.
asChild booleanfalseRender the single child element (e.g. a router link) with button styling instead of a `<button>`.
loading booleanfalseShows a spinner, sets `aria-busy` and ignores clicks while keeping focus.
size "sm" | "md" | "lg"mdControl height.
tone "accent" | "neutral" | "danger"neutralColour intent.
variant "solid" | "soft" | "outline" | "ghost"ghostVisual weight.

Usage notes

Use one solid accent button per view for the primary action. asChild renders a link with button styling.

Accessibility

  • Native <button>: Enter and Space activate it.
  • loading sets aria-busy and aria-disabled but keeps the button focusable, so focus is not lost mid-submit.
  • IconButton requires aria-label; icons passed to startIcon / endIcon are hidden from assistive tech.
  • Focus ring is a 2px outline in color-focus, which also shows in forced-colors mode.

Import

import { Button, IconButton } from 'umbra-ui';
import 'umbra-ui/styles.css'; // once, at the root of your app