Skip to content

Toolbar

Group controls for a related set of actions.

Demos

Size

Usage

vue
<script setup lang="ts">
import { Accordion } from '~/components/ui/accordion'

const items = [
  { value: 'source', label: 'Do I own the source?', content: 'Yes. Copy and adapt the files.' },
]
</script>

<template>
  <Accordion :items="items" />
</template>

Installation

Complete the shared installation. Copy Toolbar.vue and index.ts into app/components/ui/toolbar/.

API

Variants and defaults

PropValuesDefault
sizexs, sm, md, lg, xlsm

Props

PropTypeDefaultDescription
itemsToolbarItem[][]Generated toolbar items.
orientation"horizontal" | "vertical""horizontal"Toolbar orientation.
loopbooleantrueArrow focus wraps.
disabledbooleanfalseDisables generated items.
ariaLabelstring—Accessible label.
ariaLabelledbystring—Accessible label id.
uiToolbarUi—Classes for structural parts.

Slots

SlotPropsDescription
default—Extra toolbar content after generated items.
[item.slot]item, isDisabledCustom generated item content.

Events

EventPayloadDescription
select(item, details)Fired before an item runs onSelect.
input-change(item, value, details)Fired before a generated input runs onUpdateValue.

Keyboard

KeyBehavior
ArrowRight / ArrowLeftMove focus in horizontal toolbar.
ArrowDown / ArrowUpMove focus in vertical toolbar.
Home / EndMove to first/last focusable item.

Generated buttons and links use one roving tab stop. Text inputs remain native tab stops and keep Arrow/Home/End cursor behavior; toolbar navigation never hijacks their editing keys.