UNPKG

@mui/material

Version:

Quickly build beautiful React apps. MUI 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.

70 lines (67 loc) 1.76 kB
import * as React from 'react'; import { SxProps } from '@mui/system'; import { InternalStandardProps as StandardProps } from '..'; import { FormLabelProps } from '../FormLabel'; import { Theme } from '../styles'; import { InputLabelClasses } from './inputLabelClasses'; export interface InputLabelProps extends StandardProps<FormLabelProps> { /** * The content of the component. */ children?: React.ReactNode; /** * Override or extend the styles applied to the component. */ classes?: Partial<InputLabelClasses>; color?: FormLabelProps['color']; /** * If `true`, the transition animation is disabled. * @default false */ disableAnimation?: boolean; /** * If `true`, the component is disabled. */ disabled?: boolean; /** * If `true`, the label is displayed in an error state. */ error?: boolean; /** * If `true`, the `input` of this label is focused. */ focused?: boolean; /** * If `dense`, will adjust vertical spacing. This is normally obtained via context from * FormControl. */ margin?: 'dense'; /** * if `true`, the label will indicate that the `input` is required. */ required?: boolean; /** * If `true`, the label is shrunk. */ shrink?: boolean; /** * The system prop that allows defining system overrides as well as additional CSS styles. */ sx?: SxProps<Theme>; /** * The variant to use. */ variant?: 'standard' | 'outlined' | 'filled'; } /** * * Demos: * * - [Text Fields](https://mui.com/components/text-fields/) * * API: * * - [InputLabel API](https://mui.com/api/input-label/) * - inherits [FormLabel API](https://mui.com/api/form-label/) */ export default function InputLabel(props: InputLabelProps): JSX.Element;