---
title: "navbar-02"
description: "Minimal top navbar with centered links, a dropdown, and a single primary action. Collapses into a slide-in sheet on mobile."
category: "Navbar"
---
# navbar-02
Minimal top navbar with centered links, a dropdown, and a single primary action. Collapses into a slide-in sheet on mobile.
## Installation
```bash
php artisan ui:add-block navbar-02
```
## Dependencies
- composer: `gehrisandro/tailwind-merge-laravel`
- component: [button](https://laralcn-ui.abdulkadersafi.com/components/button.md) — the CLI installs it for you.
- component: [collapsible](https://laralcn-ui.abdulkadersafi.com/components/collapsible.md) — the CLI installs it for you.
- component: [dropdown-menu](https://laralcn-ui.abdulkadersafi.com/components/dropdown-menu.md) — the CLI installs it for you.
- component: [sheet](https://laralcn-ui.abdulkadersafi.com/components/sheet.md) — the CLI installs it for you.
## Source
`resources/views/components/ui/blocks/navbar-02.blade.php`
```blade
{{--
Every piece of content is a prop, so you can drive this navbar from a CMS.
A link is either a plain string or ['label' => ..., 'href' => ...].
An action is ['label' =>, 'href' =>, 'variant' =>]; give it an href and it
renders as a link, leave href out and it stays a plain button. Variants are
default, outline, secondary, ghost, link and destructive.
Pass :menu-label="null" to drop the dropdown entirely.
--}}
@props([
'brand' => 'LaralCN',
'brandHref' => '#',
'links' => ['Link One', 'Link Two', 'Link Three'],
'menuLabel' => 'Link Four',
'menuLinks' => ['Link Five', 'Link Six', 'Link Seven'],
'actions' => [['label' => 'Get Started', 'href' => null, 'variant' => 'default']],
])
@php
$link = static fn($item): array => is_array($item)
? $item + ['href' => '#']
: ['label' => $item, 'href' => '#'];
@endphp
merge(['class' => 'w-full border-b border-border bg-background']) }}>