This is content within a dialog container.
Dialog
Dialog is a generic container component designed to display content in a compact, consistent surface.
Also known as: popover, popout, popout menu, panel, flyout, overlay, menu, tray
Basic usage
Permalink to "Basic usage"Dialog is a simple container component that provides consistent styling and elevation.
<bolt-dialog>
<p>This is content within a dialog container.</p>
</bolt-dialog>
With list content
Permalink to "With list content"Dialog is commonly used to contain list elements.
<bolt-dialog>
<bolt-list>
<bolt-list-item>Option 1</bolt-list-item>
<bolt-list-item>Option 2</bolt-list-item>
<bolt-list-item>Option 3</bolt-list-item>
</bolt-list>
</bolt-dialog>
Complex list with sections
Permalink to "Complex list with sections"Dialog can contain rich list content with sections, dividers, and subtitles.
Account Settings
Manage your preferences
Security
<bolt-dialog>
<bolt-list>
<p class="bolt-list__heading">Account Settings</p>
<p class="bolt-list__copy">Manage your preferences</p>
<bolt-divider></bolt-divider>
<bolt-list-item subtitle="Update your personal information">
<bolt-icon decorative slot="leading" name="person"></bolt-icon>
Profile
<bolt-icon decorative slot="trailing" name="chevron-right"></bolt-icon>
</bolt-list-item>
<bolt-list-item subtitle="Manage notification preferences">
<bolt-icon decorative slot="leading" name="bell"></bolt-icon>
Notifications
<bolt-icon decorative slot="trailing" name="chevron-right"></bolt-icon>
</bolt-list-item>
<p class="bolt-list__heading">Security</p>
<bolt-list-item subtitle="Password and authentication">
<bolt-icon decorative slot="leading" name="lock"></bolt-icon>
Security Settings
<bolt-icon decorative slot="trailing" name="chevron-right"></bolt-icon>
</bolt-list-item>
<bolt-list-item subtitle="Data and privacy settings">
<bolt-icon decorative slot="leading" name="shield"></bolt-icon>
Privacy
<bolt-icon decorative slot="trailing" name="chevron-right"></bolt-icon>
</bolt-list-item>
</bolt-list>
</bolt-dialog>
Syntax
Permalink to "Syntax"<bolt-dialog>
<div slot="header">Header content</div>
<!-- Main content goes here -->
<div slot="footer">Footer content</div>
</bolt-dialog>
Properties
Permalink to "Properties"The <bolt-dialog> custom element is a simple container component with no configurable properties beyond global HTML attributes.
Slots
Permalink to "Slots"- default slot (required)
- Main content area (body section). Always visible and scrollable.
- header slot (optional)
- Top section with automatic bottom border when populated.
- footer slot (optional)
- Bottom section with automatic top border when populated.
Events
Permalink to "Events"The <bolt-dialog> component does not emit any custom events.
Methods
Permalink to "Methods"The <bolt-dialog> component does not expose any public methods.
Test selectors
Permalink to "Test selectors"The <bolt-dialog> component does not include any built-in test selectors. Use standard query selectors to target the element in tests.
General guidelines
Permalink to "General guidelines"- Dialogs sit above other elements on an page and give the user specific options of actions to take or places to go.
- Most often, Dialogs should be attached to a trigger object like a Reveal Button or input, but they may also exist independently, such as a custom right-click dialog.
- Dialogs may contain a number of elements, most commonly being a List.
- The Dialog pattern contains 3 areas: Header, Body and Footer. The Body is the only required area.
- Content inside all areas is user-determined.
When to use
Permalink to "When to use"- Use when it is desired to present a specific set of options in specific areas of a page, instead of in the main navigation.
- Use when there are multiple actions or paths (at least 2-3 is advised) a user could take with an element on the page, and they can’t be displayed on the page, or they are tertiary actions or paths.
When not to use
Permalink to "When not to use"- Avoid using if the included options are the primary interactions for the page.
- Avoid if there are only one or two options available and it would better serve the user to have them always visible on the page.
Do
- Do group similar options together and utilize Dividers or headings to organize the options.
- Do keep the number of options under 8-10, generally.
- Do be mindful of label text length. Keep labels clear and concise.
- Do follow established Bolt patterns for placement of leading and trailing elements within the content of a Dialog.
Don't
- Don’t hide options in a Dialog that should be more easily discoverable by users.
Content guidelines
Permalink to "Content guidelines"- Keep labels concise and direct by using action-oriented, easily understood language. A user should know exactly what will happen when they select an option in a Dialog.
- Dialog options should use sentence case unless there is a business line precedent.
- Avoid using ellipses if content gets cut off due to container size limitations. It is preferred to shorten the text or allow the text to wrap to multiple lines. Ellipses may indicate another Dialog, Modal or pop-up may appear if clicked.
Accessibility compliance
Permalink to "Accessibility compliance"-
WCAG 2.2 Compliant
-
JAWS 2025 Tested
-
NVDA 2025 Tested
-
VoiceOver Tested
-
Keyboard Tested
-
aXe Tested
Best Practices
Permalink to "Best Practices"- Dialog is a container component only and does not manage focus or keyboard interaction.
- For interactive overlay content requiring focus management, use Modal instead.
- Ensure content within the dialog container follows accessibility best practices.
- Include proper heading structure and semantic HTML.
- Ensure sufficient color contrast for text and interactive elements.
Built-in behavior
Permalink to "Built-in behavior"The <bolt-dialog> component:
- Does not include ARIA attributes by default, as it is a purely presentational container.
- Does not trap focus or manage keyboard navigation.
- Provides a consistent visual surface for content presentation.
Known issues
Permalink to "Known issues"None at this time.
All Bolt components have gone through accessibility testing, but please keep our accessibility guidelines in mind.