Forms

Control card

@xui/control-card

A selectable card wrapping a label and a checkbox/radio/switch indicator. The whole card is the control — click or press Space/Enter to toggle — and it shows an accented "selected" style while checked. Full ControlValueAccessor.

Install

pnpm add @xui/control-card

Add the barrel to a standalone component's imports:

import { XuiControlCardImports } from '@xui/control-card';

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

Examples

Checkbox

Loading preview…

Switch

Loading preview…

Radio

Loading preview…

Disabled

Loading preview…

API

XuiControlCard

componentxui-control-card

A selectable card wrapping a label and a control indicator. The card itself is the interactive control — click or press Space/Enter to toggle — so there is no nested interactive element. type chooses the checkbox/radio/switch look and the matching ARIA role.

Variants

AxisOptionsDefaultselectedtruefalsefalse

Inputs

NameTypeDefaultclassClassValueExtra classes, merged into the component's own rather than replacing them.''typeXuiControlCardTypeWhich control the card wraps — a checkbox, a radio or a switch. Picks both the rendered control and the selection semantics.'checkbox'checkedtwo-waybooleanThe checked/selected state. Two-way bindable with [(checked)].falsedisabledbooleanBlock interaction and dim the card, including the control inside it.falseshowAsSelectedWhenCheckedbooleanWhether a checked card shows the selected (accented) appearance.true

Source

libs/ui/control-card/xui

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