Toolbar
A container for grouping a set of controls, such as buttons, toggle groups, or dropdown menus.
bash
npx @galaxy-stack/nebula-cli add toolbar1
bash
npx @galaxy-stack/nebula-cli add toolbar1
bash
npx @galaxy-stack/nebula-cli add toolbar1
bash
# If you have installed galaxy-design globally
galaxy-design add toolbar1
2
2
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>
)
}1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
API Reference
Toolbar Props
| Prop | Type | Default | Description | Frameworks |
|---|---|---|---|---|
orientation | 'horizontal' | 'vertical' | 'horizontal' | Toolbar orientation | All |
dir | 'ltr' | 'rtl' | 'ltr' | Reading direction for roving focus | All |
loop | boolean | true | Loop keyboard focus from last to first | All |
className | string | '' | CSS class names for toolbar root | All |
children | ReactNode | - | Toolbar content | All |
ToolbarButton Props
| Prop | Type | Default | Description | Frameworks |
|---|---|---|---|---|
asChild | boolean | false | Render as child element | React, Vue, Angular |
disabled | boolean | false | Disables the button | All |
className | string | '' | CSS class names | All |
ToolbarSeparator Props
| Prop | Type | Default | Description | Frameworks |
|---|---|---|---|---|
className | string | '' | CSS class names | All |
ToolbarToggleGroup Props
| Prop | Type | Default | Description | Frameworks |
|---|---|---|---|---|
type | 'single' | 'multiple' | - | Toggle type | All |
className | string | '' | CSS class names | All |
ToolbarToggleItem Props
| Prop | Type | Default | Description | Frameworks |
|---|---|---|---|---|
value | string | - | Toggle item value | All |
disabled | boolean | false | Disables the item | All |
className | string | '' | CSS class names | All |
Components
Toolbar- Main toolbar containerToolbarButton- Clickable buttonToolbarSeparator- Visual separatorToolbarLink- Link buttonToolbarToggleGroup- Group of toggle itemsToolbarToggleItem- 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)
- GitHub: @buikevin
- Email: kevinbui210191@gmail.com
License
MIT © 2025 Bùi Trọng Hiếu (kevinbui)
