Button
Buttons let users perform actions instantly, such as submitting forms, navigating pages, or triggering app functions. Built with comprehensive state management and semantic color coding, they communicate purpose and priority while maintaining consistent behavior across desktop and mobile environments.
import {ButtonModule} from "@qualcomm-ui/angular/button"Examples
Variants
Buttons come in three variants: fill, outline, and ghost. Customize these with the variant property.
<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.
<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
This grid shows all button combinations across variants and emphasis levels. The bottom row demonstrates the disabled state, which grays out the button regardless of variant or emphasis.
<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
| Prop | Type | Default |
|---|---|---|
The density of the button. Governs padding and height. | | 'default' | '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' | 'neutral' |
lucide-angular icon, positioned after the label. | | LucideIconData | |
To customize the element, provide it using the directive instead:
<svg q-end-icon icon="..."></svg> | ||
The size of the component and its icons. | | 'sm' | 'md' |
lucide-angular icon, positioned before the label. | | LucideIconData | |
To customize the element, provide it using the directive instead:
<svg q-start-icon icon="..."></svg> | ||
The variant of the button. | | 'fill' | 'fill' |
| 'default'
| 'compact'
booleantrue, pointer/focus
events are blocked, and the component is visually dimmed.| 'neutral'
| 'primary'
| 'danger'
| 'white-persistent'
| 'black-persistent'
| LucideIconData
| string
<svg q-end-icon icon="..."></svg>
| 'sm'
| 'md'
| 'lg'
| LucideIconData
| string
<svg q-start-icon icon="..."></svg>
| 'fill'
| 'ghost'
| 'outline'