How do I set an Accordion.Item so it's content is automatically opened/displayed. #901
Answered
by
shyakadavis
rhscjohn-dev
asked this question in
Help
-
Using the following code.
I want item-2 content to be automatically opened.
Thanks. |
Beta Was this translation helpful? Give feedback.
Answered by
shyakadavis
Mar 14, 2024
Replies: 1 comment
-
Hello, @rhscjohn-dev If it's just one value that you want, then pass the name of the item, in your case, If you want multiple items open, pass the names of the values, and include the e.g. <Accordion.Root multiple value={['item-1', 'item-2']}> |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
rhscjohn-dev
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello, @rhscjohn-dev
If it's just one value that you want, then pass the name of the item, in your case,
item-2
to thevalue
prop of theAccordion.Root
.If you want multiple items open, pass the names of the values, and include the
multiple
prop set to true.e.g.