# About BEEQ
Source: https://www.beeq.design/about/overview
Meet the team behind BEEQ and learn how we help [Endava](https://www.endava.com/) teams design and build consistent, accessible digital products.
Built by people who use the system too.
BEEQ grows through design reviews, implementation work, product feedback, accessibility conversations, and the small decisions that make shared systems reliable.
BEEQ is built and maintained by a cross-functional team at [Endava](https://www.endava.com/). We bring designers, developers, accessibility advocates, and product-minded contributors together around one goal: helping teams create better digital products with less friction.
We care about the details that make product work easier: shared foundations, reliable components, clear documentation, accessible patterns, and implementation guidance that reflects how teams actually build.
## What we do
We maintain guidance for colour, typography, spacing, radius, stroke, shadows, and layout so teams can make consistent visual decisions.
We build production-ready web components that work across HTML, React, Angular, Vue, and other modern frontend stacks.
We document how BEEQ works from both design and implementation perspectives, with examples that teams can adapt in real products.
We support tokens, themes, modes, and component CSS variables so products can adapt BEEQ without drifting away from the system.
We keep accessibility in the conversation from component APIs to usage guidance, so teams can make inclusive choices earlier.
We listen to feedback, review real product needs, and help teams find the right pattern when the answer is not obvious.
## How we work
BEEQ is open source, source-backed, and shaped by real product use. We try to keep the system practical: if a guideline does not help someone design, build, review, or maintain a product, it probably needs to be clearer.
* **We work in the open** — component development, bug fixes, and technical decisions happen on [GitHub](https://github.com/Endava/BEEQ).
* **We treat source as canonical** — documentation should match the current implementation, design tokens, public APIs, and accessibility behaviour.
* **We design for adoption** — BEEQ should give teams a strong default without locking them into unnecessary vendor-specific patterns.
* **We improve through feedback** — product teams, designers, developers, and contributors all help us see what needs to be refined next.
## Work with us
You do not need to be on the core team to help BEEQ get better. If something is unclear, missing, hard to use, or no longer aligned with real product work, we want to hear about it.
Use the feedback button on any docs page or open a [GitHub Issue](https://github.com/Endava/BEEQ/issues) when something needs attention.
Suggest new patterns, component improvements, documentation updates, or design guidance when you see a recurring product need.
Fix bugs, improve examples, update documentation, or help with component work. Start with the [Contribution Guidelines](https://github.com/Endava/BEEQ/blob/main/CONTRIBUTING.md).
If you are not sure where to start, contact us at [beeq@endava.com](mailto:beeq@endava.com). A good question is often the beginning of a better pattern.
## Resources
Follow the source code, issues, releases, and contribution workflow.
Explore component states, variants, and interactive examples.
Browse the component library and implementation guidance.
Reach out when you need help, feedback, or a conversation about BEEQ.
# Accordion
Source: https://www.beeq.design/components/accordion
Accordions let users show and hide sections of related content on a page.
Accordions organize related content into collapsible sections. Each section has a header that reveals or hides its panel content, helping people scan headings first and open only the information they need.
Use `bq-accordion-group` to wrap multiple `bq-accordion` items when you need to coordinate their behavior — for example, collapsing one when another opens.
## At a glance
* **Best for:** FAQs, advanced settings, grouped secondary information, and long pages where not every section needs to stay open.
* **Use with care:** If people need to compare sections side by side or keep several sections visible while working, an accordion may add friction.
* **Related components:** Use [tabs](/components/tab) when content belongs to a small set of peer views, or a simple show/hide pattern when only one section needs to expand.
## When to use
Use accordions when
* Related content can be grouped into clearly labeled sections
* Page length or visual density needs to be reduced without removing content
* People benefit from scanning headings before deciding what to open
Do not use accordions when
* People need to compare content across sections at the same time
* The content is short enough to show fully without harming readability
* Most sections are likely to be opened during the same task
## Anatomy
Each accordion item includes a clickable header and a collapsible panel. The header should set clear expectations about what the panel contains.
| Part | Element | Description |
| ----- | --------------- | -------------------------------------------------------------------------------------------------- |
| **1** | Container | The outer wrapper for the entire accordion item |
| **2** | Header | The clickable trigger that toggles the panel open/closed |
| **3** | Panel | The collapsible area containing the body content |
| **4** | Prefix | An optional suffix like an icon or avatar before the header text for additional context |
| **5** | Suffix | An optional prefix for additional context after the header text (less common than prefix) |
| **6** | Expand/Collapse | Icon indicating the current state of the panel and providing a visual affordance for interactivity |
## Design guidelines
Use accordions to reduce page density without hiding content that people need to complete the task. Keep each header specific, keep panel content focused, and use `bq-accordion-group` when several accordion items should behave as one coordinated set.
## Usage
The examples below cover the most common ways to use accordions in BEEQ. Start with a single accordion item when sections are independent, and use an accordion group when items should behave as one coordinated set.
### Default (collapsed)
Accordion items are collapsed by default. This works best when the heading alone gives enough context for someone to decide whether opening the section is worth it.
```html HTML icon="html5" theme={"theme":{"light":"one-light","dark":"night-owl"}}
Accordion title
This is the accordion panel content. It is hidden by default and revealed when the header is clicked.
```
```jsx React icon="react" theme={"theme":{"light":"one-light","dark":"night-owl"}}
import { BqAccordion } from "@beeq/react";
Accordion title
This is the accordion panel content. It is hidden by default and revealed when the header is clicked.
```
```ts Angular icon="angular" expandable theme={"theme":{"light":"one-light","dark":"night-owl"}}
import { Component } from "@angular/core";
import { BqAccordion } from "@beeq/angular/standalone";
@Component({
selector: "app-root",
standalone: true,
imports: [BqAccordion],
template: `
Accordion title
This is the accordion panel content. It is hidden by default and revealed when the header is clicked.
`,
})
export class AppComponent {}
```
```vue Vue icon="vuejs" expandable theme={"theme":{"light":"one-light","dark":"night-owl"}}
Accordion title
This is the accordion panel content. It is hidden by default and revealed when the header is clicked.
```
### Expanded by default
Use the `expanded` attribute when a section should start open — for example when the first item contains the most important information or when one section is expected to be reviewed first.
```html HTML icon="html5" theme={"theme":{"light":"one-light","dark":"night-owl"}}
Expanded by default
This panel is visible when the component first renders.
```
```jsx React icon="react" theme={"theme":{"light":"one-light","dark":"night-owl"}}
import { BqAccordion } from "@beeq/react";
Expanded by default
This panel is visible when the component first renders.
```
```ts Angular icon="angular" expandable theme={"theme":{"light":"one-light","dark":"night-owl"}}
import { Component } from "@angular/core";
import { BqAccordion } from "@beeq/angular/standalone";
@Component({
selector: "app-root",
standalone: true,
imports: [BqAccordion],
template: `
Expanded by default
This panel is visible when the component first renders.
`,
})
export class AppComponent {}
```
```vue Vue icon="vuejs" expandable theme={"theme":{"light":"one-light","dark":"night-owl"}}
Expanded by default
This panel is visible when the component first renders.
```
## Options
### Appearance
Two appearance values are available:
* **filled**: (default) adds a background color to the header for a contained look
* **ghost**: removes the background for a minimal style that blends with surrounding content.
Since `filled` is the default, there's no need to explicitly set `appearance="filled"` on the component.
```html HTML icon="html5" expandable theme={"theme":{"light":"one-light","dark":"night-owl"}}
Filled (default)
The header has a background color in the filled appearance.
Ghost
The header has no background in the ghost appearance.
The header has a background color in the filled appearance.
Ghost
The header has no background in the ghost appearance.
```
### Size
Accordions support two sizes: `medium` (default) and `small`.
The `small` size uses more compact padding and a smaller border radius, giving it a tighter look.
```html HTML icon="html5" expandable theme={"theme":{"light":"one-light","dark":"night-owl"}}
Medium accordion (default)
This is the medium size — more padding, suitable for most use cases.
Small accordion
This is the small size — compact padding for dense layouts and using small border radius.
```
```jsx React icon="react" expandable theme={"theme":{"light":"one-light","dark":"night-owl"}}
import { BqAccordion } from "@beeq/react";
Medium accordion (default)
This is the medium size — more padding, suitable for most use cases.
Small accordion
This is the small size — compact padding for dense layouts and using small border radius.
```
```ts Angular icon="angular" expandable theme={"theme":{"light":"one-light","dark":"night-owl"}}
import { Component } from "@angular/core";
import { BqAccordion } from "@beeq/angular/standalone";
@Component({
selector: "app-root",
standalone: true,
imports: [BqAccordion],
template: `
Medium accordion (default)
This is the medium size — more padding, suitable for most use cases.
Small accordion
This is the small size — compact padding for dense layouts and using small border radius.
`,
})
export class AppComponent {}
```
```vue Vue icon="vuejs" expandable theme={"theme":{"light":"one-light","dark":"night-owl"}}
Medium accordion (default)
This is the medium size — more padding, suitable for most use cases.
Small accordion
This is the small size — compact padding for dense layouts and using small border radius.
```
Use the `small` size in dense layouts or sidebars where space is limited.
### Group
Wrap related `bq-accordion` items inside `bq-accordion-group` when they should behave as a coordinated set. By default, only one item can stay open at a time. Add the `multiple` attribute when people may need to keep several sections open while reading or working.
The group also lets you set `appearance`, `size`, and `no-animation` once and have them cascade to all child accordions.
Attributes/Properties set in the group can be overridden by setting them directly on an individual accordion item.
### Single open (default group behavior)
Use the default group behavior when the sections are mutually exclusive or when keeping only one panel open helps reduce distraction.
```html HTML icon="html5" expandable theme={"theme":{"light":"one-light","dark":"night-owl"}}
Section one
Content for section one.
Section two
Content for section two.
Section three
Content for section three.
```
```jsx React icon="react" expandable theme={"theme":{"light":"one-light","dark":"night-owl"}}
import { BqAccordion, BqAccordionGroup } from "@beeq/react";
Section one
`,
})
export class AppComponent {}
```
```vue Vue icon="vuejs" expandable theme={"theme":{"light":"one-light","dark":"night-owl"}}
Section one
Content for section one.
Section two
Content for section two.
Section three
Content for section three.
```
### Multiple open
Allow multiple sections to stay open when people may need to review, reference, or complete information across several panels at once.
```html HTML icon="html5" expandable theme={"theme":{"light":"one-light","dark":"night-owl"}}
Section one
Content for section one.
Section two
Content for section two.
Section three
Content for section three.
```
```jsx React icon="react" expandable theme={"theme":{"light":"one-light","dark":"night-owl"}}
import { BqAccordion, BqAccordionGroup } from "@beeq/react";
Section one
`,
})
export class AppComponent {}
```
```vue Vue icon="vuejs" expandable theme={"theme":{"light":"one-light","dark":"night-owl"}}
Section one
Content for section one.
Section two
Content for section two.
Section three
Content for section three.
```
Use `expand-all` attribute (`expandAll` prop) on the group to open every accordion simultaneously — useful for print views or when people need to scan all content at once.
### Header slots
Use the `prefix` slot for adding elements like icons or avatars before the header text, and the `suffix` slot for elements after the text.
These provide additional context to help people scan and understand the sections.
```html HTML icon="html5" expandable theme={"theme":{"light":"one-light","dark":"night-owl"}}
With prefix icon
The header includes an icon in the prefix slot before the title text.
With prefix avatar
The prefix slot also accepts an avatar for person-related sections.
With suffix icon
The header includes an icon in the suffix slot after the title text.
The header includes an icon in the prefix slot before the title text.
With prefix avatar
The prefix slot also accepts an avatar for person-related sections.
With suffix icon
The header includes an icon in the suffix slot after the title text.
`,
})
export class AppComponent {}
```
```vue Vue icon="vuejs" expandable theme={"theme":{"light":"one-light","dark":"night-owl"}}
With prefix icon
The header includes an icon in the prefix slot before the title text.
With prefix avatar
The prefix slot also accepts an avatar for person-related sections.
With suffix icon
The header includes an icon in the suffix slot after the title text.
```
### States
### Disabled
Use `disabled` only when a section is temporarily unavailable. The header will not respond to interaction and the `bqOpen` / `bqClose` events will not fire.
```html HTML icon="html5" theme={"theme":{"light":"one-light","dark":"night-owl"}}
Disabled accordion
This content cannot be accessed while the accordion is disabled.
This content cannot be accessed while the accordion is disabled.
```
### Animation
By default, accordions animate the panel open and closed with a smooth height transition.
Add the `no-animation` attribute to disable this and make the panel appear/disappear instantly.
```html HTML icon="html5" expandable theme={"theme":{"light":"one-light","dark":"night-owl"}}
With animation (default)
The panel slides open and closed smoothly.
No animation
The panel appears and disappears instantly.
```
```jsx React icon="react" expandable theme={"theme":{"light":"one-light","dark":"night-owl"}}
import { BqAccordion } from "@beeq/react";
{/* Default: animated */}
With animation (default)
The panel slides open and closed smoothly.
{/* Instant: no animation */}
No animation
The panel appears and disappears instantly.
```
```ts Angular icon="angular" expandable theme={"theme":{"light":"one-light","dark":"night-owl"}}
import { Component } from "@angular/core";
import { BqAccordion } from "@beeq/angular/standalone";
@Component({
selector: "app-root",
standalone: true,
imports: [BqAccordion],
template: `
With animation (default)
The panel slides open and closed smoothly.
No animation
The panel appears and disappears instantly.
`,
})
export class AppComponent {}
```
```vue Vue icon="vuejs" expandable theme={"theme":{"light":"one-light","dark":"night-owl"}}
With animation (default)
The panel slides open and closed smoothly.
No animation
The panel appears and disappears instantly.
```
Use `no-animation` when reduced motion is a concern, or as a fallback for users who have `prefers-reduced-motion` set.
You can also set `no-animation` on `bq-accordion-group` to disable animation for all child accordions at once.
### Custom expand/collapse icons
The accordion provides two separate slots — `expand` and `collapse` — to replace the default plus/minus icons.
Use `expand` for the icon shown when the panel is closed and `collapse` for the icon shown when the panel is open.
Alternatively, combine a single icon in the `expand` slot with the `rotate` prop, which rotates the icon 180° when the accordion opens.
When using a single custom icon with `rotate`, make sure the icon is designed to be recognizable in both orientations (e.g., a caret or arrow)
and **it's place in the `expand` slot**, as the rotation is applied to that icon when the accordion is expanded.
```html HTML icon="html5" expandable theme={"theme":{"light":"one-light","dark":"night-owl"}}
Custom icons for expand and collapse
This accordion shows an open folder when expanded and a closed folder when collapsed.
Custom icon with rotation
This accordion uses a single caret icon that rotates 180° when expanded.
```
```jsx React icon="react" expandable theme={"theme":{"light":"one-light","dark":"night-owl"}}
import { BqAccordion, BqIcon } from "@beeq/react";
{/* Two separate icons */}
Custom icons for expand and collapse
This accordion shows an open folder when expanded and a closed folder when collapsed.
{/* Single icon + rotate */}
Custom icon with rotation
This accordion uses a single caret icon that rotates 180° when expanded.
```
```ts Angular icon="angular" expandable theme={"theme":{"light":"one-light","dark":"night-owl"}}
import { Component } from "@angular/core";
import { BqAccordion, BqIcon } from "@beeq/angular/standalone";
@Component({
selector: "app-root",
standalone: true,
imports: [BqAccordion, BqIcon],
template: `
Custom icons for expand and collapse
This accordion shows an open folder when expanded and a closed folder when collapsed.
Custom icon with rotation
This accordion uses a single caret icon that rotates 180° when expanded.
`,
})
export class AppComponent {}
```
```vue Vue icon="vuejs" expandable theme={"theme":{"light":"one-light","dark":"night-owl"}}
Custom icons for expand and collapse
This accordion shows an open folder when expanded and a closed folder when collapsed.
Custom icon with rotation
This accordion uses a single caret icon that rotates 180° when expanded.
```
### Custom header layout
Sometimes customizations are needed to meet some requirements.
For example, having the collapse/expand indicator in front instead of at the end (current position).
Developers can [rely on the exposed shadow DOM parts](/guides/styles#component-shadow-dom-parts) of the components to target elements inside it and tweak not only the look & feel but also the layout.
In the example below, we **define a custom CSS class** that targets the header part to reverse the order of the header content and the expand icon, and also applies flexbox styles to space out the header content.
Then, assuming the custom CSS file is imported in the project, we apply the custom class to the accordion to achieve the desired header layout.
```css styles.css icon="css" expandable theme={"theme":{"light":"one-light","dark":"night-owl"}}
.my-accordion {
&::part(header) {
flex-direction: row-reverse;
}
div[slot="header"] {
display: flex;
justify-content: space-between;
}
}
```
```html HTML icon="html5" expandable theme={"theme":{"light":"one-light","dark":"night-owl"}}
Order summary$123.99
This is an example of a custom header layout using the header slot and CSS part selectors to move the expand icon to the end and space out the header content.
Order summary$123.99
This is an example of a custom header layout using the header slot and CSS part selectors to move the expand icon to the end and space out the header content.
This is an example of a custom header layout using the header slot and CSS part selectors to move the expand icon to the end and space out the header content.
Order summary$123.99
This is an example of a custom header layout using the header slot and CSS part selectors to move the expand icon to the end and space out the header content.
This is an example of a custom header layout using the header slot and CSS part selectors to move the expand icon to the end and space out the header content.
Order summary$123.99
This is an example of a custom header layout using the header slot and CSS part selectors to move the expand icon to the end and space out the header content.
This is an example of a custom header layout using the header slot and CSS part selectors to move the expand icon to the end and space out the header content.
Order summary$123.99
This is an example of a custom header layout using the header slot and CSS part selectors to move the expand icon to the end and space out the header content.
```
## Best practices
Do
Write header labels that clearly describe the content inside. People should be able to predict what they will find before opening the section.
Don't
Do not nest accordions inside accordion panels. It creates unclear hierarchy and makes interaction patterns harder to follow.
Do
Use `bq-accordion-group` when items belong together and their open/close behavior should be coordinated.
Don't
Do not hide critical content inside accordions. If the information is essential to the page, it should usually remain visible.
Do
Consider `no-animation` or a reduced-motion strategy for workflows where motion may distract or overwhelm.
Don't
Do not use an accordion when a simpler show/hide pattern or a tab group would communicate the structure more clearly.
Do
Keep panel content focused on the promise made by the header so people can scan and decide quickly.
Don't
Do not use vague headers such as "More details" when a specific label would set clearer expectations.
## Accessibility
* **Keyboard navigation** — the header is a focusable button and can be activated with Enter or Space.
* **Clear headings** — header labels should describe the panel content clearly enough to be understood before expansion.
* **ARIA support** — the header exposes `aria-expanded`, and the panel visibility is reflected for assistive technologies.
* **Disabled state** — disabled accordions are removed from the tab order, so use this state sparingly and explain unavailable content when possible.
* **Reduced motion** — use `no-animation` when motion should be minimized, or respect the user's `prefers-reduced-motion` setting.
## API reference
### `bq-accordion` properties
| Property | Attribute | Description | Type | Default |
| ------------- | -------------- | ------------------------------------------------------------------------- | ----------------------- | ---------- |
| `appearance` | `appearance` | The appearance style of the accordion | `'filled'` \| `'ghost'` | `'filled'` |
| `disabled` | `disabled` | If `true`, the accordion header is not interactive | `boolean` | `false` |
| `expanded` | `expanded` | If `true`, the accordion panel is expanded | `boolean` | `false` |
| `noAnimation` | `no-animation` | If `true`, disables the open/close animation | `boolean` | `false` |
| `rotate` | `rotate` | If `true`, the expand icon rotates 180° when expanded instead of swapping | `boolean` | `false` |
| `size` | `size` | The size of the accordion | `'small'` \| `'medium'` | `'medium'` |
### `bq-accordion-group` properties
| Property | Attribute | Description | Type | Default |
| ------------- | -------------- | -------------------------------------------------------------------- | ----------------------- | ---------- |
| `appearance` | `appearance` | Appearance style applied to all child accordions | `'filled'` \| `'ghost'` | `'filled'` |
| `expandAll` | `expand-all` | If `true`, all child accordions are expanded | `boolean` | `false` |
| `noAnimation` | `no-animation` | If `true`, disables animation on all child accordions | `boolean` | `false` |
| `multiple` | `multiple` | If `true`, multiple accordion items can be expanded at the same time | `boolean` | `false` |
| `size` | `size` | Size applied to all child accordions | `'small'` \| `'medium'` | `'medium'` |
### Events
| Event | Description | Type |
| -------------- | ---------------------------------------------- | ------------------------------------- |
| `bqBlur` | Fires when the accordion loses focus | `CustomEvent` |
| `bqClick` | Fires when the accordion header is clicked | `CustomEvent` |
| `bqFocus` | Fires when the accordion gets focus | `CustomEvent` |
| `bqOpen` | Fires when the accordion panel starts to open | `CustomEvent` |
| `bqAfterOpen` | Fires after the open transition has completed | `CustomEvent` |
| `bqClose` | Fires when the accordion panel starts to close | `CustomEvent` |
| `bqAfterClose` | Fires after the close transition has completed | `CustomEvent` |
* In React, prefix events with `on`: `onBqBlur`, `onBqClick`, `onBqFocus`, `onBqOpen`, `onBqClose`, `onBqAfterOpen`, `onBqAfterClose`.
* In Angular, use the event binding syntax: `(bqBlur)`, `(bqClick)`, `(bqFocus)`, `(bqOpen)`, `(bqClose)`, etc.
* In Vue, use the `@` shorthand: `@bq-blur`, `@bq-click`, `@bq-focus`, `@bq-open`, `@bq-close`, etc.
### Slots
#### `bq-accordion`
| Slot | Description |
| ----------- | ------------------------------------------------------------------------- |
| *(default)* | The panel body content shown when the accordion is expanded |
| `collapse` | Custom icon shown when the accordion is expanded (clicking will collapse) |
| `expand` | Custom icon shown when the accordion is collapsed (clicking will expand) |
| `header` | The accordion header label (the clickable trigger) |
| `prefix` | Content before the header text — icon or avatar |
| `suffix` | Content after the header text — icon or status indicator |
#### `bq-accordion-group`
| Slot | Description |
| ----------- | ----------------------------------- |
| *(default)* | One or more `bq-accordion` elements |
### Shadow parts
#### `bq-accordion`
| Part | Description |
| -------- | ------------------------------------------------- |
| `base` | The `` element wrapping the accordion |
| `header` | The `` element — the clickable header |
| `panel` | The `
` containing the panel body content |
| `prefix` | The `
` wrapping the prefix slot content |
| `suffix` | The `
` wrapping the suffix slot content |
| `text` | The `
` wrapping the header text slot content |
#### `bq-accordion-group`
| Part | Description |
| ------ | ------------------------------------------- |
| `base` | The wrapper `
` for the accordion group |
### CSS custom properties
#### Size
| Variable | Description | Default |
| -------------------------------------- | -------------------------------------------- | ---------------------- |
| `--bq-accordion--small-padding-y` | Small vertical padding | `var(--bq-spacing-xs)` |
| `--bq-accordion--small-padding-start` | Small start padding | `var(--bq-spacing-s)` |
| `--bq-accordion--small-padding-end` | Small end padding | `var(--bq-spacing-s)` |
| `--bq-accordion--small-gap` | Small gap between prefix, title, and suffix | `var(--bq-spacing-xs)` |
| `--bq-accordion--small-radius` | Small border radius | `var(--bq-radius--xs)` |
| `--bq-accordion--medium-padding-y` | Medium vertical padding | `var(--bq-spacing-s)` |
| `--bq-accordion--medium-padding-start` | Medium start padding | `var(--bq-spacing-m)` |
| `--bq-accordion--medium-padding-end` | Medium end padding | `var(--bq-spacing-m)` |
| `--bq-accordion--medium-gap` | Medium gap between prefix, title, and suffix | `var(--bq-spacing-m)` |
| `--bq-accordion--medium-radius` | Medium border radius | `var(--bq-radius--m)` |
#### Border (collapsed state)
| Variable | Description | Default |
| ---------------------------------------- | ---------------------- | ------------- |
| `--bq-accordion--collapsed-border-color` | Collapsed border color | `transparent` |
| `--bq-accordion--collapsed-border-style` | Collapsed border style | `none` |
| `--bq-accordion--collapsed-border-width` | Collapsed border width | `unset` |
#### Border (expanded state)
| Variable | Description | Default |
| --------------------------------------- | --------------------- | ------------- |
| `--bq-accordion--expanded-border-color` | Expanded border color | `transparent` |
| `--bq-accordion--expanded-border-style` | Expanded border style | `none` |
| `--bq-accordion--expanded-border-width` | Expanded border width | `unset` |
#### Filled appearance
| Variable | Description | Default |
| --------------------------------------------- | ---------------------------------- | ------------------------- |
| `--bq-accordion--filled-collapsed-background` | Filled collapsed header background | `var(--bq-ui--secondary)` |
| `--bq-accordion--filled-collapsed-text-color` | Filled collapsed header text color | `var(--bq-text--primary)` |
| `--bq-accordion--filled-expanded-background` | Filled expanded header background | `var(--bq-ui--brand-alt)` |
| `--bq-accordion--filled-expanded-text-color` | Filled expanded header text color | `var(--bq-text--primary)` |
#### Ghost appearance
| Variable | Description | Default |
| -------------------------------------------- | --------------------------------- | ------------------------- |
| `--bq-accordion--ghost-collapsed-background` | Ghost collapsed header background | `transparent` |
| `--bq-accordion--ghost-collapsed-text-color` | Ghost collapsed header text color | `var(--bq-text--primary)` |
| `--bq-accordion--ghost-expanded-background` | Ghost expanded header background | `transparent` |
| `--bq-accordion--ghost-expanded-text-color` | Ghost expanded header text color | `var(--bq-text--brand)` |
#### Panel — filled
| Variable | Description | Default |
| --------------------------------------------------- | ------------------------------------ | --------------------------- |
| `--bq-accordion--panel-filled-border-color` | Filled panel border color | `var(--bq-stroke--primary)` |
| `--bq-accordion--panel-filled-border-style` | Filled panel border style | `solid` |
| `--bq-accordion--panel-filled-border-width` | Filled panel border width | `var(--bq-stroke-s)` |
| `--bq-accordion--panel-small-filled-padding-y` | Small filled panel vertical padding | `var(--bq-spacing-s)` |
| `--bq-accordion--panel-small-filled-padding-start` | Small filled panel start padding | `var(--bq-spacing-s)` |
| `--bq-accordion--panel-small-filled-padding-end` | Small filled panel end padding | `var(--bq-spacing-s)` |
| `--bq-accordion--panel-medium-filled-padding-y` | Medium filled panel vertical padding | `var(--bq-spacing-m)` |
| `--bq-accordion--panel-medium-filled-padding-start` | Medium filled panel start padding | `var(--bq-spacing-m)` |
| `--bq-accordion--panel-medium-filled-padding-end` | Medium filled panel end padding | `var(--bq-spacing-m)` |
#### Panel — ghost
| Variable | Description | Default |
| -------------------------------------------------- | ----------------------------------- | ---------------------- |
| `--bq-accordion--panel-ghost-border-color` | Ghost panel border color | `transparent` |
| `--bq-accordion--panel-ghost-border-style` | Ghost panel border style | `none` |
| `--bq-accordion--panel-ghost-border-width` | Ghost panel border width | `unset` |
| `--bq-accordion--panel-small-ghost-padding-y` | Small ghost panel vertical padding | `var(--bq-spacing-s)` |
| `--bq-accordion--panel-small-ghost-padding-start` | Small ghost panel start padding | `var(--bq-spacing-l)` |
| `--bq-accordion--panel-small-ghost-padding-end` | Small ghost panel end padding | `var(--bq-spacing-l)` |
| `--bq-accordion--panel-medium-ghost-padding-y` | Medium ghost panel vertical padding | `var(--bq-spacing-m)` |
| `--bq-accordion--panel-medium-ghost-padding-start` | Medium ghost panel start padding | `var(--bq-spacing-xl)` |
| `--bq-accordion--panel-medium-ghost-padding-end` | Medium ghost panel end padding | `var(--bq-spacing-xl)` |
#### Group
| Variable | Description | Default |
| --------------------------- | -------------------------------------- | ---------------------- |
| `--bq-accordion-group--gap` | Gap between accordion items in a group | `var(--bq-spacing-xs)` |
Learn more about [styling with shadow parts](/guides/styles#component-shadow-dom-parts) and [CSS custom properties](/guides/styles#global-css-custom-properties).
## Resources
Use Storybook to test behavior and states interactively, or review the source if you need implementation details.
Explore all accordion configurations in Storybook
View the component source on GitHub
# Alert
Source: https://www.beeq.design/components/alert
An alert conveys status, progress, or required next steps to the user in a clear, contextual message.
Alert is a lightweight message surface for conveying status, progress, or required next steps in a clear and consistent way.
## When to use
Use alerts when
* You need to clearly and concisely convey important information
* A message applies to a page, card, section, or system-level state
* Users need feedback after submitting data, changing permissions, or completing an action
* Users need to know about errors, warnings, maintenance, upgrades, or time-sensitive tasks
Do not use alerts when
* The alert would disrupt a critical task
* The message overlaps essential content or important interface controls
* Its presence could confuse users or compete with a more relevant inline message
* A toast, notification, or field-level validation message would be more precise
## Patterns
Alerts can be used at different scopes, depending on what the message affects.
Use a global alert for messages that affect the full experience. Place it directly below the navigation.
Use a page alert when the message applies to the page as a whole, such as a loading failure or permission issue.
Place alerts close to the affected section so users can connect the message with the content it describes.
Use custom icons and CSS variables when a message has no built-in severity, but keep color and icon choices consistent.
## Anatomy
| Part | Element | Description |
| ----- | ------------ | -------------------------------------------------------------------- |
| **1** | Container | The alert surface that groups the message, icon, title, and actions |
| **2** | Icon | Status icon, or a custom icon when the alert uses the `default` type |
| **3** | Title | The alert title content in the default slot |
| **4** | Close button | Dismisses the alert unless `disable-close` is set |
| **5** | Description | Optional supporting content in the `body` slot |
| **6** | CTA button | Optional action content in the `footer` slot |
## Design guidelines
### Types
Use a basic alert when a short title gives users enough context to understand the message.
Add a description when users need supporting detail, recovery guidance, or a link to the next step.
Include an action when the alert asks users to resolve the message or view related details.
Place actions in the footer when users need to compare or choose between multiple next steps.
Set `border` to match the surface where the alert appears. Use the same radius scale as the surrounding layout.
## Usage
### Default
Use the `default` variant for general-purpose alerts. It lets you customize the `bq-icon` for messages with no associated severity.
Set `open` to show the alert. Use `show()` and `hide()` when visibility is controlled programmatically.
```html HTML icon="html5" expandable theme={"theme":{"light":"one-light","dark":"night-owl"}}
Title
Title
Description
Link
Title
Description
Link
ButtonButton
```
```jsx React icon="react" expandable theme={"theme":{"light":"one-light","dark":"night-owl"}}
import { BqAlert, BqButton, BqIcon } from "@beeq/react";
<>
Title
Title
Description
Link
Title
Description
Link
ButtonButton
>
```
```ts Angular icon="angular" expandable theme={"theme":{"light":"one-light","dark":"night-owl"}}
import { Component } from "@angular/core";
import { BqAlert, BqIcon, BqButton } from "@beeq/angular/standalone";
@Component({
selector: "app-root",
standalone: true,
imports: [BqAlert, BqIcon, BqButton],
template: `
Title
Title
Description
Link
Title
Description
Link
ButtonButton
`,
})
export class AppComponent {}
```
```vue Vue icon="vuejs" expandable theme={"theme":{"light":"one-light","dark":"night-owl"}}
Title
Title
Description
Link
Title
Description
Link
ButtonButton
```
Alert fills the width of its parent container.
### Info
Use the `info` variant when users need additional, non-critical information. It works well for context that helps users understand a state without requiring immediate action.
```html HTML icon="html5" expandable theme={"theme":{"light":"one-light","dark":"night-owl"}}
Title
Title
Description
Link
Title
Description
Link
ButtonButton
```
```jsx React icon="react" expandable theme={"theme":{"light":"one-light","dark":"night-owl"}}
import { BqAlert, BqButton } from "@beeq/react";
<>
Title
Title
Description
Link
Title
Description
Link
ButtonButton
>
```
```ts Angular icon="angular" expandable theme={"theme":{"light":"one-light","dark":"night-owl"}}
import { Component } from "@angular/core";
import { BqAlert, BqButton } from "@beeq/angular/standalone";
@Component({
selector: "app-root",
standalone: true,
imports: [BqAlert, BqButton],
template: `
Title
Title
Description
Link
Title
Description
Link
ButtonButton
`,
})
export class AppComponent {}
```
```vue Vue icon="vuejs" expandable theme={"theme":{"light":"one-light","dark":"night-owl"}}
Title
Title
Description
Link
Title
Description
Link
ButtonButton
```
### Success
Use the `success` variant to notify users about successful actions or positive outcomes. This type of alert is ideal for celebrating achievements, completed processes, or any operation that concludes successfully.
```html HTML icon="html5" expandable theme={"theme":{"light":"one-light","dark":"night-owl"}}
Title
Title
Description
Link
Title
Description
Link
ButtonButton
```
```jsx React icon="react" expandable theme={"theme":{"light":"one-light","dark":"night-owl"}}
import { BqAlert, BqButton } from "@beeq/react";
<>
Title
Title
Description
Link
Title
Description
Link
ButtonButton
>
```
```ts Angular icon="angular" expandable theme={"theme":{"light":"one-light","dark":"night-owl"}}
import { Component } from "@angular/core";
import { BqAlert, BqButton } from "@beeq/angular/standalone";
@Component({
selector: "app-root",
standalone: true,
imports: [BqAlert, BqButton],
template: `
Title
Title
Description
Link
Title
Description
Link
ButtonButton
`,
})
export class AppComponent {}
```
```vue Vue icon="vuejs" expandable theme={"theme":{"light":"one-light","dark":"night-owl"}}
Title
Title
Description
Link
Title
Description
Link
ButtonButton
```
### Warning
Use the `warning` variant to indicate potential issues or actions that users should approach with caution. This alert helps draw attention to situations that require careful consideration but may not be critical.
```html HTML icon="html5" expandable theme={"theme":{"light":"one-light","dark":"night-owl"}}
Title
Title
Description
Link
Title
Description
Link
ButtonButton
```
```jsx React icon="react" expandable theme={"theme":{"light":"one-light","dark":"night-owl"}}
import { BqAlert, BqButton } from "@beeq/react";
<>
Title
Title
Description
Link
Title
Description
Link
ButtonButton
>
```
```ts Angular icon="angular" expandable theme={"theme":{"light":"one-light","dark":"night-owl"}}
import { Component } from "@angular/core";
import { BqAlert, BqButton } from "@beeq/angular/standalone";
@Component({
selector: "app-root",
standalone: true,
imports: [BqAlert, BqButton],
template: `
Title
Title
Description
Link
Title
Description
Link
ButtonButton
`,
})
export class AppComponent {}
```
```vue Vue icon="vuejs" expandable theme={"theme":{"light":"one-light","dark":"night-owl"}}
Title
Title
Description
Link
Title
Description
Link
ButtonButton
```
### Error
Use the `error` variant for issues that require immediate attention. It works best for problems that block the task or prevent a successful outcome.
```html HTML icon="html5" expandable theme={"theme":{"light":"one-light","dark":"night-owl"}}
Title
Title
Description
Link
Title
Description
Link
ButtonButton
```
```jsx React icon="react" expandable theme={"theme":{"light":"one-light","dark":"night-owl"}}
import { BqAlert, BqButton } from "@beeq/react";
<>
Title
Title
Description
Link
Title
Description
Link
ButtonButton
>
```
```ts Angular icon="angular" expandable theme={"theme":{"light":"one-light","dark":"night-owl"}}
import { Component } from "@angular/core";
import { BqAlert, BqButton } from "@beeq/angular/standalone";
@Component({
selector: "app-root",
standalone: true,
imports: [BqAlert, BqButton],
template: `
Title
Title
Description
Link
Title
Description
Link
ButtonButton
`,
})
export class AppComponent {}
```
```vue Vue icon="vuejs" expandable theme={"theme":{"light":"one-light","dark":"night-owl"}}
Title
Title
Description
Link
Title
Description
Link
ButtonButton
```
## Options
### Sticky
Use the `sticky` attribute for persistent alerts that remain visible until users dismiss them. Sticky alerts work well for ongoing information that needs prolonged attention, such as system updates or maintenance notices.
Sticky alerts support every alert type: `default`, `success`, `error`, `warning`, and `info`.
```html HTML icon="html5" expandable theme={"theme":{"light":"one-light","dark":"night-owl"}}
Dashboard
Title
Button
```
```jsx React icon="react" expandable theme={"theme":{"light":"one-light","dark":"night-owl"}}
import { BqAlert, BqButton } from "@beeq/react";
Title
Button
`,
})
export class AppComponent {}
```
```vue Vue icon="vuejs" expandable theme={"theme":{"light":"one-light","dark":"night-owl"}}
Dashboard
Title
Button
```
Sticky alerts use a preset layout with the alert text centered at the top of the screen.
### Auto-dismiss
Set `auto-dismiss` to hide the alert automatically after a delay. Use `time` to override the default 3000 ms. Set a minimum of 8000 ms for alerts with meaningful content so users have enough time to read the message.
Do not use `auto-dismiss` for alerts that contain errors, required actions, or legal information.
```html HTML icon="html5" theme={"theme":{"light":"one-light","dark":"night-owl"}}
Changes saved
Your settings have been updated.
```
```jsx React icon="react" theme={"theme":{"light":"one-light","dark":"night-owl"}}
import { BqAlert } from "@beeq/react";
Changes saved
Your settings have been updated.
```
```ts Angular icon="angular" expandable theme={"theme":{"light":"one-light","dark":"night-owl"}}
import { Component } from "@angular/core";
import { BqAlert } from "@beeq/angular/standalone";
@Component({
selector: "app-root",
standalone: true,
imports: [BqAlert],
template: `
Changes saved
Your settings have been updated.
`,
})
export class AppComponent {}
```
```vue Vue icon="vuejs" expandable theme={"theme":{"light":"one-light","dark":"night-owl"}}
Changes saved
Your settings have been updated.
```
## Best practices
Do
Place alerts close to the content or workflow they affect.
Don't
Do not place alerts where they hide controls or interrupt a critical task.
Do
Write a short title that explains the state, then add body text only when users need context.
Don't
Do not use long paragraphs or unrelated links inside an alert.
Do
Give users enough time to read auto-dismiss alerts and keep important messages dismissible by intent.
Don't
Do not auto-dismiss alerts that contain errors, required actions, or legal information.
Do
Match the alert type, icon, and action style to the severity of the message.
Don't
Do not mix severity colors or custom icons in ways that make the alert harder to scan.
## Accessibility
* The host uses `role="alert"` so assistive technologies announce the message when it appears.
* The host sets `aria-hidden` from the `open` state, keeping hidden alerts out of the accessibility tree.
* The default close button has the accessible label "Close alert."
* `type` provides visual intent and a matching predefined status icon for `info`, `success`, `warning`, and `error`.
* Provide a concise title in the default slot and supporting details in the `body` slot when users need more context.
* The built-in type tokens (`info`, `success`, `warning`, `error`) meet WCAG AA color-contrast requirements in both light and dark themes. Verify contrast manually when using custom colors via CSS variables.
* All interactive elements inside the alert — the close button, footer actions, and body links — must be reachable via `Tab` and have a visible focus indicator.
* Set `time` to a minimum of 8000 ms for `auto-dismiss` alerts. Do not auto-dismiss while the user has keyboard focus or hover inside the alert.
* When `sticky` is enabled, keep the page focus order logical so keyboard users can still reach the affected content.
## API reference
### Properties
| Property | Attribute | Description | Type | Default |
| -------------- | --------------- | --------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------- | ----------- |
| `autoDismiss` | `auto-dismiss` | If `true`, the alert will automatically hide after the specified amount of time | `boolean` | `false` |
| `border` | `border` | The corner radius of the alert component | `'none'` \| `'xs2'` \| `'xs'` \| `'s'` \| `'m'` \| `'l'` \| `'full'` | `'s'` |
| `disableClose` | `disable-close` | If `true`, the close button at the top right of the alert will not be shown | `boolean` | `false` |
| `hideIcon` | `hide-icon` | If `true`, the alert icon will not be shown | `boolean` | `false` |
| `open` | `open` | If `true`, the alert will be shown | `boolean` | `false` |
| `sticky` | `sticky` | If `true`, the alert remains fixed at the top of the page, occupying the full viewport width | `boolean` | `false` |
| `time` | `time` | The length of time, in milliseconds, after which the alert closes itself. Only valid when `auto-dismiss` is set | `number` | `3000` |
| `type` | `type` | Type of alert | `'default'` \| `'error'` \| `'info'` \| `'success'` \| `'warning'` | `'default'` |
### Events
| Event | Description | Type |
| ------------- | ------------------------------------- | ------------------ |
| `bqHide` | Fires when the alert starts to hide | `CustomEvent` |
| `bqShow` | Fires when the alert starts to show | `CustomEvent` |
| `bqAfterHide` | Fires after the alert has been hidden | `CustomEvent` |
| `bqAfterShow` | Fires after the alert has been shown | `CustomEvent` |
* In React, prefix events with `on`: `onBqShow`, `onBqHide`, `onBqAfterShow`, `onBqAfterHide`.
* In Angular, use the event binding syntax: `(bqShow)`, `(bqHide)`, `(bqAfterShow)`, `(bqAfterHide)`.
* In Vue, use the `@` shorthand: `@bqShow`, `@bqHide`, `@bqAfterShow`, `@bqAfterHide`.
### Methods
| Method | Description | Type |
| -------- | ------------------------- | --------------- |
| `show()` | Shows the alert component | `Promise` |
| `hide()` | Hides the alert component | `Promise` |
### Slots
| Slot | Description |
| ----------- | --------------------------------------------------------------------------------- |
| *(default)* | The alert title content |
| `body` | The alert description content |
| `footer` | The alert footer content |
| `icon` | Custom icon content. Status types render predefined icons when this slot is empty |
| `btn-close` | Custom close button content |
### Shadow parts
| Part | Description |
| -------------- | ---------------------------------------------------------------------------------- |
| `base` | The `
` container of the predefined `bq-icon` component |
| `body` | The container `
` that wraps the alert description content |
| `btn-close` | The native button of the `bq-button` used to close the alert |
| `content` | The container `
` that wraps all alert content: title, description, and footer |
| `footer` | The container `
` that wraps the alert footer content |
| `icon` | The `` element used to render a predefined icon based on the alert type |
| `icon-outline` | The container `
` that wraps the icon element |
| `main` | The container `
` that wraps the alert main content |
| `svg` | The `