export-menu
A dropdown of export formats linking to your export route, keeping the current filters.
Example
Export
Laravel
<x-admin::export-menu url="/perks/export?status=live" id="g-export" />Props
| Prop | Required | Default | Options |
|---|---|---|---|
url | null | ||
formats | null | ||
label | null | ||
param | "format" |
Other attributes, such as wire:model or data-*, pass through to the element.
Other stacks
React and Vue: import { ExportMenu } from "@admiral/ui-kit/react" (or /vue). See the React and Vue guide.
HTML, for any stack
<details class="adm-dropdown" id="g-export">
<summary class="adm-btn adm-btn--secondary adm-dropdown__trigger--icon"><svg class="adm-icon" viewBox="0 0 24 24" aria-hidden="true"><path d="M12 3v12M7 10l5 5 5-5M5 21h14"/></svg><span class="adm-dropdown__label">Export</span><svg class="adm-icon" viewBox="0 0 24 24" aria-hidden="true"><path d="m6 9 6 6 6-6"/></svg></summary>
<div class="adm-menu"><a href="/perks/export?status=live&format=csv" class="adm-menu__item">CSV</a>
<a href="/perks/export?status=live&format=xlsx" class="adm-menu__item">Excel</a>
<button type="button" class="adm-menu__item" data-adm-copy-url="/perks/export?status=live&format=tsv"><svg class="adm-icon" viewBox="0 0 24 24" aria-hidden="true"><rect x="9" y="9" width="12" height="12" rx="2"/><path d="M5 15H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v1"/></svg>Copy</button>
<a href="/perks/export?status=live&format=print" class="adm-menu__item" target="_blank">Print</a>
<a href="/perks/export?status=live&format=pdf" class="adm-menu__item">PDF</a></div>
</details>