Split button
canonMain action plus a chevron that opens a menu of related variants of the same action.
Approved by the owner 26 Sep 2026 („za me ok . schvaleno“, preview button-compact-split) and delivered in acrm !3903. Reverses review ACRM-81 (no use case then) on the owner’s request; pattern Atlassian Split button. Menu items shared with Menu button (one menu in the family). First adopter: mail „Odeslat hned / s odkladem“. Registry repaired 17 Oct 2026 (review F4/F11): attached css button.css.
Used in 4 files · 3 areas · 5× — components/mail, components/setkani, pages/komunikace
Import
import { SplitButton } from '@acrm/ui'
Props
SplitButton packages/ui/src/components/SplitButton.tsx
| Name | Type | Default | Description |
|---|---|---|---|
children * | ReactNode | — | Popisek hlavní akce (smí nést glyf). |
onClick * | () => void | — | — |
items * | MenuButtonItem[] | — | Nabídka pod šipkou (týž tvar jako MenuButton). Bez checked = varianty téže akce (klik provede), s checked = volba režimu hlavní akce (radio). Nemíchat v jedné nabídce. |
moreLabel * | string | — | Přístupný název šipky, např. „Další možnosti odeslání". Povinný — šipka nemá text. |
variant | 'default' | 'primary' | 'default' | — |
compact | boolean | — | — |
disabled | boolean | — | Zhasne hlavní akci. Šipku taky, pokud moreDisabled neřekne jinak. |
moreDisabled | boolean | disabled | Šipka zvlášť — výchozí = disabled. U volby režimu typicky false. |
loading | boolean | — | Hlavní akce běží (<Button loading>: osmička přes popisek, šířka drží, aria-busy). |
kbd | ReactNode | — | Klávesová zkratka hlavní akce (<Button kbd>). |
describedBy | string | — | aria-describedby hlavní akce — např. věta, proč je zhaslá. |
className | string | — | — |
CSS classes
.acrm-split.acrm-split-more.acrm-split.compact