lotusui
A Go design system for desktop and mobile — one codebase, native apps. Web when you want it.
GitHub

Button

Six variants × seven sizes × any color, options-driven.

One button, configured by ButtonProps. State lives in the caller's widget.Clickable; every visual state below walks the theme's tokens and scale steps, so a custom theme restyles all of it. Pressing nudges the button 1dp down — the same tactile response on every variant; the pointer cursor signals interactivity. Anchor-style rendering (as-link) and RTL are "from the web": a Link-variant button IS the link here, and RTL layout is not yet supported by the toolkit.

Installation

Use the module import (the default), or own the source: lotusui add vendors the component into your app and lotusui update keeps the copy mergeable — see Registry.

Go
go get github.com/ikaito-com/lotusui

# or vendor the source into your app:
go run github.com/ikaito-com/lotusui/cmd/lotusui add button

Usage

open demo ↗

Secondary

The muted solid for auxiliary actions — quiet next to a Default.

open demo ↗

Destructive

The danger solid — Delete-class actions exclusively.

open demo ↗

Outline

Bordered with quiet ink; fills faintly on hover.

open demo ↗

Ghost

No chrome until hovered — toolbars, dense rows.

open demo ↗

Icon

An empty label with IconStart renders an icon-only, square-padded button.

open demo ↗

With icon

IconStart/IconEnd render beside the label, tinted with the button's own ink and sized to its text.

open demo ↗

Rounded

Rounded renders the pill form — full-round corners on any variant.

open demo ↗

Loading

Loading disables input and shows a spinner over the label (width preserved); LoadingText swaps the label instead, spinner at the start.

open demo ↗

Sizes

Seven presets on the shared Size scale — 2XS through 2XL, text and padding moving together.

open demo ↗

Color

Color re-colors any variant from a ColorScale — one anchor in, the whole interaction ladder out (.500 base, .600 hover, .700 pressed): a custom color can never fall out of step with its hover and pressed states.

open demo ↗

Scheme

Scheme wins over Color and the variant's role scheme: full manual control of every slot.

open demo ↗

Disabled

Disabled walks a brighter step of the button's own color scale — same hue, quieter chrome (Soft fills lift to Subtle; Color solids mute to .200 fill / .600 ink; outline/ghost/link ink softens) — and drops the pointer cursor, hover fill, and press nudge.

open demo ↗

Cursor

Buttons render the pointer cursor whenever they are enabled — interactivity is signalled by the cursor, the hover fill, and the press nudge together. Disabled buttons drop all three.

Group

There is no group component on purpose: HStack IS the group — buttons are widgets, so grouping is ordinary composition. (An attached, shared-border group is on the roadmap.)

open demo ↗

Keyboard focus

A focused button renders a 2dp ring in the theme's FocusRing token — focus is never signalled by color alone. FullWidth makes any button span the column; RightAligned anchors a dialog's button row to the right edge.

API

OptionTypeDescription
VariantButtonVariantButtonDefault (default), ButtonSecondary, ButtonDestructive, ButtonOutline, ButtonGhost, ButtonLink.
SizeSizeSize2XS … Size2XL, SizeMD default — the shared size presets.
ColorColorScaleRe-colors the variant from a scale; the interaction ladder derives from it.
Scheme*SchemeWins over Color: full manual slot control — e.g. Teal.SoftScheme().
IconStart / IconEndstringEmbedded icon names beside the label; empty label + IconStart = icon-only.
RoundedboolThe pill form — full-round corners.
LoadingboolSpinner over the label (width kept), input off.
LoadingTextstringReplaces the label while Loading, spinner at the start.
DisabledboolBrighter same-hue step of the button's scale; swallows clicks and drops the pointer cursor.

lotusui is a Go design system for native desktop and mobile — and the web when you want it. Docs demos are the real components (WebAssembly) — one gallery app, each Preview an iframe addressed by URL hash.