# Accordion A versatile Accordion component, managing state, context, and styling. ```jsx featured Item 1 This is the content of Item 1. Item 2 This is the content of Item 2. Item 3 This is the content of Item 3. ``` ```css preview .accordion-root[data-variant] { display: flex; flex-direction: column; width: 100%; border-radius: min(var(--lcs-radius, 0), 24px); overflow: hidden; &[data-variant="solid"] { border: 1px solid rgba(var(--border-color), 0.2); } &[data-variant="outlined"] { border: 1px solid rgb(var(--border-color)); } } .accordion-header[data-variant] { display: flex; align-items: center; justify-content: space-between; padding: calc(8px * var(--lcs-spacing, 1)) calc(12px * var(--lcs-spacing, 1)); cursor: pointer; user-select: none; transition: background-color 150ms ease; &[data-variant="solid"]:hover, &[data-variant="outlined"]:hover, &[data-variant="muted"]:hover { background-color: rgba(var(--primary), 0.2); } } ``` [View Source](https://github.com/LocusInc/locus-ui/tree/main/packages/locus-ui/src/components/accordion) ## Anatomy ```jsx code no-header ``` ## Examples ### Variants Accordion components come with three built in variants, `solid`, `outlined`, and `muted`. ```jsx {["solid", "outlined", "muted"].map((variant) => ( Item 1 This is the content of Item 1. Item 2 This is the content of Item 2. Item 3 This is the content of Item 3. ))} ``` ### Multiple Open The `multiple` prop allows multiple accordion items to be expanded simultaneously. ```jsx Item 1 This is the content of Item 1. Item 2 This is the content of Item 2. Item 3 This is the content of Item 3. ```