radio-group-usage

Implement exclusive option selection in React forms with Zag.js and @techsio/ui-kit.

2|Updated Dec 2, 2024
One-click install
npx skills add https://github.com/TechsioCZ/new-engine --skill radio-group-usage
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: radio-group-usage
Source: https://github.com/TechsioCZ/new-engine/tree/main/libs/ui/skills/radio-group-usage
Command: npx skills add https://github.com/TechsioCZ/new-engine --skill radio-group-usage

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

RadioGroup usage helps developers implement exclusive option selection in forms using Zag.js and @techsio/ui-kit, ensuring accessible semantics and consistent styling.

Core Features & Use Cases

  • Provides labeled option groups with hidden inputs and controls for accessible radio interactions.
  • Supports variant, size, and validation status to match design tokens and form validation scenarios.
  • Demonstrates integration with the UI kit and Zag patterns for common form-select use cases such as payment methods, preferences, and survey questions.

Quick Start

Show me a minimal RadioGroup with two options named 'card' and 'paypal' using the provided components.

Frequently Asked Questions about radio-group-usage

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build accessible radio groups in React forms?

Accessible radio groups in React forms are built using Zag.js patterns and @techsio/ui-kit, which provide hidden inputs and labeled controls. This ensures proper semantic structure for exclusive option selection scenarios like payment methods or surveys.

Can I add validation status to a radio group component?

Yes, radio group components support validation status props to match form validation scenarios and design tokens. This allows you to communicate form errors and success states within exclusive option selection interfaces.

What's the best way to implement exclusive option selection with Zag.js?

The best way to implement exclusive option selection with Zag.js is integrating it with @techsio/ui-kit. This combination provides labeled option groups with accessible semantics, variant controls, and size props for consistent form UI styling.

Does this radio group pattern support size and variant props?

Yes, the radio group pattern supports variant, size, and validation props. These props allow the component to match design tokens and adapt to different form contexts while maintaining accessible radio interactions.

Do I need a specific UI kit to use Zag.js radio groups?

Yes, integrating Zag.js radio groups requires @techsio/ui-kit. The UI kit provides the styled component wrappers and design token integration needed to render labeled option groups with consistent visual variants.

Why use Zag.js for radio inputs instead of native HTML elements?

Zag.js provides radio group patterns that solve complex UI problems like accessible interactions and state management beyond native HTML elements. It integrates with UI kits to deliver labeled option groups with validation and variant support for React apps.