Navigation Menu
Menu de navegação horizontal com suporte a submenus em dropdown.
Uso
vue
<script setup lang="ts">
import { NavigationMenu } from '@halfbyte/maka'
const items = [
{ value: 'inicio', label: 'Início', href: '/' },
{ value: 'docs', label: 'Docs', href: '/docs' },
{
value: 'componentes',
label: 'Componentes',
children: [
{ label: 'Button', href: '/guide/button' },
{ label: 'Input', href: '/guide/input' },
{ label: 'Dialog', href: '/guide/dialog' },
],
},
]
</script>
<template>
<NavigationMenu :items="items" />
</template>Props
| Prop | Tipo | Padrão |
|---|---|---|
items | NavigationMenuItem[] | obrigatório |
NavigationMenuItem
| Campo | Tipo | Descrição |
|---|---|---|
value | string | Identificador único do item |
label | string | Texto exibido no gatilho |
href | string | Link de navegação (para itens sem filhos) |
children | NavigationMenuLink[] | Sublinks exibidos no dropdown (opcional) |
NavigationMenuLink
| Campo | Tipo | Descrição |
|---|---|---|
label | string | Texto do link |
href | string | Destino da navegação |