Skip to content

Instantly share code, notes, and snippets.

@chaance
Created January 21, 2026 23:45
Show Gist options
  • Select an option

  • Save chaance/fb2fef5d6eb741462fecfd02e9816063 to your computer and use it in GitHub Desktop.

Select an option

Save chaance/fb2fef5d6eb741462fecfd02e9816063 to your computer and use it in GitHub Desktop.
Better Radix Radio
// Current API stays the same.
// All components below exported with unstable_ prefix.
// Context provider that registers the item
// in parent context and provides item state
<RadioGroup.Item />
// Renders a button, same as the default
// behavior today. For specific use cases
// but we'll suggest not using it for most
// common cases.
<RadioGroup.Item>
<RadioGroup.ItemTrigger />
</RadioGroup.Item>
// Renders an html input for the common case
<RadioGroup.Item>
<RadioGroup.ItemInput />
</RadioGroup.Item>
// We'd probably want the same thing for checkboxes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment