🎉 Black Friday deal! 30% off your first year of CodyHouse Pro →

Projects

Progress value is 30%

Button Group

A group of connected buttons.

View Demo

Dependencies

All components are based on CodyFrame.

This component includes variations. Variations share the same SCSS/JS code but differ in their HTML.

How to

Button groups are lists of buttons packed into a single component because the action they trigger is somehow related.

This component has different variations, each one with different functionality. Specifically, the "default" version is just a list of (standard) button elements; in the --checkbox variation, each button acts as a checkbox button; in the --radio variation, only one button at a time can be selected.

To set a gap among the buttons, add the inline-flex, flex-wrap and gap-{size} utility classes:

<div class="btns inline-flex flex-wrap gap-xs">
  <!-- ... -->
</div>

Customize the component using CSS custom properties:

:root {
  --btns-button-radius: 0.25em;
  --btns-button-padding-x: var(--space-sm);
  --btns-button-padding-y: var(--space-sm);
}

Categories

Project duplicated

Project created

Globals imported

There was an error while trying to export your project. Please try again or contact us.