Navigation Block
poyraz/navigation-blockFreeBlock
Poyraz Soft Glass Navigation Block with container-responsive layout and semantic tokens.
Install it
npx shadcn@latest add https://ui.poyrazavsever.com/r/navigation-block.jsonSource
1"use client";23import * as React from "react";4import { Menu, Sparkles } from "lucide-react";56import { Button } from "@/components/ui/atoms/button";7import {8 Navbar,9 NavbarActions,10 NavbarBrand,11 NavbarLink,12 NavbarLinks,13 NavbarMain,14 NavbarMobileLink,15 NavbarMobileMenu,16 NavbarMobileToggle,17} from "@/components/ui/organisms/navbar";18import { cn } from "@/lib/utils";1920export interface NavigationItem {21 label: string;22 href: string;23}2425export const navigationItems: NavigationItem[] = [26 { label: "Overview", href: "#overview" },27 { label: "Components", href: "#components" },28 { label: "Blocks", href: "#blocks" },29 { label: "Changelog", href: "#changelog" },30];3132export interface NavigationBlockProps extends React.HTMLAttributes<HTMLElement> {33 items?: NavigationItem[];34 activeHref?: string;35 glass?: boolean;36}3738function NavigationBlock({39 items = navigationItems,40 activeHref,41 glass = true,42 className,43 ...props44}: NavigationBlockProps) {45 return (46 <Navbar47 data-slot="navigation-block"48 variant={glass ? "glass" : "bordered"}49 className={cn("rounded-lg", className)}50 {...props}51 >52 <NavbarMain>53 <NavbarBrand href="#overview" className="min-w-0 font-semibold">54 <span className="flex size-8 shrink-0 items-center justify-center rounded-md bg-primary text-primary-foreground">55 <Sparkles className="size-4" aria-hidden />56 </span>57 <span className="truncate">Poyraz UI</span>58 </NavbarBrand>59 <NavbarLinks aria-label="Primary navigation">60 {items.map((item) => (61 <NavbarLink62 key={item.href}63 href={item.href}64 active={activeHref === item.href}65 aria-current={activeHref === item.href ? "page" : undefined}66 >67 {item.label}68 </NavbarLink>69 ))}70 </NavbarLinks>71 <NavbarActions>72 <Button variant="ghost" size="sm">73 Sign in74 </Button>75 <Button size="sm">Get started</Button>76 </NavbarActions>77 <NavbarMobileToggle aria-label="Open navigation">78 <Menu className="size-4" />79 </NavbarMobileToggle>80 </NavbarMain>81 <NavbarMobileMenu>82 {items.map((item) => (83 <NavbarMobileLink84 key={item.href}85 href={item.href}86 active={activeHref === item.href}87// … truncated
What it pulls in
npm packages
Other registry items
Files it writes
More from poyraz
All 71 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Article Cardarticle-card | poyraz | Blocks | Free | no deps | |
| Auth Card Blockauth-card-block | poyraz | Blocks | Free | 1 dep | |
| Brand Hero Blockbrand-hero-block | poyraz | Blocks | Free | 1 dep | |
| Dashboard Shell Blockdashboard-shell-block | poyraz | Blocks | Free | 1 dep | |
| Footer Blocksfooter-blocks | poyraz | Blocks | Free | 1 dep | |
| Glass App Shell Blockglass-app-shell-block | poyraz | Blocks | Free | 1 dep | |
| Image Cardimage-card | poyraz | Blocks | Free | no deps | |
| Mega Menu Blockmega-menu-block | poyraz | Blocks | Free | 1 dep |
