UNPKG

svelte-5-ui-lib

Version:

Svelte 5 UI Lib is a UI library built from scratch to leverage Svelte 5's runes system, creating smooth, reactive components.

23 lines (22 loc) 769 B
import type { HTMLInputAttributes } from 'svelte/elements'; import type { FormSizeType, ColorName } from '../../types'; import type { Snippet } from 'svelte'; type InputValue = string | number | string[] | undefined; interface InputProps<T extends InputValue = string> extends Omit<HTMLInputAttributes, 'size' | 'children' | 'value'> { children?: Snippet<[ { class: string; } & Omit<InputProps<T>, 'children' | 'left' | 'right' | 'size'> ]>; left?: Snippet; right?: Snippet; size?: FormSizeType; value?: T; clearable?: boolean; color?: ColorName | 'default' | 'tinted'; classLeft?: string; classRight?: string; class?: string; divClass?: string; } export { type InputProps, type InputValue };