Skip to content

Radio group

One choice among a few options, all in view. Radio for short options, RadioCard for options that need a sentence of explanation.

Language
Appearance

Radios

Reminder channel
Plain text, without read receipts.
import { Radio, RadioGroup } from '@arbol-ai/ui';

<RadioGroup defaultValue="whatsapp" label="Reminder channel">
  <Radio value="whatsapp">WhatsApp</Radio>
  <Radio description="Plain text, without read receipts." value="sms">
    SMS
  </Radio>
  <Radio value="voice">Phone call</Radio>
</RadioGroup>

Cards

The whole card selects; in a row, the cards share the width.

Who answers new conversations
Answers 24/7 and books on your calendar.
Your team answers during office hours.
import { HeadsetIcon, RobotIcon } from '@phosphor-icons/react';
import { RadioCard, RadioGroup } from '@arbol-ai/ui';

<RadioGroup defaultValue="agent" label="Who answers new conversations" orientation="horizontal">
  <RadioCard description="Answers 24/7 and books on your calendar." value="agent">
    <RobotIcon aria-hidden className="size-4" /> The agent
  </RadioCard>
  <RadioCard description="Your team answers during office hours." value="team">
    <HeadsetIcon aria-hidden className="size-4" /> Your team
  </RadioCard>
</RadioGroup>

Required

Send the daily report to
Choose where to send the report.
import { Radio, RadioGroup } from '@arbol-ai/ui';

<RadioGroup
  errorMessage="Choose where to send the report."
  isInvalid
  isRequired
  label="Send the daily report to"
  orientation="horizontal"
>
  <Radio value="email">Email</Radio>
  <Radio value="whatsapp">WhatsApp</Radio>
</RadioGroup>

Source

The examples above are src/components/radio-group/radio-group.examples.tsx, which the library’s tests render too.

Type to search…

↑↓ navigate↵ selectEsc close