
Sort Menu
Menus
Search by name, tag, category or type
Source and install need .
pnpm dlx shadcn@latest add @assembli/export-menuThe "Export" dropdown from a table toolbar: CSV, Excel, PDF and JSON as file badges with a line on each, which rows to include (all, current view or selection, with counts), header and archive options, and a button that names exactly what it will download. The trigger shows progress, then success or failure, and ⌘↵ exports from anywhere in the menu.
Other props pass through to the root element.
formats
ExportFormat[]
Default DEFAULT_FORMATS
defaultFormat
string
counts*
{ all: number; view?: number; selected?: number }
Row counts per scope. Leave view or selected out (or 0) to disable that choice.
onExport
(options: ExportOptions) => void | Promise<void>
Runs the export. Return a promise to show progress on the trigger; reject to show an error.
label
string
Default "Export"
Trigger text.
archivedOption
boolean
Default true
Offer "Include archived".
| Description | |||
|---|---|---|---|
| formats | ExportFormat[] | DEFAULT_FORMATS | |
| defaultFormat | string | – | |
| counts* | { all: number; view?: number; selected?: number } | – | Row counts per scope. Leave |
| onExport | (options: ExportOptions) => void | Promise<void> | – | Runs the export. Return a promise to show progress on the trigger; reject to show an error. |
| label | string | "Export" | Trigger text. |
| archivedOption | boolean | true | Offer "Include archived". |