Variant selector

Pick a variant (pills or colours).

With disabled options

Colors

API reference

Inputs

PropTypeDefaultDescription
optionsreadonly (string | VariantOption)[][]Available options, as plain strings or `VariantOption` objects.
type"color" | "pill"'pill'Render style: text pills or colour swatches.
labelstring'Variant'Accessible label for the radio group.
disabledbooleanfalseWhether the whole group is disabled.

Two-way models

Bind with [(name)], or one-way as an input.

PropTypeDefaultDescription
valuestring''Selected variant value. Two-way bindable with `[(value)]`.

Types

VariantOption

FieldTypeDescription
valuestringUnique value used as the selection identity.
label?stringDisplay text; defaults to the value when omitted.
color?stringCSS colour for the swatch when type is `color`.
disabled?false | trueWhether this option cannot be selected.

Every ng-blatui component also accepts a class input to merge extra Tailwind classes onto the host.