Skip to content
caliper ui pro docs

Selection toolbar

Actions for the words you selected, where you selected them: the toolbar grows out of the selection and leaves with it; Alt+T reaches it from the keyboard.

Pro
Ostra wants intercompany in scope for the first quarter. The security review is the last item before signature, and João has asked for the order form to arrive before the board meets on the 24th.
Select text, then press Alt+T for actions.

Last edited by Priya Nair at 10:42

When to use

  • Comment, highlight or link on documents and transcripts.
  • Quoting part of a message.

When not to use

  • Rich text editing; use the editor's own toolbar.

Installation

terminal
pnpm dlx shadcn@latest add @caliper/selection-toolbar

Adds its 2 files to components/ui/, each with its own stylesheet, and installs their packages. Pro installs with your access token, set up once per project. See Pro access. The first part also adds Caliper UI’s tokens; import them once as in Installation.

API reference

SelectionToolbar

4 props
PropTypeDefault
container *RefObject<HTMLElement | null>—
actions *readonly SelectionAction[]—
labelstring"Selection"
classNamestring—

Keyboard

Escape
Closes or cancels, then returns focus to where it came from.
→
Moves to the next item or value.
←
Moves to the previous item or value.

Accessibility

It exposes toolbar semantics, with aria-label and aria-hidden kept in step with state.

Notes for AI

Give your coding assistant this page as Markdown instead of screenshots: the props, keyboard and examples in one file.

/docs/components/selection-toolbar.md

The index of every part is at /llms.txt.

More in Surfaces