Mobile
Mobile navigation with full-screen overlay.
Overview #
A mobile navigation component that opens as a full-screen overlay with expandable menu sections. Optimized for touch interactions. Commonly used inside Main Nav for mobile layouts.
Properties #
logoSource string
Path to the logo image.
logoAlt string
Alternative text for the logo image.
navData array | default: array
Array of navigation items with name, path, and optional children (up to 3 levels).
Item Properties:
name string
The display text for the navigation item.
path string
The URL/path for the navigation item.
children array
Optional nested navigation items (level 2).
Item Properties:
name string
The display text for the navigation item.
path string
The URL/path for the navigation item.
children array
Optional nested navigation items (level 3, final level).
Item Properties:
name string
The display text for the navigation item.
path string
The URL/path for the navigation item.
Examples #
Link and children #
---
import Mobile from "@navigation/mobile/Mobile.astro";
---
<Mobile
logoAlt="null" logoSource="null" navData={
[
{
"name": "Home",
"path": "/",
"children": []
},
{
"name": "Component library",
"path": "/component-docs/",
"children": [
{
"name": "Project tour",
"path": "/component-docs/project-tour/",
"children": []
},
{
"name": "Customizing your brand",
"path": "/component-docs/customizing-your-brand/",
"children": []
}
]
},
{
"name": "Support hub",
"path": "/why/",
"children": [
{
"name": "Guides",
"path": "/why/",
"children": [
{
"name": "Site search",
"path": "/search/"
},
{
"name": "Blog",
"path": "/blog/"
}
]
},
{
"name": "Blog listing",
"path": "",
"children": [
{
"name": "Blog Post",
"path": "/"
}
]
}
]
},
{
"name": "Label-only parent",
"path": "#",
"children": [
{
"name": "Opens from row tap only",
"path": "/search/",
"children": []
},
{
"name": "Another link",
"path": "/why/",
"children": []
}
]
}
]
}
/> ---
blocks:
_component: navigation/mobile
logoSource: null
logoAlt: null
navData:
- name: Home
path: /
children: []
- name: Component library
path: /component-docs/
children:
- name: Project tour
path: /component-docs/project-tour/
children: []
- name: Customizing your brand
path: /component-docs/customizing-your-brand/
children: []
- name: Support hub
path: /why/
children:
- name: Guides
path: /why/
children:
- name: Site search
path: /search/
- name: Blog
path: /blog/
- name: Blog listing
path: ''
children:
- name: Blog Post
path: /
- name: Label-only parent
path: '#'
children:
- name: Opens from row tap only
path: /search/
children: []
- name: Another link
path: /why/
children: []
---