@sandlada/mdc
Version:
@sandlada/mdc is an open source component library that follows the Material Design 3 design specifications.
45 lines • 1.46 kB
TypeScript
import { BaseTextField } from './internal/base-text-field';
declare global {
interface HTMLElementTagNameMap {
'mdc-text-field': MDCTextField;
}
}
/**
* Material Design 3 Text Field.
*
* Text fields let users enter and edit text. They typically appear in forms
* and dialogs.
*
* Variants:
* - `filled` : filled container with active indicator underline.
* - `outlined` : transparent container with 4-sided outline and label notch.
*
* @slot leading-icon - Icon placed before the input text.
* @slot trailing-icon - Icon placed after the input text.
* @slot prefix - Custom prefix element before input text.
* @slot suffix - Custom suffix element after input text.
* @slot supporting-text - Custom supporting text below container.
* @slot counter - Custom character counter element.
*
* @version
* Material Design 3
*
* @link
* https://m3.material.io/components/text-fields/overview
*
* @example
* ```html
* <!-- Filled variant (default) -->
* <mdc-text-field label="Email" type="email" required></mdc-text-field>
*
* <!-- Outlined variant -->
* <mdc-text-field variant="outlined" label="Username" clearable></mdc-text-field>
*
* <!-- Multiline textarea -->
* <mdc-text-field variant="outlined" label="Comments" type="textarea" rows="4"></mdc-text-field>
* ```
*/
export declare class MDCTextField extends BaseTextField {
static styles: import("lit").CSSResult[];
}
//# sourceMappingURL=text-field.d.ts.map