Skip to content

Button

Versatile button with variants, sizes, loading state, and icon support.

Installation

Install Button from the Fluid Effect UI registry.

Playground

Variants

With Icons

Keyboard Shortcut

Loading & Disabled

API Reference

Types come from the public API. A dash indicates no default is documented here.

Button props

Public source
PropTypeDefaultDescription
childrenView.Children<Msg, R>—
leadingIconView.Content<Msg, R>—
shortcutstring | readonly string[]—Display-only key caps; callers own shortcut event handling. Hidden for icon-only buttons.
trailingIconView.Content<Msg, R>—
variant"primary" | "secondary" | "tertiary" | "ghost" | "destructive"—
buttonSizeButtonSize—
shapeShapeVariant—
type"button" | "reset" | "submit"—
disabledboolean—
loadingboolean—
activeboolean—
popupExpandedboolean—
classNamestring—
ariaLabelstring—
onPressNoInfer<Msg>—