@accelint/design-toolkit
Version:
An open-source component library to serve as part of the entire ecosystem of UX for Accelint.
50 lines (47 loc) • 1.77 kB
TypeScript
import * as react_jsx_runtime from 'react/jsx-runtime';
import * as react from 'react';
import { ContextValue } from 'react-aria-components';
import { RadioProps, RadioGroupProps } from './types.js';
import '../label/types.js';
declare const RadioContext: react.Context<ContextValue<RadioGroupProps, HTMLDivElement>>;
declare function RadioGroup({ ref, ...props }: RadioGroupProps): react_jsx_runtime.JSX.Element;
declare namespace RadioGroup {
var displayName: string;
}
/**
* Radio - A form control for exclusive selection within a group of options
*
* Provides accessible radio button functionality where only one option can be
* selected at a time within a group. Includes proper labeling, keyboard navigation,
* and visual feedback for selection states.
*
* @example
* // Basic radio group
* <Radio.Group label="Choose size">
* <Radio value="small">Small</Radio>
* <Radio value="medium">Medium</Radio>
* <Radio value="large">Large</Radio>
* </Radio.Group>
*
* @example
* // Radio group with default selection
* <Radio.Group defaultValue="medium" label="Size preference">
* <Radio value="small">Small (S)</Radio>
* <Radio value="medium">Medium (M)</Radio>
* <Radio value="large">Large (L)</Radio>
* </Radio.Group>
*
* @example
* // Disabled radio options
* <Radio.Group label="Shipping options">
* <Radio value="standard">Standard shipping</Radio>
* <Radio value="express">Express shipping</Radio>
* <Radio value="overnight" isDisabled>Overnight (unavailable)</Radio>
* </Radio.Group>
*/
declare function Radio({ classNames, children, ...rest }: RadioProps): react_jsx_runtime.JSX.Element;
declare namespace Radio {
var displayName: string;
var Group: typeof RadioGroup;
}
export { Radio, RadioContext };