cratis/ai.distribution/toolbar
Claude Code and agent skill by cratis/ai.distribution
- community
Checking that the SKILL.md file is still in the repository.
Use this skill when asked to add or build a canvas-style icon toolbar using the @cratis/components Toolbar component. Covers Toolbar, ToolbarButton, ToolbarSeparator, ToolbarSection, ToolbarContext, and ToolbarFanOutItem. Use whenever building tool panels, drawing tool selectors, zoom controls, or any icon-button group with active states, context switching, or fan-out sub-panels.
Install
npx vskill@latest install cratis/ai.distribution/toolbarSKILL.md
The same SKILL.md was published earlier as cratis/ai.distribution/toolbar.
When to use the Toolbar
The Toolbar component is designed for canvas-style tool panels — the kind you find in drawing or diagram editors. It groups ToolbarButton elements into a pill-shaped bar with hover tooltips and active highlights. Use it when you need:
- A tool selector with an "active tool" state
- A set of action buttons that animate between tool modes
- A toolbar that fans out sub-panels for grouped tools
For a standard page action menu (Create / Edit / Delete over a data table), use DataPage.MenuItems instead.
Component overview
| Component | Purpose | |
|---|---|---|
Toolbar | Container — renders a pill-shaped bar of buttons | |
ToolbarButton | Icon or text button with tooltip and optional active state | |
ToolbarSeparator | Visual divider between button groups | |
ToolbarSection | Animated section that transitions between named contexts | |
ToolbarContext | Named set of buttons inside a ToolbarSection | |
ToolbarFanOutItem | Button that slides out a horizontal sub-panel on click |
All components import from the @cratis/components/Toolbar subpath (never the root barrel — see components.md):
Step 1 — Basic vertical toolbar
Place ToolbarButton elements inside Toolbar. The default orientation is vertical.
Step 2 — Active state (selected tool)
Use the active prop to highlight the currently selected tool. Drive it from state:
Step 3 — Separators
ToolbarSeparator draws a thin divider line between groups. Pass the same orientation as the enclosing Toolbar:
Step 4 — Horizontal toolbar with text buttons
Pass orientation='horizontal' for a horizontal layout. Use text for buttons that display a value (e.g. zoom percentage):
For horizontal toolbars, settooltipPosition='bottom'(or'top') so tooltips do not overlap the toolbar.
Step 5 — Animated context switching
ToolbarSection + ToolbarContext allows the toolbar to show different sets of buttons depending on the active mode. When activeContext changes, the buttons fade out, the section morphs to the new size, and the new buttons fade in.
Only the ToolbarSection transitions. Buttons outside the section are unaffected.
Step 6 — Fan-out sub-panel
ToolbarFanOutItem replaces a regular button with one that fans out a horizontal panel of additional tools. Clicking the button again or anywhere outside closes the panel.
When the toolbar is on the right side of the screen, fan out to the left:
Props reference
Toolbar
| Prop | Type | Default | Description | ||
|---|---|---|---|---|---|
children | ReactNode | — | ToolbarButton, ToolbarSeparator, ToolbarSection, or ToolbarFanOutItem elements | ||
orientation | `'vertical' \ | 'horizontal'` | 'vertical' | Layout direction |
ToolbarButton
| Prop | Type | Default | Description | ||||
|---|---|---|---|---|---|---|---|
icon | string | — | PrimeIcons CSS class (e.g. 'pi pi-pencil') | ||||
text | string | — | Text shown inside the button (use for values like zoom %) | ||||
tooltip | string | required | Tooltip text on hover | ||||
active | boolean | false | Highlights the button as selected | ||||
onClick | () => void | — | Click handler | ||||
tooltipPosition | `'top' \ | 'right' \ | 'bottom' \ | 'left'` | 'right' | Tooltip position |
ToolbarSeparator
| Prop | Type | Default | Description | ||
|---|---|---|---|---|---|
orientation | `'vertical' \ | 'horizontal'` | 'vertical' | Match the enclosing Toolbar orientation |
ToolbarSection
| Prop | Type | Default | Description | ||
|---|---|---|---|---|---|
activeContext | string | first context name | Name of the active ToolbarContext | ||
children | ToolbarContext[] | — | ToolbarContext children | ||
orientation | `'vertical' \ | 'horizontal'` | 'vertical' | Match the enclosing Toolbar |
ToolbarContext
| Prop | Type | Default | Description | |
|---|---|---|---|---|
name | string | required | Identifier matched by ToolbarSection.activeContext | |
children | ReactNode | — | ToolbarButton elements for this context |
ToolbarFanOutItem
| Prop | Type | Default | Description | ||||
|---|---|---|---|---|---|---|---|
icon | string | required | PrimeIcons CSS class for the trigger button | ||||
tooltip | string | required | Tooltip for the trigger button | ||||
tooltipPosition | `'top' \ | 'right' \ | 'bottom' \ | 'left'` | 'right' | Tooltip position | |
fanOutDirection | `'right' \ | 'left'` | 'right' | Direction the sub-panel slides out | |||
children | ReactNode | — | ToolbarButton elements inside the fan-out panel |
Multiple toolbar groups
Render separate Toolbar instances to create distinct groups:
Validation
After creating or modifying a Toolbar component, run:
Fix all errors before proceeding.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/toolbar/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/cratis/ai.distribution/toolbar)