Skip to content
Body text inside accordion
Body text inside accordion
Accordion item
Accordion - Web Component
The Accordion component can be used imported from:
Playground
Parameters
The Web component uses the <z-accordion>
tag:
By default, all the parameters are optional or can be set in different, except for the ones marked as required
The parametrization of the component can be done with the following custom HTML params:
Name | Type | Description | Slot | A11y |
---|---|---|---|---|
config | string | Sets the size of the accordion item. Default is | ||
summary | string | The title of the accordion item | summary | |
open | boolean | If the accordion item is open or closed | ||
borderless | boolean | Render the accordion component without separation border. | ||
content | string | The content of the accordion item | default |
Slots
This component has slots. Check the documentation about how to use the slots.
Name | Tags | Description |
---|---|---|
default | span | The content of the accordion item |
summary | span | The title of the accordion item |
Parameters use
model
Same as the open
attribute, the model
attribute is used to set the accordion item as open by default. Default is false
.
config
The config
attribute it's used to set the size of the accordion item. Default is m
. You can also set it as l
.
summary
The summary
attribute is used to set the text label of the accordion item. Make sure you always use it.
Also you can use the summary
slot to set the text label of the accordion item.
Flags
open
The open
attribute is used to set the accordion item as open by default. Default is false
.
borderless
The borderless
attribute is used to remove the border of the accordion item. Default is false
.
Browser support
Detected engine:
Chromium
Webkit
Gecko