@buun_group/brutalist-ui
Version:
A brutalist-styled component library
61 lines (60 loc) • 1.77 kB
TypeScript
/**
* @module Button
* @description A versatile button component that supports multiple variants, sizes, and states. Built with accessibility in mind and follows WAI-ARIA guidelines.
*/
import React, { ButtonHTMLAttributes } from 'react';
/**
* Props for the Button component
*/
export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
/**
* The visual style variant of the button
* @default 'default'
*/
variant?: 'default' | 'destructive' | 'outline' | 'ghost' | 'brutal' | 'primary' | 'secondary' | 'danger';
/**
* The size of the button
* @default 'md'
*/
size?: 'sm' | 'md' | 'lg' | 'xl';
/**
* Whether the button should take full width of its container
* @default false
*/
fullWidth?: boolean;
/**
* Shows a loading spinner and disables the button
* @default false
*/
loading?: boolean;
/**
* Icon to display on the left side of the button content
*/
leftIcon?: React.ReactNode;
/**
* Icon to display on the right side of the button content
*/
rightIcon?: React.ReactNode;
/**
* Whether to apply the brutalist shadow effect
* @default true
*/
brutalistShadow?: boolean;
/**
* Applies a glitch animation effect to the button
* @default false
*/
glitch?: boolean;
}
/**
* A versatile button component that supports multiple variants, sizes, and states.
* Built with accessibility in mind and follows WAI-ARIA guidelines.
*
* @example
* ```tsx
* <Button variant="brutal" size="lg" leftIcon={<FaRocket />}>
* Launch App
* </Button>
* ```
*/
export declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;