Skip to content
Velkin LogoVelkin Logo
Velkin
VELKIN/UI

Modern UI components for product teams and their AI agents. Lit core, typed wrappers, live MCP.

sales@velkinui.com

Product

  • Docs
  • Components
  • Studio
  • Pricing

Resources

  • Quick start
  • Blog
  • Changelog
  • Roadmap
  • Status

Project

  • About
  • Contact
  • License
  • Privacy
  • Terms

© 2026 Velkin. MIT core · Pro licenses available.

VELKIN

Radio Group

A radio group component with shared label and validation.

vu-radio-group · @velkin/react/radio-group

Copy page

Import

React
npm i @velkin/react

import { VuRadioGroup } from "@velkin/react/radio-group";

Examples

API

Tables match the member selected under Import.

Props

PropTypeDefaultDescription
orientationVuRadioGroupOrientation"horizontal"`horizontal` (default) wraps members; `vertical` stacks them.
legendstring""Plain-text in-group caption (muted vs string label); use slot="legend" for markup.
labelstring""Plain-text field label above the group; use slot="label" for markup.
hintstring""Plain-text helper under the group; use `slot="hint"` for markup.
ariaLabelstring""Accessible name when there is no visible label or legend.
variantVuRadioVariant"default"Forwarded to members that omit their own `variant`.
colorVuRadioColor"primary"Forwarded to members that omit their own `color`.
toneVuRadioTone"normal"Forwarded to members that omit their own `tone`.
sizeVuRadioSize"md"Forwarded to members that omit their own `size`.
namestring—Form field name forwarded to every member. Default: `""`.
defaultvaluestring—Value restored on `<form reset>` (`defaultvalue` attr).
formidstring | null—External `<form>` id (`formid` attr).
disabledbooleanfalseDisables every member while set (releases only attrs this group claimed).
readonlybooleanfalseForwarded to members; blocks selection (inherited from `FormControlBase`).
requiredbooleanfalseWhen true, `checkValidity` / `reportValidity` fail until one member is selected.
requiredMessagestring"This field is required."Message for host `valueMissing` when `required` and nothing is selected.
compactbooleanfalseTighter hint and error spacing.
showerrorsboolean—Shows validation after activation (`showerrors` attr). Default: `false`.
validationactiveboolean—Drives invalid styling after activation (`validationactive` attr). Default: `false`.
invalidbooleanfalseTrue when last validation found errors (`invalid` attr). Default: `false`.
valueundefined | stringundefinedSelected member `value`; set from JS to control selection. Omit to stay uncontrolled.
showErrorsbooleanfalseShows validation after activation.
validationActivebooleanfalseDrives invalid styling after activation.

Events

EventDetailDescription
vu-changeVuRadioGroupChangeDetailAfter a member is selected; `detail.value` mirrors `value` when controlled. Fired on the group host (not the member).
vu-invalidVuRadioGroupValidationErrorDetailWhen validation messages are recomputed while `validationActive`.

Slots

SlotDescription
—- One or more `<vu-radio>` members (other nodes are ignored for forwarding).
labelRich field label; takes precedence over string `label` when assigned.
hintOptional helper copy (HTML); overrides string `hint` when assigned.
errorReplaces default validation message list when assigned.
legendRich legend inside the group; takes precedence over string `legend` when assigned.

CSS parts

PartDescription
fieldColumn that stacks label, group, hint, and error.
labelField label wrapper (string `label` or `label` slot).
textString `label` when the `label` slot is empty.
base`role="radiogroup"` wrapper (legend + default slot).
legendIn-group caption row; styled quieter than part label.
fieldsFlex container around radios.
hintHelper text region (string `hint` or `hint` slot).
error-messageRegion for `slot="error"` or stacked default validation lines.
error-lineOne default validation string when `slot="error"` is empty.

Methods

MethodDescription
validateInput- Runs validators and syncs validity.

Types

NameDefinition
string | undefined
undefined | string
VuRadioColor
"default" | "primary" | "success" | "warning" | "danger"
VuRadioGroupChangeDetail
{ value: string; source: HTMLElement | null; }
VuRadioGroupOrientation
"horizontal" | "vertical"
VuRadioGroupValidationErrorDetail
{ errors: string[]; }
VuRadioSize
"sm" | "md" | "lg"
VuRadioTone
"subtle" | "normal" | "strong"
VuRadioVariant
"outline" | "default" | "soft"

Related

Companions

  • Radio`vu-radio`

Inputs

  • Advanced FilterAn advanced filter component with expression input and visual builder.
  • ButtonA clickable button component with multiple variants and states.
  • Button GroupA button group component with shared styling and optional selection.
  • CheckboxA checkbox component with label, hint, and validation.
  • Checkbox GroupA checkbox group component with shared label and validation.
  • Color AreaA two-dimensional color picker component for saturation and brightness.

Guides

  • FormsFormData, VuForm, and validation
  • EventsonVu* / v-model / e.detail
  • Appearancevariant, color, tone, size

Browse

  • Previous: OtpEarlier in the sidebar
  • Next: RangeLater in the sidebar
  • All componentsBrowse the full index