You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Material Design 3 Split Button web component — framework-agnostic, built with Lit.
An expressive M3 Split Button web component — a button with a primary action and a secondary dropdown trigger. Features shape morphing and rotation animations following Material Design 3 expressive motion. Works in Angular, React, Vue, Svelte, or plain HTML — no build step required.
Features
Primary action + dropdown trigger in one component
Shape morphing animation on menu open
Filled, outlined, tonal, and elevated variants
Pairs with @banegasn/m3-menu for the dropdown
Keyboard accessible
Framework-agnostic custom element
Installation
npm install @banegasn/m3-split-button
# or
pnpm add @banegasn/m3-split-button
# or
yarn add @banegasn/m3-split-button
<m3-split-buttonvariant="filled" menu-id="my-menu">
Save
</m3-split-button><m3-menuid="my-menu" placement="bottom-end"><m3-menu-itemvalue="draft">Save as draft</m3-menu-item><m3-menu-itemvalue="copy">Save a copy</m3-menu-item></m3-menu>
API
Properties
Property
Type
Default
Description
variant
'filled' | 'outlined' | 'tonal' | 'elevated'
'filled'
Button style variant
menuOpen
boolean
false
Reflects whether the associated menu is open (affects shape morphing)