Skip to content

Floating Toolbar

Last updated 27 Oct 2026

NbFloatingToolbar is a small bar of controls that floats next to something on the page: formatting buttons over a text selection, actions over a selected image, alignment controls over a table cell. It holds ordinary NbButtons, places itself with the same flip-and-clamp logic as NbInfoHint, and is careful never to take focus from the thing it acts on.

Keyboard ​

The toolbar is a single tab stop, following the WAI-ARIA toolbar pattern.

KeyDoes
→ / ←Next or previous control, wrapping (horizontal)
↓ / ↑Next or previous control, wrapping (vertical)
Home / EndFirst or last control
TabLeaves the toolbar
EscEmits close

Disabled controls are skipped. Arrow keys inside a text field move the caret, not the toolbar.

Accessibility ​

  • role="toolbar", named by the required label and oriented by aria-orientation.
  • Roving tabindex is applied to the slotted controls directly, so plain NbButtons work without any extra wiring. It is kept up to date as controls are added, removed or disabled.
  • Icon-only buttons need their own accessible name. Pass aria-label to each NbButton, as in the examples.
  • The entrance animation is suppressed under prefers-reduced-motion: reduce.