The bq-button component is a versatile, accessible button element supporting multiple variants, sizes, loading states, accessible naming overrides, and icon slots.
<bq-button>Click me</bq-button>
<bq-button variant="secondary">Secondary</bq-button>
<bq-button variant="outline">Outline</bq-button>
<bq-button variant="ghost">Ghost</bq-button>
<bq-button variant="danger">Delete</bq-button><bq-button size="sm">Small</bq-button>
<bq-button size="md">Medium</bq-button>
<bq-button size="lg">Large</bq-button>
<bq-button size="xl">Extra Large</bq-button><bq-button loading>Loading…</bq-button>When loading is enabled, the inner control exposes aria-busy="true" and adds a localized screen-reader-only loading announcement.
<bq-button disabled>Disabled</bq-button><bq-button href="https://example.com" target="_blank">
Open link
</bq-button>Links opened in a new tab automatically receive rel="noopener noreferrer".
<bq-button>
<span slot="prefix-icon">⬆</span>
Upload
</bq-button>
<bq-button variant="outline">
Download
<span slot="suffix-icon">⬇</span>
</bq-button>If you need an icon-only action, prefer bq-icon-button. If you intentionally render bq-button without visible text, provide a label so assistive technologies still announce a meaningful name.
<bq-button label="Refresh results">
<span slot="prefix-icon" aria-hidden="true">↻</span>
</bq-button>| Property | Type | Default | Description |
|---|---|---|---|
variant |
primary | secondary | outline | ghost | danger |
primary |
Visual style |
size |
sm | md | lg | xl |
md |
Button size |
disabled |
boolean |
false |
Disables interaction |
loading |
boolean |
false |
Shows spinner, disables interaction |
type |
button | submit | reset |
button |
Form submission type |
href |
string |
— | Renders as <a> when set |
target |
string |
— | Link target (used with href) |
label |
string |
— | Optional accessible label override, especially useful for icon-only usage |
| Event | Detail | Description |
|---|---|---|
bq-click |
{ originalEvent: MouseEvent } |
Fired on click (not fired when disabled/loading) |
| Slot | Description |
|---|---|
| (default) | Button label / content |
prefix-icon |
Icon before the label |
suffix-icon |
Icon after the label |
| Part | Description |
|---|---|
button |
The inner <button> or <a> element |
- Use the default slot for the visible button text whenever possible.
- Provide
labelwhen the control has no visible text content. - Loading buttons keep their current content visible, set
aria-busy, and expose a localized loading announcement for assistive technologies.