Button

Core

Triggers an action on the current view: submit, confirm, cancel, or start something in place, like copy or open a dialog.

Static preview: variants, sizes (24, 32, 36, 40), disabled and loading.

Usage

import { Button } from "@lusterui/react";

<Button variant="primary">Save changes</Button>
<Button>Cancel</Button>
<Button variant="danger" loading>Delete project</Button>

Props

PropTypeDefault
variantprimary secondary ghost ghost-icon danger danger-softsecondary
sizexs sm md lg (24, 32, 36, 40)md
loadingReplaces the label with a spinner and blocks activation. The width stays the same.false
disabledboolean–
iconIcon name. Icon-only buttons need an accessible name.–
asChildRenders your child element, e.g. an <a> that must look like a button.–

When to use something else

  • Blue text that takes the user somewhere: use Link. Button has no blue variant.
  • Choosing one of a few options: use Segmented.
  • Switching between sibling views: use Tabs.
  • Turning a setting on or off: use Switch.

Nucleo Icons, https://nucleoapp.com/. Copyright © Nucleo. Copyright notice. Component examples use Hugeicons free (Stroke Rounded), MIT License, Copyright (c) 2025 Hugeicons. License