UNPKG

noph-ui

Version:

Noph UI is a modern, powerful UI library for Svelte 5, fully aligned with the Material 3 guidelines. Build stunning, consistent user interfaces with the efficiency and flexibility of Svelte and Google’s Material Design framework.

28 lines (27 loc) 940 B
import type { Snippet } from 'svelte'; import type { HTMLInputAttributes, HTMLTextareaAttributes } from 'svelte/elements'; interface FieldProps { label?: string; supportingText?: string; error?: boolean; errorText?: string; prefixText?: string; suffixText?: string; variant?: 'outlined' | 'filled'; start?: Snippet; end?: Snippet; noAsterisk?: boolean; element?: HTMLSpanElement; inputElement?: HTMLInputElement | HTMLTextAreaElement; populated?: boolean; reportValidity?: () => boolean; checkValidity?: () => boolean; } export interface InputFieldProps extends HTMLInputAttributes, FieldProps { type?: 'text' | 'password' | 'email' | 'number' | 'search' | 'tel' | 'url' | 'datetime-local'; } export interface TextAreaFieldProps extends HTMLTextareaAttributes, FieldProps { type: 'textarea'; } export type TextFieldProps = InputFieldProps | TextAreaFieldProps; export {};