MindeesUI
ComponentsButtons

Button

The standard tappable action — supports solid, outline, ghost, and link variants with five semantic tones.

Button is the workhorse action control. It renders a Pressable with token-driven sizing, a tone-aware color treatment, optional leading and trailing slots, and a built-in loading spinner. When nested inside a ButtonGroup, it picks up the group's variant and size and merges its corner radii so adjacent buttons share borders cleanly.

Import

import { Button } from '@mindees/ui';

Usage

<Button onPress={handleSave}>Save changes</Button>

With leading and trailing slots and a loading state:

<Button
  variant="solid"
  tone="primary"
  leading={<Icon name="check" />}
  loading={isSubmitting}
  onPress={submit}
>
  Submit
</Button>

Variants

<Button variant="solid" tone="primary">Solid</Button>
<Button variant="outline" tone="primary">Outline</Button>
<Button variant="ghost" tone="primary">Ghost</Button>
<Button variant="link" tone="primary">Link</Button>

Semantic tones (primary, neutral, success, danger, warning) compose with any variant:

<Button variant="solid" tone="danger">Delete</Button>
<Button variant="outline" tone="success">Approve</Button>

Props

PropTypeDefaultDescription
variant'solid' | 'outline' | 'ghost' | 'link''solid' (or inherited from ButtonGroup)Visual treatment.
size'sm' | 'md' | 'lg''md' (or inherited from ButtonGroup)Controls height, horizontal padding, and label type scale.
tone'primary' | 'neutral' | 'success' | 'danger' | 'warning''primary'Semantic color role used to resolve background, border, and text color.
loadingbooleanfalseReplaces the label with a spinner and implicitly disables the button.
disabledbooleanloadingDisables press handling and dims the button to 50% opacity.
fullWidthbooleanfalseStretches the button to fill its container's main axis.
leadingReactNodeNode rendered before the label (e.g. icon).
trailingReactNodeNode rendered after the label.
asChildbooleanfalseRender the underlying behavior into a single child element instead of a Pressable.
childrenReactNodeLabel content. Plain strings are wrapped in the themed Text component.

Inherits all PressableProps except children (e.g. onPress, onLongPress, accessibilityLabel).

Accessibility

Button sets accessibilityRole="button" and reports accessibilityState={{ disabled, busy }} so screen readers announce both the disabled and loading conditions. The default md size renders at a 44pt minimum height to meet platform tap-target guidance — keep sm for dense toolbars where surrounding hit area compensates. When loading is true, press handlers are suppressed automatically so accidental double-submits are avoided. On web, focus rings come from the underlying Pressable and follow the host platform's focus styles.

On this page