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.

47 lines 1.47 kB
import * as React from 'react'; import { BaseUIComponentProps } from "../../utils/types.js"; /** * Groups all parts of the meter and provides the value for screen readers. * Renders a `<div>` element. * * Documentation: [Base UI Meter](https://base-ui.com/react/components/meter) */ export declare const MeterRoot: React.ForwardRefExoticComponent<MeterRootProps & React.RefAttributes<HTMLDivElement>>; export interface MeterRootState {} export interface MeterRootProps extends BaseUIComponentProps<'div', MeterRoot.State> { /** * A string value that provides a user-friendly name for `aria-valuenow`, the current value of the meter. */ 'aria-valuetext'?: React.AriaAttributes['aria-valuetext']; /** * Options to format the value. */ format?: Intl.NumberFormatOptions; /** * A function that returns a string value that provides a human-readable text alternative for `aria-valuenow`, the current value of the meter. */ getAriaValueText?: (formattedValue: string, value: number) => string; /** * The locale used by `Intl.NumberFormat` when formatting the value. * Defaults to the user's runtime locale. */ locale?: Intl.LocalesArgument; /** * The maximum value * @default 100 */ max?: number; /** * The minimum value * @default 0 */ min?: number; /** * The current value. */ value: number; } export declare namespace MeterRoot { type State = MeterRootState; type Props = MeterRootProps; }