Radio

Glass radio buttons in a radio group.

Installation#

pnpmnpmyarnbun
$ pnpm dlx shadcn@latest add @liquikit/radio

Needs the @liquikit registry in your components.json. Set it up once.

Usage#

import { Radio, RadioGroup } from "@/components/liquikit/radio"
<RadioGroup defaultValue="auto" aria-label="Appearance">
  <Radio value="light">Light</Radio>
  <Radio value="dark">Dark</Radio>
  <Radio value="auto">Automatic</Radio>
</RadioGroup>

API Reference#

Radio

PropTypeDefault
theme"light" | "dark"

Light or dark glass. Falls back to the nearest GlassThemeProvider, then light.

—
lensPartial<LensProfile>

Overrides for the lens profile, such as thickness, bevel, ior and magnification.

—
liquidnumber

How far the glass squashes and stretches as it moves. 0 keeps it rigid.

—
refraction"interactive" | "always"

When the glass bends the page. interactive bends it while the component is pressed, dragged or focused, always bends it all the time.

"interactive"
childrenReactNode

The content.

—

Also takes every prop of Base UI's radio, plus className and style.

RadioGroup

Takes every prop of Base UI's radio group, plus className and style.