import type React from 'react'; import type { GlobalHTMLAttributes } from './types'; export interface RadioGroupProps extends GlobalHTMLAttributes { /** * The legend to show above the radio group. */ legend: React.ReactNode; /** * The name of the radios to use when submitting the form. */ name: string; /** * Additional hint or description for the entire radio group. * Supports text, links and block content such as paragraphs or Markdown output. */ hint?: React.ReactNode; /** * The radios. */ children: React.ReactNode; /** * Makes the radio group required. */ required?: boolean; /** * Fires when a radio is selected. */ onChange?: React.ChangeEventHandler; /** * Fires if the radio group fails validation on form submit. */ onInvalid?: React.FormEventHandler; /** * Disable all radios in the group. Use sparingly as it can be non-obvious to users why an input * has been disabled. Prefer showing validation messages and hints instead. * * @default false */ disabled?: boolean; /** * Makes the radios in the group read-only. Use sparingly, it's often preferred to present the * data as regular text or in a table instead. * * @default false */ readOnly?: boolean; /** * Id of a form element that the radios should be associated with. Defaults to the containing * form element. */ form?: string; enterKeyHint?: 'done' | 'go' | 'next' | 'previous' | 'search' | 'send'; /** * Set the error message of a radio group and mark it invalid. */ errorMessage?: string; /** * Force the radio group to be invalid. * * @default false */ 'aria-invalid'?: boolean; /** * Select the radio with this value. Either `value` or `defaultValue` must be set. * * Makes the radio group controlled. */ value?: string; /** * Select the uncontrolled radio with this value by default. Either `defaultValue` or `value` must * be set. */ defaultValue?: string; } /** * Use a Radio Group when users should select a single option from a list. */ export declare function RadioGroup({ legend, id, hint, name, children, required, defaultValue, value, hidden, dir, lang, translate, slot, errorMessage: errorMessageProp, onChange, form, enterKeyHint, readOnly, ...props }: RadioGroupProps): import("react/jsx-runtime").JSX.Element; export type RadioContextValue = Pick; export declare const RadioContext: React.Context; export declare const RadioContextProvider: React.Provider;