Work in Progress

This library is still a work in progress and things will likely change.

Nova by Resknow

Mobile Menu

Component Navigation
Preview

MobileMenu

This component is available with our Astro Starter Kit.

Usage

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 MobileMenu from '@components/MobileMenu.astro';
---
<MobileMenu />

Props

  • name - The name of the menu to display. Defaults to main.
  • showPhoneNumber - Whether or not to show the phone number. Defaults to false.