Component librarySplit button
Split button
ProOne primary native action joined to a keyboard-accessible menu of related alternatives.
npx shadcn@latest add @tidal-pro/split-buttonInstallation
Pro source is gated. Configure the @tidal-pro registry using the agent guide. Create an access key from your account after purchasing.
Terminal
Import components/ui/tidal.css, components/ui/split-button.css, components/ui/dropdown-menu.css, then add the component inside a tidal-scope wrapper. Its scoped design tokens keep it independent of your existing CSS.
Usage
Complete example source · Dependency and asset manifest
Loading the complete example…
API & behavior
label is the primary ReactNode action label. menuLabel names both the separate icon trigger and its menu. options requires unique IDs, plain textValue for typeahead, ReactNode labels, optional descriptions/decorative icons, destructive styling, disabled state, native item props/ref, and onSelect. The primary action and menu trigger expose separate native prop bags and refs; the primary type defaults through TidalButton while the menu trigger is always type=button. disabled affects both controls; primaryLoading affects only the primary action; menuDisabled affects only the menu trigger. Native or aria-disabled=true resolves to actual disabled behavior while explicit false is preserved when enabled. theme/dir apply to the portalled Dropdown menu. open/defaultOpen/onOpenChange expose the Radix root contract. contentProps/contentRef expose menu positioning and the portalled surface. The root forwards remaining native div attributes/ref. Consumers own action effects, accepted state, form submission, navigation, focus after a menu action, requests, data and storage.
Style with the --t-* CSS variables. Set data-theme="dark" on your tidal-scope wrapper for a dark surface. Motion respects the system’s reduced-motion preference.