DocsComponentsForms
Radio
React example follows below.
ts
import { Radio } from "@grassroot/ui-react"; <Radio name="engagement" defaultChecked label="Embedded team" /><Radio name="engagement" label="Fixed-scope project" /><Radio name="engagement" label="Advisory / fractional" />ts
<script setup lang="ts">import { Radio } from "@grassroot/ui-vue";</script> <template> <Radio name="engagement" default-checked label="Embedded team" /> <Radio name="engagement" label="Fixed-scope project" /> <Radio name="engagement" label="Advisory / fractional" /></template>No translated snippet for this adapter yet.
ts
<script lang="ts"> import { Radio } from "@grassroot/ui-svelte";</script> <Radio name="engagement" defaultChecked label="Embedded team" /><Radio name="engagement" label="Fixed-scope project" /><Radio name="engagement" label="Advisory / fractional" />ts
import { Radio } from "@grassroot/ui-solid"; export function Example() { return ( <> <Radio name="engagement" defaultChecked label="Embedded team" /> <Radio name="engagement" label="Fixed-scope project" /> <Radio name="engagement" label="Advisory / fractional" /> </> );}Installation
bash
pnpm dlx grassroot add ui/radiobash
npx grassroot@latest add ui/radiobash
yarn dlx grassroot add ui/radiobash
bunx grassroot add ui/radioAPI Reference
| Prop | Type | Default |
|---|---|---|
label | React.ReactNode | — |
toneBrand colour of the selected ring + dot. | Tone | undefined | "accent" |