Use for managing multiple collapsible sections with single or multiple open modes.
In single mode, only one section can be open at a time. Opening a new section automatically closes others, creating an accordion-style behavior.
<q2-section-container open-mode="single">
<q2-section label="Personal Information">
Name, email, phone number, and address details go here.
</q2-section>
<q2-section label="Security Settings">
Password, two-factor authentication, and security questions.
</q2-section>
<q2-section label="Notification Preferences">
Email, SMS, and push notification settings.
</q2-section>
</q2-section-container>
In multiple mode, users can open as many sections as they want simultaneously, allowing them to view and compare content across sections.
<q2-section-container open-mode="multiple">
<q2-section label="Checking Account">
Balance: $1,234.56 - Last transaction: Today
</q2-section>
<q2-section label="Savings Account">
Balance: $5,678.90 - Last transaction: Yesterday
</q2-section>
<q2-section label="Credit Card">
Balance: $432.10 - Payment due: March 15
</q2-section>
</q2-section-container>
By default, the container starts with the first section open. Use start-open="false" to start with all sections closed.
<q2-section-container start-open="false">
<q2-section label="Advanced Settings">
These settings are for advanced users only.
</q2-section>
<q2-section label="Developer Options">
API keys and webhook configurations.
</q2-section>
</q2-section-container>
Use open-pane-index to specify which section should be open initially (zero-based index).
<q2-section-container open-pane-index="2">
<q2-section label="Step 1">
Introduction and overview.
</q2-section>
<q2-section label="Step 2">
Configuration options.
</q2-section>
<q2-section label="Step 3">
Final review and submission. (This opens first)
</q2-section>
</q2-section-container>
When using open-mode="multiple", you can start with all sections open using start-all-open.
<q2-section-container open-mode="multiple" start-all-open="true">
<q2-section label="Overview">
High-level summary of all features.
</q2-section>
<q2-section label="Details">
Detailed breakdown of specifications.
</q2-section>
<q2-section label="Documentation">
Links to additional resources.
</q2-section>
</q2-section-container>
If sections don't have labels, they will automatically be labeled "Section 1", "Section 2", etc.
<q2-section-container>
<q2-section>
Content for the first section without an explicit label.
</q2-section>
<q2-section>
Content for the second section without an explicit label.
</q2-section>
</q2-section-container>
When using open-mode="multiple" with start-all-open="true" inside a q2-tab-pane that starts closed, the sections may not render correctly. This is a known limitation.
Only q2-section elements should be direct children of q2-section-container. Other elements will be automatically removed.
openModeopen-modeDetermines if a single or multiple sections can be open at a time.
openPaneIndexopen-pane-indexDetermines which section starts open.
startAllOpenstart-all-openDetermines if all sections inside the section-container start opened or closed.
If you have openMode set to multiple, all panes will start open.
startOpenstart-openDetermines if the section-container starts opened or closed.
OpenMode = multiple and StartAllOpen=true does not work correctly inside of a q2-tab that starts closed.
If you have openMode set to single, the pane specified in openPaneIndex will start open, or the first pane if unspecified. If you have openMode set to multiple, you can also select startAllOpen to open all panes.
A Section Container manages multiple collapsible sections with configurable open/close behavior. It provides a structured way to organize related content into expandable sections with control over how many sections can be open simultaneously.
<q2-section-container>
<q2-section label="Account Details">
View and manage your account information including balance, account number, and routing details.
</q2-section>
<q2-section label="Transaction History">
Review recent transactions and download statements for your records.
</q2-section>
<q2-section label="Settings">
Configure notifications, security preferences, and account settings.
</q2-section>
</q2-section-container>
The Section Container wraps multiple q2-section elements and controls their behavior as a group.
q2-section instead of a container for single sections.single mode (default) for sequential content where only one section should be open at a time.multiple mode when users may need to compare content across sections.The following CSS variables are available to override the default theme styles of the q2-section-container component.