doodle-ui

Radio

Sketch circle with a solid inner dot when selected. Must live inside RadioGroup.

<RadioGroup defaultValue="pen">
  <Radio value="pen" label="Pen" roughness={1.5} />
  <Radio value="pencil" label="Pencil" roughness={1.5} />
</RadioGroup>

Usage

import { RadioGroup, Radio } from "doodleui-react";

<RadioGroup defaultValue="pen">
  <Radio value="pen" label="Pen" />
  <Radio value="pencil" label="Pencil" />
</RadioGroup>

Props

RadioGroup accepts the Radix root API (value, onValueChange, orientation, disabled). Sketch props live on each Radio.

PropTypeDefaultNotes
valuestringrequiredValue within RadioGroup.
labelReactNodeundefinedCaption sitting to the right of the circle.
roughnessnumber1.5How wobbly the stroke is. 0 is almost geometric. 3+ is messy.
seednumberprovider / randomLocks the sketch. Omit to follow SketchSeedProvider (Shuffle) or a mount-time random seed.
sketchColorstring#1f1d1aStroke color. Also tints primary/accent fills where relevant.
classNamestringundefinedPassed through to the root element.
styleCSSPropertiesundefinedPassed through to the root element.