Skip to content

Toolbar

A container for grouping a set of controls, such as buttons, toggle groups, or dropdown menus.

## Installation
bash
npx @galaxy-stack/nebula-cli add toolbar
bash
npx @galaxy-stack/nebula-cli add toolbar
bash
npx @galaxy-stack/nebula-cli add toolbar
bash
# If you have installed galaxy-design globally
galaxy-design add toolbar

Usage

tsx
import {
  Toolbar,
  ToolbarButton,
  ToolbarSeparator,
  ToolbarLink,
  ToolbarToggleGroup,
  ToolbarToggleItem,
} from '@/components/toolbar'

export default function ToolbarDemo() {
  return (
    <Toolbar>
      <ToolbarButton>Undo</ToolbarButton>
      <ToolbarButton>Redo</ToolbarButton>
      <ToolbarSeparator />
      <ToolbarToggleGroup type="single">
        <ToolbarToggleItem value="bold">Bold</ToolbarToggleItem>
        <ToolbarToggleItem value="italic">Italic</ToolbarToggleItem>
      </ToolbarToggleGroup>
    </Toolbar>
  )
}

API Reference

Toolbar Props

PropTypeDefaultDescriptionFrameworks
orientation'horizontal' | 'vertical''horizontal'Toolbar orientationAll
dir'ltr' | 'rtl''ltr'Reading direction for roving focusAll
loopbooleantrueLoop keyboard focus from last to firstAll
classNamestring''CSS class names for toolbar rootAll
childrenReactNode-Toolbar contentAll

ToolbarButton Props

PropTypeDefaultDescriptionFrameworks
asChildbooleanfalseRender as child elementReact, Vue, Angular
disabledbooleanfalseDisables the buttonAll
classNamestring''CSS class namesAll

ToolbarSeparator Props

PropTypeDefaultDescriptionFrameworks
classNamestring''CSS class namesAll

ToolbarToggleGroup Props

PropTypeDefaultDescriptionFrameworks
type'single' | 'multiple'-Toggle typeAll
classNamestring''CSS class namesAll

ToolbarToggleItem Props

PropTypeDefaultDescriptionFrameworks
valuestring-Toggle item valueAll
disabledbooleanfalseDisables the itemAll
classNamestring''CSS class namesAll

Components

  • Toolbar - Main toolbar container
  • ToolbarButton - Clickable button
  • ToolbarSeparator - Visual separator
  • ToolbarLink - Link button
  • ToolbarToggleGroup - Group of toggle items
  • ToolbarToggleItem - Individual toggle button

Accessibility

  • Keyboard Navigation: [TODO]
  • Screen Reader: [TODO]
  • Focus Management: [TODO]
  • WCAG Compliance: WCAG 2.1 Level AA compliant

Author

Bùi Trọng Hiếu (kevinbui)

License

MIT © 2025 Bùi Trọng Hiếu (kevinbui)

Released under the MIT License.