Button component is used for user interactions and form submission. It offers several customization options, including different sizes, variants, color schemes, icons, and loading states.tsx
import { Button } from "@arkyn/components";
tsx
<Button>Standard Button</Button>
lg, md, sm, and xs. Each size offers a different height and padding to suit the layout needs and visual hierarchy of the interface.tsx
<Button size="xs">Extra Small</Button><Button size="sm">Small</Button><Button size="md">Medium</Button><Button size="lg">Large</Button>
solid, outline, ghost, and invisible. Each variant offers a different visual style, allowing you to create hierarchies and emphasize different types of actions in the interface.tsx
<Button variant="solid">Solid</Button><Button variant="outline">Outline</Button><Button variant="ghost">Ghost</Button><Button variant="invisible">Invisible</Button>
primary, success, warning, danger, and info. Each scheme conveys a specific semantic meaning and helps users understand the type of action that will be performed.tsx
<Button scheme="primary">Primary</Button><Button scheme="success">Success</Button><Button scheme="warning">Warning</Button><Button scheme="danger">Danger</Button><Button scheme="info">Information</Button>
LucideIcon type.tsx
<Button leftIcon={Save} scheme="success">Save</Button><Button leftIcon={Search} scheme="info">Search</Button><Button leftIcon={Home}>Home</Button>
tsx
<Button rightIcon={Trash2} scheme="danger">Delete</Button><Button rightIcon={Edit} scheme="warning">Edit</Button><Button rightIcon={Send}>Send</Button>
tsx
<Button disabled>Disabled</Button><Button disabled scheme="success">Not available</Button><Button disabled leftIcon={Save}>Save</Button>
tsx
<Button isLoading>Loading...</Button>
tsx
<Button isLoading loadingText="Saving...">Save</Button>
isLoading - boolean (default: false)
Controls the loading state with the spinnerloadingText - string
Text to display during the loading statesize - "xs" | "sm" | "md" | "lg" (default: "md")
Button sizevariant - "solid" | "outline" | "ghost" | "invisible" (default: "solid")
Button visual variantscheme - "primary" | "success" | "warning" | "danger" | "info" (default:"primary"`)
Button Color SchemeleftIcon - LucideIcon
Optional icon to display on the leftrightIcon - LucideIcon
Optional icon to display on the right<button> are also supported.