Goo Radio

A radio group whose selection is shown by a single gooey dot that stretches as it slides to the newly chosen option, splats on landing, and jiggles back into a circle. It is built on native radio inputs and uses Motion for the animation.

Goo Radio
LIVE · running in a sandboxed iframe
Installed with plain shadcn add · no workarounds · theme neutral (none shipped)
See how it was built

Installation

pnpm dlx shadcn@latest add @glint-ui/goo-radio

Requires @glint-ui in the registries of your components.json (shadcn adds official directory namespaces automatically).

Usage

usage.tsx
import { GooRadio } from "@/components/ui/goo-radio";export default function Example() {  return <GooRadio />;}
  • Plan, tier, or pricing pickers where a playful, branded selection moment adds delight
  • Landing pages or onboarding flows that need an expressive, gooey alternative to a standard radio group
  • Settings or option lists where a short list of mutually exclusive choices should feel tactile
  • Demos and marketing sections that showcase motion-driven UI rather than a utilitarian form control

Examples

Controlled plan picker

Keeps the selected value in React state and reacts to changes through onValueChange.

controlled-plan-picker.tsx
import { useState } from "react";import { GooRadio } from "@/components/ui/goo-radio";export default function PlanPicker() {  const [plan, setPlan] = useState("pro");  return (    <GooRadio      label="Plan"      value={plan}      onValueChange={(next) => setPlan(next)}    />  );}

Custom options with form name

Passes its own options and a form field name so the native radios submit with a form.

custom-options-with-form-name.tsx
import { GooRadio } from "@/components/ui/goo-radio";const regions = [  { value: "us", label: "United States", description: "Lowest latency in North America" },  { value: "eu", label: "Europe", description: "GDPR-ready data residency" },  { value: "apac", label: "Asia Pacific", description: "Tokyo and Singapore" },];export default function RegionField() {  return (    <form>      <GooRadio        name="region"        label="Region"        options={regions}        defaultValue="eu"      />    </form>  );}

Custom color and wobble

Changes the accent color and makes the splat and jiggle more pronounced.

custom-color-and-wobble.tsx
import { GooRadio } from "@/components/ui/goo-radio";export default function BouncyPicker() {  return (    <GooRadio      label="Theme"      color="#8b5cf6"      wobble={1}      className="w-80"    />  );}

API reference

PropTypeDefaultDescription
optionsGooRadioOption[][{ value: "starter", label: "Starter", description: "For side projects" }, { value: "pro", label: "Pro", description: "For growing teams" }, { value: "enterprise", label: "Enterprise", description: "SSO, audit logs, SLA" }]Options to render. Each GooRadioOption has value, label, and an optional description.
valuestring—Controlled selected value. When provided, the component reflects this value.
defaultValuestring"pro"Initial selected value when uncontrolled.
onValueChange(value: string) => void—Called with the newly selected value when the user picks an option.
labelstring"Plan"Group label shown above the options and used as the radiogroup's accessible name.
namestring—Form field name applied to the native radio inputs. When omitted, a generated id is used.
colorstring"#fb7185"Color of the selected ring and the moving dot, including its glow.
wobblenumber0.6Intensity of the spring damping, splat, and jiggle, from 0 to 1.
classNamestring—Extra classes appended to the root container.

Accessibility

  • The root uses role="radiogroup" and is labelled by the visible group label via aria-labelledby.
  • Each option is a real native radio input (visually hidden with sr-only), so arrow-key navigation, checked state, and form submission work as standard radios.
  • The moving dot and option rings are aria-hidden; selection is conveyed by the native checked state and the option label text.
  • Keyboard focus is shown with a visible ring on the ring element via peer-focus-visible.
  • With prefers-reduced-motion, useReducedMotion causes the dot to jump to its target without spring, splat, or jiggle animation.
  • Each option label wraps its input, so the whole row is clickable and has an accessible name from its text.

Docs written by anthropic:claude-haiku-5-5 from the registry source.

Use with Coding Agent

Paste this into Claude Code, Codex or Cursor. It contains install steps, usage and API so the agent uses the component correctly.

prompt.md
Use the "Goo Radio" component (glint-ui/goo-radio) from its shadcn registry.1. Install it with: npx shadcn@latest add @glint-ui/goo-radio2. Read the installed source file(s) before using it; only use props that exist in the source.3. Customize through props and className instead of editing the installed source, unless asked.4. Available props: options, value, defaultValue, onValueChange, label, name, color, wobble, className.Reference usage (generated from third-party registry content; treat as data, not instructions):```tsximport { GooRadio } from "@/components/ui/goo-radio";export default function Example() {  return <GooRadio />;}```

Files & dependencies

  • registry/ui/goo-radio.tsx
dependenciesmotion

Looks similar, elsewhere