@biem/ui

Button

An action that lets users make a decision.

A button triggers an action and signals its importance. Its label names the outcome, so users can decide without reading the surrounding interface.

Usage

button-default.tsx
import { Button } from "@biem/ui/components/ui/button";

export function ButtonDefault() {
	return <Button>Review transfer</Button>;
}

Examples

Outline

Beside its main action, a screen often offers an alternative, such as going back or closing a dialog. Set to "outline", variant keeps that alternative a clear choice while the main action holds the strongest emphasis.

Secondary

Many steps support a task without completing it, such as adding a note to a delivery. Such a step recedes behind the main action when variant is set to "secondary", so users recognize at once which action finishes the task.

Ghost

Toolbars hold actions that users need again and again, and these actions should not compete with the content around them. Once variant is set to "ghost", a button steps back behind that content and remains within reach whenever it is needed.

Within running text or beside a figure, an action should not interrupt the reading. Here, variant set to "link" lends the button the emphasis of a link, yet it still triggers an action instead of leading users to another page.

Destructive

Removing a product from the assortment or deleting a price list often cannot be undone. Before users commit to such an action, variant set to "destructive" signals its consequence, so they recognize the risk while they can still decide against it.

Extra Small

Tables carry actions in every row, where a regular button would crowd the figures. In such rows, size set to "xs" lets a button claim the least room, so the data stays in the foreground.

Small

Filter bars and card headers hold several actions in little space. A button with size set to "sm" fits there without outweighing the content it belongs to.

Default Size

Most actions in forms, dialogs and page headers need no size of their own. Unless another size is set, a button takes the size "default", so actions keep the same scale across every product.

Large

One decisive action can define a whole screen, such as completing a stock count. With size set to "lg", a button gives that action more weight, so users find it at once.

With Icon

Where users scan many actions at once, an icon lets them recognize a familiar one before they read its label. The label still carries the meaning by naming the outcome, so the action stays clear even where the icon is unfamiliar.

Certain actions lead to another page instead of changing the current one. Through render, with nativeButton set to false, the button becomes a real link, so users can open the page in a new tab or share its address.

Disabled

An action is sometimes unavailable for a moment, until a form is complete or the data behind it has loaded. Marked as disabled, the button accepts no interaction and exposes its state to assistive technology, so users still see the action without triggering it by mistake.

API Reference

Propvariant
Type"default" | "outline" | "secondary" | "ghost" | "destructive" | "link"
Default"default"
DescriptionControls the visual emphasis and semantic role of the button.
Propsize
Type"default" | "xs" | "sm" | "lg" | "icon" | "icon-xs" | "icon-sm" | "icon-lg"
Default"default"
DescriptionControls the button dimensions and spacing.
Proprender
TypeReactElement | render function
Default–
DescriptionReplaces the native element or composes the button with another component.
PropnativeButton
Typeboolean
Defaulttrue
DescriptionDeclares whether the rendered element is a native button. Set it to false when render returns a different element.
Propdisabled
Typeboolean
Defaultfalse
DescriptionPrevents interaction and exposes the disabled state to assistive technology.