@material-ui/core
Version:
Quickly build beautiful React apps. Material-UI is a simple and customizable component library to build faster, beautiful, and more accessible React applications. Follow your own design system, or start with Material Design.
62 lines (57 loc) • 1.82 kB
TypeScript
import * as React from 'react';
import { SxProps } from '@material-ui/system';
import { OverridableStringUnion } from '@material-ui/types';
import { InternalStandardProps as StandardProps, Theme } from '..';
import { SwitchBaseProps } from '../internal/SwitchBase';
import { RadioClasses } from './radioClasses';
export interface RadioPropsSizeOverrides {}
export interface RadioPropsColorOverrides {}
export interface RadioProps
extends StandardProps<SwitchBaseProps, 'checkedIcon' | 'color' | 'icon' | 'type'> {
/**
* The icon to display when the component is checked.
*/
checkedIcon?: React.ReactNode;
/**
* Override or extend the styles applied to the component.
*/
classes?: Partial<RadioClasses>;
/**
* The color of the component. It supports those theme colors that make sense for this component.
* @default 'primary'
*/
color?: OverridableStringUnion<
'primary' | 'secondary' | 'error' | 'info' | 'success' | 'warning' | 'default',
RadioPropsColorOverrides
>;
/**
* If `true`, the component is disabled.
*/
disabled?: boolean;
/**
* The icon to display when the component is unchecked.
*/
icon?: React.ReactNode;
/**
* The size of the component.
* `small` is equivalent to the dense radio styling.
* @default 'medium'
*/
size?: OverridableStringUnion<'small' | 'medium', RadioPropsSizeOverrides>;
/**
* The system prop that allows defining system overrides as well as additional CSS styles.
*/
sx?: SxProps<Theme>;
}
/**
*
* Demos:
*
* - [Radio Buttons](https://material-ui.com/components/radio-buttons/)
*
* API:
*
* - [Radio API](https://material-ui.com/api/radio/)
* - inherits [ButtonBase API](https://material-ui.com/api/button-base/)
*/
export default function Radio(props: RadioProps): JSX.Element;