Skip to main content

Accordion

Demo

zeta-web v0.6.6
Web Components

The accordion is a control element comprising a vertically stacked list of items, such as labels or thumbnails. Each item can be "expanded" or "collapsed" to reveal the content associated with that item. There can be zero expanded items, exactly one, or more than one item expanded at a time, depending on the configuration.

The contents within the tag will be the child of the open accordion. Typically, this would be list items. Custom styles are applied to <li> elements to match Zeta styles.

Storybook

https://design.zebra.com/web/storybook/?path=/docs/components-accordion--docs

Slots

NameDescriptionType
defaultTypically litext

Attributes

NameDescriptionTypeDefault
accordionTitleThe title of the accordion.string | undefinedundefined
containedCreates a border around the accordion.booleanfalse
openWhether the accordion is open.booleanfalse

Inherited Attributes

NameDescriptionTypeDefaultInherited From
roundedWhether the component is rounded or sharp.When true, rounded will set the border radius of the first child, and any children with class 'contourable-target' to --radius-minimal.Otherwise, this value will be --radius-none.boolean | undefinedtrueContourable
disabledBoolean for if component is disabled.This will apply disabled styles.booleanfalseInteractive
tabIndexThe tab index of the component, used to determine the order in which elements receive focus when the user navigates through the document by pressing the Tab key.number0Interactive

Figma

https://www.figma.com/design/JesXQFLaPJLc1BdBM4sisI/%F0%9F%A6%93-ZDS---Components?node-id=2315-72864