CLI previewInstall commands shown on this site are not released yet.

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/radio
bash
npx grassroot@latest add ui/radio
bash
yarn dlx grassroot add ui/radio
bash
bunx grassroot add ui/radio

API Reference

RadioProps
PropTypeDefault
labelReact.ReactNode
toneBrand colour of the selected ring + dot.Tone | undefined"accent"