Skip to main content

ToolbarButtonGroup

Groups multiple ToolbarButtons in a row, optionally wrapped in a glass pill container. Supports 1-7 buttons.

Import​

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

Basic Usage​

Live Preview
<ThemeProvider initialTheme="light">
<Stack gap={16}>
  <ToolbarButtonGroup
    glass
    buttons={[
      { key: 'a', icon: <Text style={{fontSize: 20}}>{'\u21A9'}</Text>, onPress: () => {} },
      { key: 'b', icon: <Text style={{fontSize: 20}}>{'\u{1F4C1}'}</Text>, onPress: () => {} },
      { key: 'c', icon: <Text style={{fontSize: 20}}>{'\u{1F5D1}'}</Text>, onPress: () => {} },
    ]}
  />
</Stack>
</ThemeProvider>

Props​

See the TypeScript definitions for the complete props API.

PropTypeDefaultDescription
buttonsToolbarButtonConfig[]requiredButton configurations (1-7)
position'top' | 'bottom''bottom'Affects sizing
glassbooleanfalseWrap in glass pill container

Accessibility​

  • Each button is individually focusable
  • Group does not add its own semantic role

Changelog​

See GitHub Releases for version history.