UNPKG

svelte-autosize-input

Version:

Auto-width, auto-grow input component for Svelte. Dynamically adjusts input field width to grow or shrink with content. Includes customizable placeholders and constraints on minimum and maximum sizes.

46 lines (45 loc) 1.54 kB
import { SvelteComponent } from "svelte"; import type { HTMLInputAttributes } from 'svelte/elements'; declare const __propDef: { props: { updateInputWidth?: (() => void) | undefined; copyInputStyles?: (() => void) | undefined; } & HTMLInputAttributes & { value: string | number; placeholder?: string | undefined; placeholderIsMinWidth?: boolean | undefined; minWidth?: string | undefined; maxWidth?: string | undefined; type?: 'text' | 'email' | 'number' | 'tel' | 'url' | undefined; }; events: { focus: FocusEvent; blur: FocusEvent; change: Event; click: MouseEvent; focusin: FocusEvent; focusout: FocusEvent; keydown: KeyboardEvent; keypress: KeyboardEvent; keyup: KeyboardEvent; input: Event; mouseover: MouseEvent; mouseenter: MouseEvent; mouseleave: MouseEvent; paste: ClipboardEvent; wheel: WheelEvent; } & { [evt: string]: CustomEvent<any>; }; slots: {}; exports?: {} | undefined; bindings?: string | undefined; }; export type AutosizeInputProps = typeof __propDef.props; export type AutosizeInputEvents = typeof __propDef.events; export type AutosizeInputSlots = typeof __propDef.slots; export default class AutosizeInput extends SvelteComponent<AutosizeInputProps, AutosizeInputEvents, AutosizeInputSlots> { get updateInputWidth(): () => void; get copyInputStyles(): () => void; } export {};