# Navbar

> A horizontal top-of-page bar with a brand mark, navigation links, and actions on the right.

- Package: `fancy-ui-vue` (Vue 3.5+ + Tailwind CSS v4)
- Category: Navigation
- Tags: nav, header, top-bar, links, sticky
- Types: `NavbarProps`, `NavbarLinkProps`
- Docs: https://fancy-ui.rama.app/docs/components/navbar
- Source: https://github.com/RamaHerbin/fancy-ui/tree/main/vue/src/components/navbar

## Import

```vue
<script setup lang="ts">
import { Navbar } from 'fancy-ui-vue';
</script>
```

Setup (once per project): `npm install fancy-ui-vue`, then put these lines in your main CSS file (the stylesheet imports go right after `@import "tailwindcss";`):

```css
@import "tailwindcss";
@import "fancy-ui-vue/tailwind.css";
@import "fancy-ui-vue/styles.css";
```

Full guide: https://fancy-ui.rama.app/llms.txt

The names below are the ones to write in a Vue template; when one differs from the Svelte name, the Svelte name follows in parentheses. Snippets become named slots (`#default` is the default snippet), a prop the Vue port declares as a model is a `v-model:<name>` (except `ref`, exposed via `defineExpose({ ref })`: put a template ref on the component and read `.ref`) and callbacks are listeners (`onclick` is `@click`). Every component sets `inheritAttrs: false`: `class` is a declared prop, merged where the Svelte component applies it (not always the root element), and only when the props table below lists it; other attributes do not fall through unless the package README lists the component as forwarding native attributes. Divergences: https://github.com/RamaHerbin/fancy-ui/tree/main/vue#divergences-from-the-svelte-api

## Props

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `label` | `string` | `"Main"` | Accessible name for the nav landmark. |
| `sticky` | `boolean` | `false` | Pins the bar to the top with `position: sticky` and a translucent, blurred background. |
| `bordered` | `boolean` | `true` | Draws a 1px hairline along the bottom edge. |
| `class` | `string` | — | Additional CSS classes, merged onto the root. |
| `ref` | `HTMLElement \| null` | `null` | Bindable reference to the root nav element. |
| `NavbarLink.href` (required) | `string` | — | Destination URL. |
| `NavbarLink.current` | `boolean` | `false` | Marks this as the current page — aria-current="page" plus a visible weight/colour change. |
| `NavbarLink.external` | `boolean` | `false` | Opens in a new tab with a safe rel, and notes it for assistive tech. |
| `NavbarLink.disabled` | `boolean` | `false` | Strips the link out of the click and keyboard-activation paths. |
| `NavbarLink.@click` (Svelte `NavbarLink.onclick`) | `(event: MouseEvent) => void` | — | Native click handler. Never called while disabled. |
| `NavbarLink.class` | `string` | — | Additional CSS classes, merged onto the anchor. |
| `NavbarLink.ref` | `HTMLAnchorElement \| null` | `null` | Bindable reference to the anchor element. |
| `NavbarLink.sound` | `boolean` | `false` | Plays select when a navbar link that is not already current is activated, once the user has enabled sound |

## Slots

| Slot | Description |
| --- | --- |
| `#brand` (Svelte `brand`) | The brand mark / wordmark, on the left. |
| `#default` (Svelte `children`) | The navigation links, between the brand and the actions. |
| `#actions` (Svelte `actions`) | Actions on the right — search, sign-in, a theme switch. |
| `NavbarLink.#default` (Svelte `NavbarLink.children`) | The link's label. |

## Example

No Vue example is published for this component yet: start from the import above and the props table. The full examples are Svelte-only, on https://fancy-ui.rama.app/docs/components/navbar.md.
