Sourceful Energy

Button

Displays a button or a component that looks like a button.

Installation

import { Button } from "@sourceful-energy/ui"

Usage

Variants

Default

Secondary

Destructive

Outline

Ghost

Link

Sizes

With Icon

Icon Only

Loading

Props

PropTypeDefaultDescription
variant"default" | "destructive" | "outline" | "secondary" | "ghost" | "link""default"The visual style of the button.
size"default" | "sm" | "lg" | "icon""default"The size of the button.
asChildbooleanfalseRender as a child component (e.g., Link).
disabledbooleanfalseWhether the button is disabled.

Accessibility

  • Uses native <button> element
  • Supports keyboard navigation (Tab, Enter, Space)
  • Disabled state prevents interaction and is announced to screen readers
  • Focus ring visible for keyboard users