Components
Works like a native radio button with value passed to the form on submission, in controlled or uncontrolled mode. Comes in three sizes, supports error and disabled states, and a RadioGroup compound for exclusive selection with any layout, FormControl group labels and card-based composition.
npx @21st-dev/cli add reshaped/reshaped-radioLoading preview...
import { Reshaped, View } from "reshaped/bundle";
import Radio from "@/components/ui/reshaped-radio";
export default function Demo() {
return (
<Reshaped theme="slate">
<div style={{ margin: "0 auto", padding: 24, display: "flex", justifyContent: "center" }}>
<View gap={2}>
<Radio name="animal" value="dog" checked>
Controlled
</Radio>
<Radio name="animal" value="cat" defaultChecked>
Uncontrolled
</Radio>
</View>
</div>
</Reshaped>
);
}
Loading preview...
Loading preview...
Loading preview...
Loading preview...
Loading preview...
Loading preview...
Loading preview...
Loading preview...