<details>
A panel that opens and closes on a tap of its header, as HTML's details and summary.
Aliases
Reset to canonicalThis tag has more than one name. Every spelling is the same tag, so write whichever feels natural. Pick one and every example on this page uses it.
<column style="w-full">
<details title="Shipping"
icon="local_shipping"
expanded="true">
<text>Free over $50. Orders ship within two working days.</text>
</details>
<details>
<summary>Returns</summary>
<text>Return anything unworn within 30 days.</text>
</details>
</column>
Attributes
| Name | What it does | Default |
|---|---|---|
expanded |
Initially expanded boolean |
false |
icon |
Leading icon string |
|
open |
HTML form of expanded (for <details>); bare attribute works boolean |
false |
subtitle |
Subtitle text string |
|
title |
Header title; none without it (or a <summary>) string |
|
variant |
plain: no Material tile. The <summary> is the header as written (your own row and chevron), a tap opens and closes the rest, nothing is padded or indented; \$id.open says which, and #id.open / #id.close / #id.toggle work. plain |
Commands
| Name | What it does |
|---|---|
close |
variant="plain": close it. |
open |
variant="plain": open it. |
toggle |
variant="plain": open or close it. |
Readings
| Name | What it does |
|---|---|
expanded |
The same, named after expanded=. |
open |
Whether the panel is open. |
Any tag also takes gestures: @on.tap, @on.longpress, @on.doubletap and @on.swipeleft (and right, up and down). @click runs on a tap too.