Skip to content

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
Discussion options

You must be logged in to vote

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 the value prop of the Accordion.Root.

If you want multiple items open, pass the names of the values, and include the multiple prop set to true.

e.g.

	<Accordion.Root multiple value={['item-1', 'item-2']}>

Replies: 1 comment

Comment options

You must be logged in to vote
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
Category
Help
Labels
None yet
2 participants