Button
A styled <button> with MavKit’s variant/size system, a loading state, and an optional pinned Badge.
Usage
import { Button } from '@mav-labs-inc/mavkit-react'
import { Bell } from 'lucide-react'
<Button variant="outline" size="sm" loading={saving}>
Save
</Button>
<Button icon badge={3} aria-label="Notifications">
<Bell size={18} />
</Button>Examples
Variants
Sizes
States
With a badge
Set badge to pin a Badge to the button’s top-right corner — useful for unread counts on icon buttons. badgeVariant (default 'danger') and badgeSize (default 'sm') style it.
3new
Props
Button accepts every native <button> attribute in addition to the props below.
Styling a custom element as a button
buttonClasses — the class-name generator Button calls internally — is also exported directly, for styling a non-<button> element (an <a>, for instance) the same way:
import { buttonClasses } from '@mav-labs-inc/mavkit-react'
<a href="/docs" className={buttonClasses({ variant: 'outline' })}>
Docs
</a>Last updated on