Components

Button

A clickable action element with color, variant and size options, in every framework.

The Button is an action element with color, variant and size options, plus disabled, loading and block states. It's written once as a .uf.tsx component and compiled to all seven frameworks.

Here it is in the framework you picked in the Framework select:

import { IButton } from "@inkline/react";

export function Actions() {
  return <IButton label="Save" color="primary" />;
}

Pick another in the Framework select to compare them.

Variants

The Button has six style variants, set with variant, and nine colours, set with color:

<IButton label="Solid" variant="solid" />
<IButton label="Outline" variant="outline" />
<IButton label="Soft" variant="soft" />
<IButton label="Subtle" variant="subtle" />
<IButton label="Ghost" variant="ghost" />
<IButton label="Link" variant="link" />

Props

PropTypeDefaultDescription
labelstring—Button text content.
colorprimary | secondary | success | info | warning | error | light | dark | neutralneutralColor variant.
variantsolid | outline | soft | subtle | ghost | linksolidStyle variant.
sizexs | sm | md | lg | xlmdSize variant.
typebutton | submit | resetbuttonNative button type.
disabledbooleanfalseDisables the button.
loadingbooleanfalseShows a loading spinner.
blockbooleanfalseRenders a full-width button.
idstring—The native button's id.
ariaLabelstring—The native button's aria-label.
ariaDescribedbystring—The native button's aria-describedby.

Events

EventPayloadFires
clicknoneWhen the native button is clicked.

Listen with onClick in React and Solid, @click in Vue, onclick in Svelte, onClick$ in Qwik and (ufClick) in Angular. Astro renders on the server, so nothing listens there. click carries no event object: to call preventDefault() or read the modifier keys, listen to click on an element around the button, where the native event still bubbles.

Composition

IButton is a styled wrapper around a headless base, IButtonBase, which carries the behavior and none of the styling. Import the base from @inkline/<framework>/headless when you want the button's mechanics under your own CSS — see Your first component.

Copyright © 2026