claritykit-svelte
Version:
A comprehensive Svelte component library focused on accessibility, ADHD-optimized design, developer experience, and full SSR compatibility
50 lines • 1.31 kB
TypeScript
/**
* Badge component type definitions
*/
export type BadgeVariant = 'default' | 'dot' | 'numeric';
export type BadgeSize = 'sm' | 'md' | 'lg';
export type BadgeColor = 'accent' | 'success' | 'warning' | 'error' | 'info' | 'neutral';
export type BadgePosition = 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left';
export interface BadgeProps {
/**
* The visual style of the badge
* @default 'default'
*/
variant?: BadgeVariant;
/**
* The size of the badge
* @default 'md'
*/
size?: BadgeSize;
/**
* The color theme of the badge
* @default 'accent'
*/
color?: BadgeColor;
/**
* Numeric count to display (for numeric variant)
* Badge will be hidden if count is 0 or undefined for numeric variant
*/
count?: number;
/**
* Maximum count to display before showing "maxCount+"
* @default 99
*/
maxCount?: number;
/**
* Whether to show pulse animation
* @default false
*/
pulse?: boolean;
/**
* Position relative to parent element
* Requires parent to have position: relative
*/
position?: BadgePosition;
/**
* Additional CSS classes to apply
* @default ''
*/
className?: string;
}
//# sourceMappingURL=Badge.types.d.ts.map