Tessera UI

Split Button

A compound button with a primary action and a dropdown trigger for secondary options

Installation

pnpm add @tessinaui/ui

Usage

import { SplitButton } from "@tessinaui/ui";
<SplitButton label="Create project">
  <SplitButton.Item>Blank project</SplitButton.Item>
  <SplitButton.Item>Use a template</SplitButton.Item>
</SplitButton>

Playground

Configure every property of the Split Button component interactively:

Preview
Loading...

Showcase

All variants, intents, sizes, and states:

Preview
Loading...

API Reference

SplitButton Props

PropTypeDefaultDescription
labelstringText label for the primary action button
variant"primary" | "secondary" | "ghost" | "outline" | "on-color""primary"Visual style variant
intent"none" | "error" | "warning" | "success" | "info""none"Semantic color intent
size"xs" | "sm" | "md" | "lg" | "xl""md"Size of the button
rounded"full" | "lg" | "md" | "sm" | "none""full"Border radius style
leadingIconReact.ReactNodeIcon rendered before the label
trailingIconReact.ReactNodeIcon rendered after the label
onClickMouseEventHandlerHandler for the primary action click
disabledbooleanfalseDisables both action and dropdown trigger
loadingbooleanfalseShows a spinner in the action section
openbooleanControlled open state of the dropdown
onOpenChange(open: boolean) => voidCalled when dropdown open state changes
dropdownAlign"start" | "center" | "end""end"Alignment of the dropdown menu
childrenReact.ReactNodeDropdown menu items

SplitButton.Item Props

Extends @radix-ui/react-dropdown-menu Item props.

PropTypeDescription
disabledbooleanDisables the menu item
onSelect(event: Event) => voidCalled when item is selected

SplitButton.Separator

A horizontal line divider between menu items. No additional props.

SplitButton.Label

A non-interactive label for grouping items.

Sizes

SizeHeightUse case
xs32pxCompact toolbars
sm40pxSecondary actions
md48pxDefault, most use cases
lg56pxProminent actions
xl96pxHero / landing page CTAs

Accessibility

The Split Button component:

  • Two focusable buttons — action button and dropdown trigger — each with their own Tab stop
  • Dropdown trigger has aria-label="More options"
  • Uses Radix UI's DropdownMenu primitive for full keyboard navigation (arrow keys, Enter, Escape)
  • Focus ring on both buttons (focus-visible:ring-2) meets WCAG 2.1 AA
  • disabled propagates to both sections and sets pointer-events-none
  • aria-disabled is set automatically by Radix when the trigger is disabled

On this page