npx ui-thing@latest add accordion
The most common way to use the accordion is by just passing an array of items to the items
prop. Each item should have a value
, title
, and content
.
If you want to change the way that the items look, you can do so by using the different components that the accordion is composed of.
You can change the icon
that is displayed based on the open state of an item. Just override the the trigger
slot and then override the icon
slot.
These are some examples that I found today over here Origin UI. I think they are cool.
To use these examples you will have to copy the code and adjust it for your own use.