Stacks related blocks that open and close on click, so a reader opens only the one they need.
On this page
@addTagHelper *, Webority.Ui.Razor
Basic
One pane open at a time is the default and the right choice for an FAQ, because it keeps the list scannable.
An FAQ list
Every zone on the site, scored against the current IEC 62305-2 methodology.
Yes. A revision supersedes the previous version and keeps the original in history.
PDF for sign-off and XLSX for the underlying zone data.
Show code
<app-accordion>
<app-accordion-item title="What does a risk assessment cover?">…</app-accordion-item>
<app-accordion-item title="Can I revise a report after it is issued?">…</app-accordion-item>
<app-accordion-item title="What formats can I export?">…</app-accordion-item>
</app-accordion>
Closed panes stay in the DOM
A collapsed pane is still rendered: the row animates to 0fr. That is what makes the open transition smooth, and it means in-page search (Ctrl+F) finds text inside a closed pane. Don't put a heavy component inside dozens of panes expecting it to be unmounted.
More than one open
Set multiple when the panes are independent and a reader may want to compare two of them side by side.
Independent panes
Every zone on the site, scored against the current IEC 62305-2 methodology.
Yes. A revision supersedes the previous version and keeps the original in history.
PDF for sign-off and XLSX for the underlying zone data.
Show code
<app-accordion multiple="true">
<app-accordion-item title="What does a risk assessment cover?">…</app-accordion-item>
<app-accordion-item title="Can I revise a report after it is issued?">…</app-accordion-item>
<app-accordion-item title="What formats can I export?">…</app-accordion-item>
</app-accordion>
Starting expanded
Mark an item open to expand it on first render, when one pane is the common case and the rest are exceptions.
First pane open
Every zone on the site, scored against the current IEC 62305-2 methodology.
Yes. A revision supersedes the previous version and keeps the original in history.
PDF for sign-off and XLSX for the underlying zone data.
Show code
<app-accordion>
<app-accordion-item title="What does a risk assessment cover?" open="true">…</app-accordion-item>
<app-accordion-item title="Can I revise a report after it is issued?">…</app-accordion-item>
<app-accordion-item title="What formats can I export?">…</app-accordion-item>
</app-accordion>
Keyless items, only the third open
Panes need no key. Without one, a pane is identified by its position.
Put markup in an app-accordion-heading child when the heading holds a grid, a badge or an icon. The title attribute stays plain text.
Heading with markup
A heading holds any markup, such as a grid of figures. The row stays a button, so the keyboard and screen-reader behaviour is the same as a text title.
Each site and when it was last scanned.
Show code
<app-accordion>
<app-accordion-item title="Sites">
<app-accordion-heading><span data-wui-style="display:grid;grid-template-columns:1fr auto;gap:var(--wui-space-lg)"><strong>Sites</strong><span>12 scanned</span></span></app-accordion-heading>
Each site and when it was last scanned.
</app-accordion-item>
</app-accordion>
Every option
Every value of every prop, one cell each.
items
open not set (default): no pane open
Every zone on the site, scored against the current IEC 62305-2 methodology.
Yes. A revision supersedes the previous version and keeps the original in history.
PDF for sign-off and XLSX for the underlying zone data.
(no app-accordion-item children): no panes
three panes, only the third open (Razor panes take no key)
1
2
3
open="true" on the first item
Every zone on the site, scored against the current IEC 62305-2 methodology.
Yes. A revision supersedes the previous version and keeps the original in history.
PDF for sign-off and XLSX for the underlying zone data.
open="true" on the first two items, multiple="false": only the first is honoured
Every zone on the site, scored against the current IEC 62305-2 methodology.
Yes. A revision supersedes the previous version and keeps the original in history.
PDF for sign-off and XLSX for the underlying zone data.
count="2" with variant flat: a count chip after the title
Per assessed zone, billed monthly in arrears.
content: long text, no max-height clip
It depends on the number of zones and the complexity of the roof and bonding network, but a typical single-building commercial site takes one working day for the site visit, plus report turnaround. Multi-building campuses or sites with restricted access windows can take several days of on-site work before the report is drafted, reviewed, and issued for sign-off.
rich markup in content: title stays plain text (no React-node equivalent)
Email support@example.com for help with any question above.
multiple
multiple="false" (default): mutually exclusive
Every zone on the site, scored against the current IEC 62305-2 methodology.
Yes. A revision supersedes the previous version and keeps the original in history.
PDF for sign-off and XLSX for the underlying zone data.
multiple="true": independent panes
Every zone on the site, scored against the current IEC 62305-2 methodology.
Yes. A revision supersedes the previous version and keeps the original in history.
PDF for sign-off and XLSX for the underlying zone data.
variant
variant="bordered" (default): a card of questions
Every zone on the site, scored against the current IEC 62305-2 methodology.
Yes. A revision supersedes the previous version and keeps the original in history.
variant="flat": a text toggle with a leading chevron
Items finished in the last week.
Items moved out of the active list.
openItems
open-items not set (default): each item's open decides
Every zone on the site, scored against the current IEC 62305-2 methodology.
Yes. A revision supersedes the previous version and keeps the original in history.
PDF for sign-off and XLSX for the underlying zone data.
open-items="0": the first question opens
Every zone on the site, scored against the current IEC 62305-2 methodology.
Yes. A revision supersedes the previous version and keeps the original in history.
PDF for sign-off and XLSX for the underlying zone data.
open-items="0,2" with multiple="true": the first and third open
Every zone on the site, scored against the current IEC 62305-2 methodology.
Yes. A revision supersedes the previous version and keeps the original in history.
PDF for sign-off and XLSX for the underlying zone data.
id
id not set (default): a unique id is generated
Every zone on the site, scored against the current IEC 62305-2 methodology.
id="pricing-faq": a stable, deep-linkable prefix
Every zone on the site, scored against the current IEC 62305-2 methodology.
closeLabel
close-label="Hide": each trigger carries it as data-close-label, for a stylesheet to show while open
Every zone on the site, scored against the current IEC 62305-2 methodology.
className
class="demo-list": extra classes on the list
Every zone on the site, scored against the current IEC 62305-2 methodology.
Guidance
What to do, and what to avoid.
Use it when
A page has several self-contained blocks and a reader wants one of them.
The content is secondary: reference detail, an FAQ answer, an advanced setting.
Collapsing keeps a long page scannable rather than hiding something essential.
Reach for something else when
The sections are alternative views of the same thing. → AppTabs
The content needs the user's full attention before they continue. → AppModal
Every pane will be read anyway, so collapsing just adds clicks. → plain sections with headings
It is a short helper text attached to a field label. → AppInfoTip
Titles that name what is inside
Do
Yes.
Write the title as the question or the thing the reader is looking for. They are scanning titles, not content.
Avoid
Yes.
"More information" says nothing about what is inside, so the reader has to open every pane to find what they want.
Reference
Try every prop, read the full list, and check keyboard and screen reader behaviour.
6 props. The 4 most used come first.
Used on most screens 4 props
Prop
Type
Default
Description
multipledefault false
bool
false
Allows more than one pane open at a time. Leave it off for a list the reader scans.
open-itemsdefault -
string
-
Comma-separated positions of the panes that start open, counted from 0 ("0,2"). Replaces each pane's own open; without multiple only the first position opens.
variantdefault bordered
bordered | flat
bordered
bordered (default) | flat: a text toggle with a leading chevron and an optional count chip, for a section header rather than a card of questions.
close-labeldefault -
string
-
The label every trigger carries as data-close-label, for a stylesheet to show while the pane is open.
Less common 2 props
Prop
Type
Default
Description
iddefault generated
string
generated
Prefix for the generated pane ids. Set it when a pane needs a stable anchor to link to.
classdefault -
string
-
Extra classes on the list root.
<app-accordion-item> takes title (the always-visible row, plain text, no rich-node equivalent) and open (start expanded), plus count (a count chip after the title; 0 shows 0); its inner markup is the revealed body and may contain HTML.
Screen reader
3 notes
Each title is a native button with aria-expanded and aria-controls pointing at its pane, so Enter and Space toggle it.
Each pane is a section labelled by its title button.
A closed pane stays in the page but is inert and hidden from assistive technology until it opens.
Do and avoid
1 pairs
Titles that name what is inside
Do
Yes.
Write the title as the question or the thing the reader is looking for. They are scanning titles, not content.
Avoid
Yes.
"More information" says nothing about what is inside, so the reader has to open every pane to find what they want.