Actions

Button group

@xui/button-group

A row of buttons that read as one control. The group squares off the inner corners and collapses the shared borders, so the segments meet cleanly at any size.

Install

pnpm add @xui/button-group

Add the barrel to a standalone component's imports:

import { XuiButtonGroupImports } from '@xui/button-group';

@Component({
  imports: [XuiButtonGroupImports],
  // …
})

Examples

Default

Loading preview…

Outline buttons

Loading preview…

Vertical

Loading preview…

Fill

Loading preview…

Menu triggers

Loading preview…

Vertical menu triggers

Loading preview…

API

XuiButtonGroup

directive[xuiButtonGroup]

Joins adjacent buttons into one control, collapsing the radii and the doubled border between neighbours.

Variants

AxisOptionsDefaultorientationhorizontalverticalhorizontalfilltruefalsefalse

Inputs

NameTypeDefaultclassClassValueExtra classes, merged into the directive's own rather than replacing them.''orientation'horizontal' | 'vertical'Run the buttons in a row (default) or stack them vertically.this.config.orientationfillbooleanStretch the buttons to share the group's width (or height) equally.this.config.fillalignTextXuiButtonGroupAlignAlign every button's contents. Defaults to centred.'center'

Methods

setClass(classes: ClassValue): void

Source

libs/ui/button-group/xui

xUI 2.0.0 — Apache 2.0 licensed. Built with Angular and Tailwind CSS.