Button

import {ButtonModule} from "@qualcomm-ui/angular/button"

Examples

Variants

Buttons come in three variants: fill, outline, and ghost. Customize these with the variant property.

Fill
Outline
Ghost
<button
  emphasis="primary"
  q-button
  startIcon="ExternalLink"
  variant="fill"
>
  Action
</button>
<button
  emphasis="primary"
  q-button
  startIcon="ExternalLink"
  variant="outline"
>
  Action
</button>
<button
  emphasis="primary"
  q-button
  startIcon="ExternalLink"
  variant="ghost"
>
  Action
</button>

Emphasis

Buttons can have different emphasis which affects the color of the button.

Neutral
Primary
Danger
<button
  emphasis="neutral"
  q-button
  startIcon="ExternalLink"
  variant="fill"
>
  Action
</button>
<button
  emphasis="primary"
  q-button
  startIcon="ExternalLink"
  variant="fill"
>
  Action
</button>
<button
  emphasis="danger"
  q-button
  startIcon="ExternalLink"
  variant="fill"
>
  Action
</button>

Sizes and Icons

Customize size using the size property. QUI buttons come with built-in support for lucide-react icons.

<button
  emphasis="primary"
  q-button
  size="sm"
  startIcon="ExternalLink"
  variant="fill"
>
  Action
</button>
<button
  emphasis="primary"
  q-button
  size="md"
  startIcon="ExternalLink"
  variant="fill"
>
  Action
</button>
<button
  emphasis="primary"
  q-button
  size="lg"
  startIcon="ExternalLink"
  variant="fill"
>
  Action
</button>

All Styles

FillOutlineGhost
<button emphasis="primary" q-button variant="fill">Action</button>
<button emphasis="primary" q-button variant="outline">Action</button>
<button emphasis="primary" q-button variant="ghost">Action</button>
<button emphasis="neutral" q-button variant="fill">Action</button>
<button emphasis="neutral" q-button variant="outline">Action</button>
<button emphasis="neutral" q-button variant="ghost">Action</button>
<button emphasis="danger" q-button variant="fill">Action</button>
<button emphasis="danger" q-button variant="outline">Action</button>
<button emphasis="danger" q-button variant="ghost">Action</button>
<button disabled emphasis="danger" q-button variant="fill">Action</button>
<button disabled emphasis="danger" q-button variant="outline">
  Action
</button>
<button disabled emphasis="danger" q-button variant="ghost">
  Action
</button>

API

q-button

PropTypeDefault
The density of the button. Governs padding and height.
| 'default'
| 'compact'
'default'
Controls whether the component is interactive. When true, pointer/focus events are blocked, and the component is visually dimmed.
boolean
false
The variant of the button.
| 'neutral'
| 'primary'
| 'danger'
| 'white-persistent'
| 'black-persistent'
'neutral'
lucide-angular icon, positioned after the label.
| LucideIconData
| string
The size of the component and its icons.
| 'sm'
| 'md'
| 'lg'
'md'
lucide-angular icon, positioned before the label.
| LucideIconData
| string
The variant of the button.
| 'fill'
| 'ghost'
| 'outline'
'fill'
Type
| 'default'
| 'compact'
Description
The density of the button. Governs padding and height.
Type
boolean
Description
Controls whether the component is interactive. When true, pointer/focus events are blocked, and the component is visually dimmed.
Type
| 'neutral'
| 'primary'
| 'danger'
| 'white-persistent'
| 'black-persistent'
Description
The variant of the button.
Type
| LucideIconData
| string
Description
lucide-angular icon, positioned after the label.
Type
| 'sm'
| 'md'
| 'lg'
Description
The size of the component and its icons.
Type
| LucideIconData
| string
Description
lucide-angular icon, positioned before the label.
Type
| 'fill'
| 'ghost'
| 'outline'
Description
The variant of the button.