Skip to main content

ButtonGroup

scoped

ButtonGroup is used to group Button and Dropdown elements into more functional units that will be automatically styled and arranged when inserted inside the element.

Basic usage

Add a wje-button-group element to the HTML with the desired attributes and include the desired Button or Dropdown elements inside it.

ButtonGroup shape

The demonstration compares how buttons with different shapes behave in a group. The important thing is that the group still holds one coherent visual whole.

ButtonGroup with Dropdown

The demo combines a classic button and a dropdown in one group. It lends itself to primary action with additional secondary choices.

Icons in ButtonGroup

The demonstration concentrates on working with icons in a button group to make it clear how to keep the same height, rhythm and alignment.

Split buttons

ButtonGroup also allows you to display a split button with multiple functions.

Editing styles

ButtonGroup colors

The sample compares the color variations of the entire button group to make it clear how the group behaves in meaningful states.

Border color in ButtonGroup

The sample shows the outline color variations in the button group. It fits where you want a more subtle visual, but still maintain a meaningful distinction.

When to use

Use wje-button-group when you want to solve a given UI problem consistently within the WebJET design system.

When not to use

Do not use a component outside of its responsibility; in an unusual case, prefer to assemble multiple smaller components.

Accessibility

Check keyboard controls, focus states, contrast and clear naming of interactive elements.

  • Prefer API component over manual DOM interventions.
  • Stick to design tokens and consistent naming conventions.
  • Before deployment, test the component in real data scenarios.

Attributes and properties

active

PopisUrčuje, či je komponent aktívny.
Atribútactive
Typboolean|string|number
Predvolenéfalse

color

PopisNastavuje farbu komponentu.
Atribútcolor
Typstring
Predvolenéprimary

fill

PopisNastavuje textovú hodnotu uloženú vo voľbe fill.
Atribútfill
Typstring
Predvolenélink

round

PopisNastavuje textovú hodnotu uloženú vo voľbe round.
Atribútround
Typstring
Predvolenéfalse

Events

Pre tento komponent nie sú dostupné žiadne udalosti.

Methods

Pre tento komponent nie sú dostupné žiadne verejné metódy.

CSS shadow parts

NázovPopis
nativeŠtýluje koreňovú shadow časť komponentu.
nativeŠtýluje koreňovú shadow časť komponentu.

CSS custom variables

Pre tento komponent nie sú dostupné žiadne vlastné CSS vlastnosti.

Slots

NázovPopis
defaultPredvolený slot pre hlavný obsah komponentu.