surjithctly / astro-navbar

Astro-Navbar is a fully responsive headless navigation bar for Astro. It supports mobile responsive toggle and dropdowns.
https://www.npmjs.com/package/astro-navbar
170 stars 14 forks source link

[Bug] Cannot have multiple navs on page #20

Open KyleTryon opened 11 months ago

KyleTryon commented 11 months ago

It appears as though the navbar is not an "island", resulting in the menu buttons having a shared state. Having two navs in two separate components on the same page, will open and close in unison.

surjithctly commented 11 months ago

Currently the menu looks for an ID to close and open items and we do not have a parent wrapper since its headless. If we added a wrapper, it might break existing users, so only can do this on a major version. Until then, only one navigation is possible.

I'll keep this open.

SalahAdDin commented 2 months ago

Currently the menu looks for an ID to close and open items and we do not have a parent wrapper since its headless. If we added a wrapper, it might break existing users, so only can do this on a major version. Until then, only one navigation is possible.

I'll keep this open.

We could handle it by giving the id as property.

surjithctly commented 1 month ago

@SalahAdDin Are you able to open a PR?

SalahAdDin commented 1 month ago

@SalahAdDin Are you able to open a PR?

I will check it then,