@fxshelf/button-kit
Version:
Animated button shelf for React and Vue — switch styles by variant string. Zero animation-lib deps. Copy-as-source friendly.
18 lines (14 loc) • 888 B
TypeScript
import * as react from 'react';
import { ButtonHTMLAttributes, ReactNode, CSSProperties } from 'react';
/** Built-in button looks. Pass any of these as `variant`. */
declare const BUTTON_VARIANTS: readonly ["solid", "outline", "soft", "glow", "neon", "shimmer", "chroma", "liquid", "wipe", "glass"];
type ButtonVariant = (typeof BUTTON_VARIANTS)[number];
type ButtonProps = Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'className' | 'style' | 'children'> & {
/** Switch look by name: solid | outline | soft | glow | neon | shimmer | chroma | liquid | wipe | glass. */
variant?: ButtonVariant | (string & {});
children?: ReactNode;
className?: string;
style?: CSSProperties;
};
declare function Button({ variant, children, className, style, type, ...rest }: ButtonProps): react.JSX.Element;
export { BUTTON_VARIANTS, Button, type ButtonProps, type ButtonVariant };