Twitter2.4k

Button

Displays a callout for user attention.

Installation

ng g @spartan-ng/cli:ui button

Usage

import { HlmButtonImports } from '@spartan-ng/helm/button';
<button hlmBtn>Button</button>

Cursor

Tailwind v4 switched from cursor: pointer to cursor: default for button component.

If you want to keep the cursor: pointer behavior, add the following code to your CSS file:

src/styles.css
@layer base {
  button:not(:disabled),
  [role="button"]:not(:disabled) {
    cursor: pointer;
  }
}

Examples

Size

Default

Outline

Secondary

Ghost

Destructive

Icon

With Icon

Rounded

Spinner

As Anchor

Brain API

BrnButton

Selector: a[brnButton], button[brnButton]

Inputs

PropTypeDefaultDescription
disabled boolean false -

Helm API

HlmButton

Selector: button[hlmBtn], a[hlmBtn]

ExportAs: hlmBtn

Inputs

PropTypeDefaultDescription
variant ButtonVariants['variant'] this._config.variant -
size ButtonVariants['size'] this._config.size -
Button Group Breadcrumb