Skip to main content

ToolbarButton

iOS 26 toolbar action button. Atomic building block for NavigationBar and BottomToolbar. Supports icon, text, filled, and back-chevron variants.

Import​

import { ToolbarButton } from '@scaffald/ui';

Basic Usage​

Live Preview
<ThemeProvider initialTheme="light">
<Row gap={16} style={{alignItems: 'center'}}>
  <ToolbarButton icon={<Text style={{fontSize: 22}}>{'\u2295'}</Text>} onPress={() => {}} accessibilityLabel="Add" />
  <ToolbarButton variant="text" label="Edit" onPress={() => {}} />
  <ToolbarButton variant="filled" label="Done" onPress={() => {}} />
  <ToolbarButton variant="back" label="Back" onPress={() => {}} />
</Row>
</ThemeProvider>

Props​

See the TypeScript definitions for the complete props API.

PropTypeDefaultDescription
iconReactNode—Icon element to render
labelstring—Text label
variant'icon' | 'text' | 'filled' | 'back''icon'Button style
onPress() => void—Press handler
disabledbooleanfalseWhether disabled
tintColorstring—Override accent color

Variants​

  • icon: 44x44 touch target with centered icon
  • text: Text label with accent color
  • filled: Blue pill background with white text
  • back: Chevron + text label for back navigation

Accessibility​

  • accessibilityRole="button" on all variants
  • Disabled state communicated via accessibilityState
  • Back button defaults to "Back" accessible label

Design Tokens​

  • Tint: colors.accents[theme].blue
  • Icons: colors.labelsVibrant[theme].primary
  • Filled background: accent blue with white text

See Design Tokens for more information.

Changelog​

See GitHub Releases for version history.