Officina UI
Components

TableToolbar

Toolbar bar above a table with slots for search, filters, bulk actions, and a columns toggle.

TableToolbar is the control strip you place above a table. It lays out a built-in search box on the left (via the search config), filters next to it, and pins bulkActions, a columnsToggle, and any rightSlot content to the right edge — collapsing to a stacked layout on small screens. Use it to give DataTable/DataGrid or a hand-built Table a consistent header of controls.

Example

Preview
import { TableToolbar, Button } from '@officina/ui';
import { useState } from 'react';

function ListToolbar() {
  const [query, setQuery] = useState('');
  return (
    <TableToolbar
      search={{ value: query, onChange: setQuery, placeholder: 'Search users…' }}
      rightSlot={<Button size="sm">New user</Button>}
    />
  );
}

API

PropTypeDefaultDescription
bulkActionsReactNode—Bulk-action controls shown when rows are selected.
columnsToggleReactNode—Column visibility toggle control.
filtersReactNode—Filter controls rendered in the toolbar's filter slot.
rightSlotReactNode—Arbitrary content pinned to the right edge of the toolbar.
search{ value: string; onChange: (value: string) => void; placeholder?: string; }—Built-in search box config; omit to hide the search input.

On this page