For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Log inSign up
Support
GuidesReferenceClick-to-Call
GuidesReferenceClick-to-Call
  • Core
    • Overview
  • Entities
    • SignalWire
    • Address
    • Participant
    • ClientPreferences
    • SelfCapabilities
    • SelfParticipant
    • User
    • WebRTCCall
  • Web Components
    • Overview
    • sw-audio-level
    • sw-call-controls
    • sw-call-dialpad
    • sw-call-media
    • sw-call-provider
    • sw-call-status
    • sw-call-widget
    • sw-click-to-call
    • sw-device-selector
    • sw-directory
    • sw-local-camera
    • sw-participant-controls
    • sw-participants
    • sw-self-media
    • sw-ui-alert
    • sw-ui-background
    • sw-ui-call-layout
    • sw-ui-content-drawer
    • sw-ui-control-bar
    • sw-ui-dialpad
    • sw-ui-dropup
    • sw-ui-icon
    • sw-ui-modal
    • sw-ui-responsive-container
    • sw-ui-split-button
    • sw-ui-transcript-view
LogoLogoSignalWire Docs
Log inSign up
Support
On this page
  • class: SwUiSplitButton, sw-ui-split-button
  • Fields
  • items
  • active
  • Attributes
  • CSS Properties
  • Slots
  • Events
Web Components

sw-ui-split-button

|View as Markdown|Open in Claude|
Was this page helpful?
Edit this page
Previous

sw-ui-transcript-view

Next
Built with

Pill-shaped icon button with an optional chevron dropdown — the atomic building block of <sw-ui-control-bar>’s mic / camera / speaker buttons.

1<sw-ui-split-button icon="microphone">
2 <button slot="menu">Mute</button>
3 <button slot="menu">Settings</button>
4</sw-ui-split-button>

Renders in two layouts:

  • With a chevron menu (a slotted <sw-ui-dropup> or non-empty items): a unified pill split into a main click zone and a chevron click zone with a subtle divider — [ 🎤 | ▲ ]. Clicking the icon area fires the primary event; clicking the chevron opens the dropup.
  • Without a chevron menu: a single pill button.

Two interaction modes are inferred from which slots have content:

  • Toggle mode — both active and inactive slots are populated. Each click flips the active attribute and fires sw-split-button-toggle with the new state.
  • Push mode — only the default slot is populated. Each click fires sw-split-button-click without toggling.

Class: SwUiSplitButton · Module: packages/web-components/src/components/UI/controls/sw-ui-split-button.ts

class: SwUiSplitButton, sw-ui-split-button

Fields

items
Array<DropUpItem | string>Defaults to []

items field.

active
booleanDefaults to false

active field.

Attributes

NameFieldInherited From
activeactive
itemsitems

CSS Properties

NameDefaultDescription
--sw-split-button-size[44px] - Button height (width auto-fits content).
--sw-split-button-bg[var(—bg-surface)] - Button background.
--sw-split-button-bg-hover[var(—bg-surface-raised)] - Hover background.
--sw-split-button-color[var(—fg-default)] - Icon color.
--sw-split-button-radius[var(—radius-full)] - Border radius.

Slots

NameDescription
activeIcon shown when `active` is `true` (toggle mode).
inactiveIcon shown when `active` is `false` (toggle mode).
Default slot used by push-mode buttons (no `active`/`inactive` slot).
dropupOptional `<sw-ui-dropup>` to enable the chevron menu.

Events

NameDetailDescription
sw-split-button-click—Fired in push mode after each click. No detail.
sw-split-button-toggle—Fired in toggle mode after each click.