Skip to content

K0ndee/split button - #5077

Draft
k0ndee wants to merge 8 commits into
callstack:mainfrom
k0ndee:k0ndee/split-button
Draft

K0ndee/split button#5077
k0ndee wants to merge 8 commits into
callstack:mainfrom
k0ndee:k0ndee/split-button

Conversation

@k0ndee

@k0ndee k0ndee commented Aug 26, 2026

Copy link
Copy Markdown

Motivation

Implements the new Material Design 3 SplitButton component as part of the v6 component modernization work.

The component provides a primary leading action and a separate trailing action for contextual options. It reuses the modernized Button API direction
from #4928/#4943: explicit label/icon props, MD3 mode names (filled, tonal, elevated, outlined), derived ripple/state-layer colors,
extracted component tokens, size metrics, shape tokens, disabled/loading states, and separate accessibility/press handlers for each button segment.

This also adds the component to the public exports, documentation generation config, theme color docs data, and the example app. The example includes a
Menu-based playground, mode showcase, loading/disabled controls, and custom color/label styling.

Related issue

Closes #4986

Related to #4928 and #4943

Is a follow up to #4998

Test plan

  • yarn lint-no-fix
    • Passes with one existing unrelated warning in src/components/__tests__/TextInput.test.tsx.
  • yarn typescript
  • yarn test --watchman=false
  • yarn docs build

Manual verification in the example app:

  • Open the SplitButton example screen.
  • In the playground, tap the leading Send action and trailing menu action separately.
  • Verify the trailing menu opens below the SplitButton anchor and does not cover the button.
  • Verify the trailing menu icon rotates when menu is open and the border radius animates according to M3 specs
  • Toggle Disabled and verify both press targets are disabled and styled correctly.
  • Toggle Loading and verify the leading icon is replaced with a spinner.
  • Review all modes: filled, tonal, elevated, and outlined.
  • Review custom color and custom label style examples.
  • Review all sizes
Screenshot_1787745646 Screenshot_1787745647

draggie and others added 7 commits June 30, 2026 11:52
Removes the no-op mode normalization, derives the disabled outlined
border color from onSurface per MD3 tokens, drops the unused
elevation.pressed token and the leading/style prop omissions that
View doesn't have, replaces icon-label spacing and the hardcoded
touch-target size with proper tokens, avoids a redundant font style
on the label, adds a sizes example, and trims utils unit tests down
to public component behavior.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: add Split Button

2 participants