@loke/design-system
Version:
A design system with individually importable components
31 lines (30 loc) • 2.15 kB
text/typescript
import type { RadioGroupIndicatorProps, RadioGroupItemProps, RadioGroupProps } from "@loke/ui/radio-group";
declare const createRadioGroupScope: import("@loke/ui/context").CreateScope;
/**
* RadioGroup component for grouping radio buttons
*
* The RadioGroup component provides a way to group related radio buttons, ensuring that only one option can be selected at a time. It offers a consistent and accessible interface for creating radio button groups.
*
* Key features:
* - Manages the selection state of radio buttons within the group
* - Provides a consistent styling and layout for radio buttons
* - Ensures proper accessibility attributes for screen readers
* - Customizable appearance through className props
*
* Usage considerations:
* - Use when you need users to select one option from a list of mutually exclusive choices
* - Provide clear and concise labels for each radio button option
* - Consider using a default selected option when appropriate
* - Ensure sufficient spacing between options for easy interaction
* - Use in forms where a single selection from multiple options is required
*/
declare const RadioGroup: import("react").ForwardRefExoticComponent<Omit<RadioGroupProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
/**
* RadioGroupItem component for individual radio buttons
*
* This component renders a single radio button within the RadioGroup. It handles the styling and behavior of the radio button, including the label and the visual indicator.
*/
declare const RadioGroupItem: import("react").ForwardRefExoticComponent<Omit<RadioGroupItemProps & import("react").RefAttributes<HTMLButtonElement>, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
declare const RadioGroupIndicator: import("react").ForwardRefExoticComponent<Omit<RadioGroupIndicatorProps & import("react").RefAttributes<HTMLSpanElement>, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
export { RadioGroup, RadioGroupIndicator, RadioGroupItem, createRadioGroupScope, };
export type { RadioGroupProps, RadioGroupItemProps, RadioGroupIndicatorProps };