Dark Light
System
Default LBBW Jira Confluence Source Code
Share
Playground

Button Group

<afp-button-group> Since 1.0.0 stable This component uses the light DOM, so its markup and styles are part of the regular document flow.

A button group component to display multiple buttons together.

Left Center Right

Examples #

Variants #

Set variant on the group to apply to all child buttons. Individual buttons can override with their own variant.

Left Center Right Left Center Right Left Center Right Left Center Right
Left Center Right Left Center Right Left Center Right Left Center Right

Shapes #

Set shape on the group to apply to all child buttons.

Left Center Right Left Center Right
Left Center Right Left Center Right

Sizes #

Set size on the group to apply to all child buttons.

Left Center Right Left Center Right Left Center Right

Orientation #

Set orientation to vertical to stack buttons vertically instead of horizontally. The default is horizontal.

Top Middle Middle Middle Bottom

Border #

Set --afp-button-group-border-width to control the border width between buttons.

Left Center Right

Disabled #

Set disabled on the group to apply to all child buttons.

Left Center Right

Properties

Learn more about properties.

Name Description Reflects
size
Size of buttons
Type
AfpSize
Name Description
SMALL
Small size with compact dimensions.
MEDIUM
Medium size with standard dimensions.
LARGE
Large size with expanded dimensions.
AfpSize
Default AfpSize.MEDIUM
disabled
Disabled state applied to child buttons
Type boolean
Default false
variant
variant of buttons
Type
AfpVariant
Name Description
NEUTRAL
The main call-to-action.
BRAND
Less prominent than primary.
ACCENT
Secondary highlight for emphasis.
ERROR
Used for destructive or critical actions.
INFO
Conveys general information.
SUCCESS
Indicates a successful or positive action.
WARNING
Communicates cautionary actions.
AfpVariant
Default AfpVariant.NEUTRAL
shape
shape of buttons
Type
AfpShape
Name Description
PILL
Makes the component circular.
ROUNDED
Makes the component rounded.
SOFT
Makes the component have soft edges.
SQUARE
Makes the component square.
AfpShape
Default AfpShape.ROUNDED
label
Label for the button group
Type string
orientation
orientation of button group
Type
AfpOrientation
Name Description
HORIZONTAL
Horizontal layout orientation.
VERTICAL
Vertical layout orientation.
AfpOrientation
Default AfpOrientation.HORIZONTAL

Slots

Learn more about slots.

Name Description
default
The default slot for button elements.

Internationalization

Learn more about internationalization.

Key Description
button-group.aria-label
The default `aria-label` text for Button Group

CSS Parts

Learn more about CSS Parts.

Name Description Selector
base
The button group container wrapper.
::part(base)

CSS Custom Properties

Name Description Default
--afp-button-group-border-width
The border width of the button group.
--afp-border-width-s

Dependencies

The component automatically brings in the listed items, including any nested dependencies that may exist.

afp-button

Importing

Using the bundle is the recommended method to include components. If you’d rather handle imports manually, you can use the code examples below.

import '@afp-design-system/core/dist/components/button-group/button-group.js';
Share
Create a link with a predefined theme that is automatically applied when the generated link is opened. Default LBBW Presentation Mode
Abort Copy Link