UNPKG

claritykit-svelte

Version:

A comprehensive Svelte component library focused on accessibility, ADHD-optimized design, developer experience, and full SSR compatibility

39 lines 1.52 kB
import type { Snippet } from 'svelte'; type $$ComponentProps = { variant?: 'primary' | 'secondary' | 'tertiary' | 'destructive' | 'ghost'; size?: 'sm' | 'md' | 'lg'; state?: 'loading' | 'disabled' | undefined; fullWidth?: boolean; type?: string; class?: string; onclick?: ((event: MouseEvent) => void) | null; onfocus?: ((event: FocusEvent) => void) | null; onblur?: ((event: FocusEvent) => void) | null; onmouseenter?: ((event: MouseEvent) => void) | null; onmouseleave?: ((event: MouseEvent) => void) | null; children?: Snippet; leftIcon?: Snippet; rightIcon?: Snippet; [key: string]: any; }; /** * Button * * Primary button component with consistent API. * SSR-compatible with safe event handling and loading states. * * @prop {string} [variant='primary'] - Button variant (primary, secondary, tertiary, destructive, ghost) * @prop {string} [size='md'] - Button size (sm, md, lg) * @prop {string} [state] - Button state (loading, disabled) * @prop {boolean} [fullWidth=false] - Whether button should take full width * @prop {string} [type='button'] - HTML button type * @prop {string} [className] - Additional CSS classes * * @slot default - Button content * @slot leftIcon - Icon to display on the left * @slot rightIcon - Icon to display on the right */ declare const Button: import("svelte").Component<$$ComponentProps, {}, "">; type Button = ReturnType<typeof Button>; export default Button; //# sourceMappingURL=Button.svelte.d.ts.map