Work in Progress
This library is still a work in progress and things will likely change.
The menu is hidden below the md breakpoint. Resize your browser to see the preview.
This component is available with our Astro Starter Kit.
Before you use this component, be sure that you’ve added the menu to src/site.js in the following format:
export default {
...otherConfig,
/**
* Menus
*/
menus: {
main: [
{
label: 'Home',
href: '/',
},
{
label: 'About',
href: '/about',
},
{
label: 'Contact',
href: '/contact',
},
],
}
};
If you don’t specify a menu name, the component will look for a menu named main.
Now you can import the component into the page or component you need it and use it!
---
import Menu from '@components/Menu.astro';
---
<Menu />
name - The name of the menu to display. Defaults to main.We use cookies to provide the best experience.