@accelint/design-toolkit
Version:
An open-source component library to serve as part of the entire ecosystem of UX for Accelint.
38 lines (35 loc) • 1.23 kB
TypeScript
import * as react_jsx_runtime from 'react/jsx-runtime';
import * as react from 'react';
import { ContextValue } from 'react-aria-components';
import { ProviderProps } from '../../lib/types.js';
import { LabelProps } from './types.js';
declare const LabelContext: react.Context<ContextValue<LabelProps, HTMLLabelElement>>;
declare function LabelProvider({ children, ...props }: ProviderProps<LabelProps>): react_jsx_runtime.JSX.Element;
declare namespace LabelProvider {
var displayName: string;
}
/**
* Label - A semantic label component for form elements and content
*
* Provides accessible labeling for form controls with automatic handling of
* required/optional states. Integrates with React Aria form components to
* ensure proper accessibility and screen reader support.
*
* @example
* // Basic label
* <Label>Username</Label>
*
* @example
* // Required field label
* <Label isRequired>Email Address</Label>
*
* @example
* // Disabled label
* <Label isDisabled>Inactive Field</Label>
*/
declare function Label({ ref, ...props }: LabelProps): react_jsx_runtime.JSX.Element;
declare namespace Label {
var displayName: string;
var Provider: typeof LabelProvider;
}
export { Label, LabelContext };