openpencil/packages/docs/programmable/sdk/api/advanced/use-toolbar.md

17 lines
432 B
Markdown
Raw Normal View History

---
title: useToolbar
description: Primitive context helper for ToolbarRoot descendants.
---
# useToolbar
`useToolbar()` reads the local toolbar context provided by `ToolbarRoot`.
Use it inside toolbar descendants that need access to tools, active state, or tool selection helpers.
## Related APIs
- [ToolbarRoot](../components/toolbar-root)
- [ToolbarItem](../components/toolbar-item)
- [useToolbarState](./use-toolbar-state)