logo-icon
STW UI

ButtonGroup

Button group shows buttons next to each other.

Usage

svelte
import { ButtonGroup } from 'stwui';
// OR
import ButtonGroup from 'stwui/button-group'; // for tree shaking

Basic

With Active

With Disabled

With Icon

With Leading

With Loading

ButtonGroup Slots

default

ButtonGroup.Button Props

disabled boolean false
htmlType 'button' | 'submit' | 'reset' button
loading boolean false
defaultLoading boolean true
type 'default'| 'primary' | 'danger' | 'ghost' | 'link' | 'text' | 'dark' | undefined
shape 'square' | 'circle' | 'rounded' | 'pill' rounded
size 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'fab' md
ariaLabel undefined | string
htmlType string button

ButtonGroup.Button Slots

leading <ButtonGroup.Button.Leading slot="leading" />
icon <ButtonGroup.Button.Icon slot="icon" />
default
trailing <ButtonGroup.Button.Trailing slot="trailing" />

ButtonGroup.Button.Leading Props

data string (IconData)
viewBox string 0 0 24 24
size string 24px
width string 24px
height string 24px
color string currentColor
stroke string | undefined
fill string currentColor

ButtonGroup.Button.Icon Props

data string (IconData)
viewBox string 0 0 24 24
size string 24px
width string 24px
height string 24px
color string currentColor
stroke string | undefined
fill string currentColor

ButtonGroup.Button.Trailing Props

data string (IconData)
viewBox string 0 0 24 24
size string 24px
width string 24px
height string 24px
color string currentColor
stroke string | undefined
fill string currentColor

ButtonGroup Class Identifiers

stwui-button-group
stwui-button-group-button
stwui-button-group-leading-wrapper
stwui-button-group-icon-wrapper
stwui-button-group-trailing-wrapper
stwui-button-group-loader-wrapper
stwui-button-group-hover
stwui-button-group-loader