Skip to main content

BwButton | bw-button

Overview​

Buttons are used to trigger actions in the UI.

Usage​

Colors and Variants​

Click meClick meClick meClick me
Click meClick meClick meClick me
Click meClick meClick meClick me
<bw-button color="blue" variant="primary">Click me</bw-button>
<bw-button color="blue" variant="secondary">Click me</bw-button>
<bw-button color="blue" variant="tertiary">Click me</bw-button>
<bw-button color="blue" variant="link">Click me</bw-button>

<bw-button color="gray" variant="primary">Click me</bw-button>
<bw-button color="gray" variant="secondary">Click me</bw-button>
<bw-button color="gray" variant="tertiary">Click me</bw-button>
<bw-button color="gray" variant="link">Click me</bw-button>

<bw-button color="red" variant="primary">Click me</bw-button>
<bw-button color="red" variant="secondary">Click me</bw-button>
<bw-button color="red" variant="tertiary">Click me</bw-button>
<bw-button color="red" variant="link">Click me</bw-button>

Pending​

Add the pending attribute to the component to disable it and add a loading indicator. It will keep the width it had before entering the state.

Toggle Pending State ➟Submit
<bw-button pending>Submit</bw-button>

Sizes​

lgmdsmxs
<bw-button size="lg">lg</bw-button>
<bw-button size="md">md</bw-button>
<bw-button size="sm">sm</bw-button>
<bw-button size="xs">xs</bw-button>

Properties​

PropertyAttributeDescriptionTypeDefault
colorcolorColor of the button"blue" | "gray" | "red"'blue'
disableddisabledDisables buttonbooleanfalse
expandexpandExpands the button to the full width of it's containerbooleanfalse
formformID of the form to submit the button to. Only use if the button is located outside the form.stringundefined
pendingpendingDisables the button and shows a loading spinnerbooleanfalse
sizesizeButton size"lg" | "md" | "sm" | "xs"'md'
typetypeCan set to submit or reset to participate in formsstring'button'
variantvariantButton fill"link" | "primary" | "secondary" | "tertiary"'primary'

Slots​

SlotDescription
Pass the content of the button in the default slot

Shadow Parts​

PartDescription
"inner-button"The native button element

CSS Custom Properties​

NameDescription
--backgroundDefault background color
--borderBorder of the button
--bw-button-background-overrideOverrides the resting background of secondary buttons (can be set from a parent/slotting component)
--colorDefault text color
--font-sizeText size of the button
--gapGap size of the button's flex container
--heightFixed height of the button
--outline-colorColor of the outline when focused
--radiusBorder radius of the button

Dependencies​

Used by​

Depends on​

Graph​


© 2026 United Systems & Software - All Rights Reserved.