UNPKG

@base-ui-components/react

Version:

Base UI is a library of headless ('unstyled') React components and low-level hooks. You gain complete control over your app's CSS and accessibility features.

49 lines 1.7 kB
import * as React from 'react'; import type { BaseUIComponentProps } from "../../utils/types.js"; import type { MenuRoot } from "../root/MenuRoot.js"; /** * Groups related radio items. * Renders a `<div>` element. * * Documentation: [Base UI Menu](https://base-ui.com/react/components/menu) */ export declare const MenuRadioGroup: React.NamedExoticComponent<MenuRadioGroupProps & React.RefAttributes<Element>>; export interface MenuRadioGroupProps extends BaseUIComponentProps<'div', MenuRadioGroup.State> { /** * The content of the component. */ children?: React.ReactNode; /** * The controlled value of the radio item that should be currently selected. * * To render an uncontrolled radio group, use the `defaultValue` prop instead. */ value?: any; /** * The uncontrolled value of the radio item that should be initially selected. * * To render a controlled radio group, use the `value` prop instead. */ defaultValue?: any; /** * Function called when the selected value changes. */ onValueChange?: (value: any, eventDetails: MenuRadioGroup.ChangeEventDetails) => void; /** * Whether the component should ignore user interaction. * * @default false */ disabled?: boolean; } export type MenuRadioGroupState = { disabled: boolean; }; export type MenuRadioGroupChangeEventReason = MenuRoot.ChangeEventReason; export type MenuRadioGroupChangeEventDetails = MenuRoot.ChangeEventDetails; export declare namespace MenuRadioGroup { type Props = MenuRadioGroupProps; type State = MenuRadioGroupState; type ChangeEventReason = MenuRadioGroupChangeEventReason; type ChangeEventDetails = MenuRadioGroupChangeEventDetails; }