Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature request] navbar dropdown #867

Open
tddschn opened this issue Mar 5, 2024 · 4 comments · May be fixed by #897
Open

[Feature request] navbar dropdown #867

tddschn opened this issue Mar 5, 2024 · 4 comments · May be fixed by #897
Labels
enhancement New feature or request

Comments

@tddschn
Copy link

tddschn commented Mar 5, 2024

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

I want to add more entries to the nav bar but don't want to create too much visual cluster. A drop down would be nice, as it allows me to group multiple navbar links together, taking less space by default.

Describe the solution you'd like
A clear and concise description of what you want to happen.

const headerNavLinks = [
  { href: '/', title: 'Home' },
  { href: '/blog', title: 'Blog' },
  { href: '/tags', title: 'Tags' },
  { title: 'Dropdown 1', children: {
href: '/link1', title: 'title 1',
href: '/link2', title: 'title 2',
} // this becomes a dropdown navbar item
]

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

@timlrx
Copy link
Owner

timlrx commented Apr 17, 2024

I don't mind supporting such a feature. To avoid creating too much clutter, I think just a one level menu would work and it should display well on mobile as well.

If anyone is interesting in contributing a pull request on this item, let me know, thanks!

@timlrx timlrx added the enhancement New feature or request label Apr 17, 2024
@pratikkabade
Copy link

@timlrx
I'd like to contribute, Would it be okay if I take on this one?

@timlrx
Copy link
Owner

timlrx commented Apr 18, 2024


@timlrx I'd like to contribute, Would it be okay if I take on this one?

Sure! Take a look at the recently updated ThemeSwitch component. It contains a menu implementation using @headlessui/react. Try to follow a similar approach for consistency, thanks!

@pratikkabade
Copy link

Exactly what I was planning on doing!

pratikkabade added a commit to pratikkabade/tailwind-nextjs-starter-blog that referenced this issue Apr 18, 2024
@pratikkabade pratikkabade linked a pull request Apr 18, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants