UI.MD

Table Toolbar

The filter row above a table or row list: scope controls on the left, whole-table actions on the right.

Installation

$
npx shadcn@latest add https://ui.mattdowney.com/r/table-toolbar.json

Usage

import { TableToolbar, TableToolbarViews, TableToolbarControls, TableToolbarActions } from "@/components/ui/table-toolbar"

Examples

Default

Scope controls left, actions right. Give a search field a width (w-64): Input is w-full, so a cap alone leaves its size to whatever surrounds it.

OrderCustomerAmount
#3391Priya Nair$1,240
#3390Sam Okafor$860

With a view switcher

A view switcher sits first, before the filters that narrow the list. Keep the Tabs root around both the toolbar and the panels. Size everything lg: a TabsList is 40px tall, and lg is the control rung that matches it.

OrderCustomerAmount
#3391Priya Nair$1,240
#3390Sam Okafor$860