UNPKG

@base-ui/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.

26 lines 863 B
import * as React from 'react'; import type { BaseUIComponentProps, NativeButtonProps } from "../utils/types.js"; /** * A button component that can be used to trigger actions. * Renders a `<button>` element. * * Documentation: [Base UI Button](https://base-ui.com/react/components/button) */ export declare const Button: React.ForwardRefExoticComponent<Omit<ButtonProps, "ref"> & React.RefAttributes<HTMLElement>>; export interface ButtonState { /** * Whether the button should ignore user interaction. */ disabled: boolean; } export interface ButtonProps extends NativeButtonProps, BaseUIComponentProps<'button', ButtonState> { /** * Whether the button should be focusable when disabled. * @default false */ focusableWhenDisabled?: boolean; } export declare namespace Button { type State = ButtonState; type Props = ButtonProps; }