I used mary-ui with livewire-volt in laravel 10 project,but I dion’t know how to set expand to open by default.
<x-menu-item title="xxxx" icon="o-building-storefront" link="/" />
<x-menu-item title="xxxxx" icon="o-shopping-cart" link="/" />
<x-menu-sub title="xxxxx" icon="o-cog-6-tooth"> // want to expand this without active.
<x-menu-item title="xxxx" icon="o-wifi" link="####" />
<x-menu-item title="xxxxx" icon="o-archive-box" link="####" />
</x-menu-sub>
set expand by default without active in livewire-volt syntax.
2
Answers
i found solution but not beatiful. can do any else?
You can force it open with this special class placed on any children menu.
This is not documented because it is not a recommend approach. It really depends what design you intend with this.
Tip: Open a GitHub "question" issue, so more people can help you.
https://github.com/robsontenorio/mary