X Enterprises
Table

TableToolbar

Pre-composed table toolbar with search, filter chips, column toggle, and export button.

TableToolbar

A pre-composed toolbar that mounts the most common table chrome in a single component: search input, removable filter chips, column visibility toggle, and CSV/JSON export. Slots on the left, right, and actions sides let you inject custom controls without rebuilding the layout.

Components

<XATableToolbar />

<XATableToolbar
  v-model:search="search"
  v-model:visible-columns="visibleColumns"
  :searchable="true"
  search-placeholder="Search orders..."
  :active-filters="filters"
  :show-column-toggle="true"
  :columns="columns"
  :exportable="true"
  :data="rows"
  export-filename="orders"
  @remove-filter="(k) => removeFilter(k)"
  @clear-filters="clearFilters"
>
  <template #left>
    <USelectMenu v-model="view" :items="views" size="sm" />
  </template>
  <template #right>
    <UButton label="Refresh" icon="i-lucide-refresh" size="sm" variant="soft" />
  </template>
  <template #actions>
    <UButton label="New order" icon="i-lucide-plus" size="sm" />
  </template>
</XATableToolbar>

Props

PropTypeDefaultDescription
searchablebooleantrueRender the search input.
searchstring''Current search value. v-model:search target.
searchPlaceholderstring'Search...'Search input placeholder.
Filter chips
PropTypeDefaultDescription
activeFiltersArray<{ key: string; label: string; value: unknown }>[]Filters to display as removable chips. Clicking the × emits remove-filter.
Column visibility
PropTypeDefaultDescription
showColumnTogglebooleantrueMount the column visibility popover.
columnsColumn[][]Full column list. Columns with enableHiding: false or id === 'actions' are excluded from the toggle.
visibleColumnsstring[][]Currently visible column IDs. v-model:visible-columns target.
Export
PropTypeDefaultDescription
exportablebooleantrueMount the export dropdown.
dataObject[][]Rows to export.
exportFilenamestring'export'Base filename (no extension).

Emits

EventPayloadDescription
update:search(value: string)Wired via v-model:search.
update:visibleColumns(ids: string[])Wired via v-model:visible-columns.
remove-filter(key: string)× clicked on a filter chip.
clear-filters()"Clear all" link clicked.

Slots

SlotDescription
leftExtra controls appended to the left side after the filter chips.
rightExtra controls rendered before the column toggle / export buttons.
actionsTrailing action buttons (e.g., a primary "Create" CTA).

AI Context

component: XATableToolbar
package: "@xenterprises/nuxt-x-app"
category: Table
use-when: >
  Above XATable when you want the standard admin-toolbar look (search +
  filters + column toggle + export) without wiring each sub-component
  manually. Use the #left / #right / #actions slots to layer in any
  app-specific controls.
hides-actions-column: "columns with id or accessorKey === 'actions' are excluded from column toggle and export by default"
Copyright © 2026