a11ypros

Accessible Radio Group

Forms

About

A WCAG-compliant radio button group for selecting one option from a list, with fieldset-style grouping, error and helper text, and full ARIA/keyboard support. Ported from A11Y Pros' a11y-radio web component, mirroring their original React Radio implementation, licensed MIT.

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Accessible Radio Group to your project and fits it to your theme.

Code

How Accessible Radio Group is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

"use client";

import Radio from "@/components/ui/a11y-radio";
import { useState } from "react";

export default function RadioDemo() {
  const [value, setValue] = useState("");
  return (
    <Radio
      name="radio-default"
      label="Choose a size"
      value={value}
      onChange={(e) => setValue(e.target.value)}
      options={[
        { value: "small", label: "Small" },
        { value: "medium", label: "Medium" },
        { value: "large", label: "Large" },
      ]}
    />
  );
}

More by a11ypros

View all
  • Accessible Tooltip

    Accessible Tooltip

    1
  • Accessible Accordion

    Accessible Accordion

    1
  • A11y Label

    A11y Label

More in Forms

View all
  • Premium Auth

    Premium Auth

    500
  • Login 2

    Login 2

    7
  • Authentication Card

    Authentication Card

    47
  • Login 1

    Login 1

    52
  • Contact Card

    Contact Card

    1K
  • Login Form

    Login Form

    6
  • Form

    Form

    16
  • Book A Demo 3

    Book A Demo 3

    83