Join our Discord community
Navbar

Collaboration Navigation Bar

Document-focused navigation bar with back navigation, action buttons, and live collaboration features. Shows online users with status indicators, history access, comments, and user management for collaborative editing environments.

Powered by

Loading component...

Installation

npx shadcn@latest add https://www.shadcn.io/registry/navbar-17.json
npx shadcn@latest add https://www.shadcn.io/registry/navbar-17.json
pnpm dlx shadcn@latest add https://www.shadcn.io/registry/navbar-17.json
bunx shadcn@latest add https://www.shadcn.io/registry/navbar-17.json

Features

  • Back navigation with chevron left icon and customizable click handling
  • Document title display with configurable heading text
  • History access button for document version control and change tracking
  • Comments system with message square icon for collaborative feedback
  • User management with add user functionality for team collaboration
  • Live user presence showing online/offline status with colored indicators
  • Avatar display with fallback initials and clickable user profiles
  • Additional users counter showing overflow count with expandable view
  • Real-time collaboration indicators with green (online) and gray (offline) status dots

Use Cases

This free open source React component works well for:

  • Document editors - Collaborative editing platforms with real-time user presence using Next.js
  • Design tools - Creative applications with team collaboration and version history using TypeScript
  • Project management - Task and document management with team member visibility using Tailwind CSS
  • Content creation - Writing and editing platforms with commenting and user management

API Reference

PropTypeDefaultDescription
titlestring"Basic UI"Document or page title displayed in header
backHrefstring"#"URL for back navigation link
usersNavbar17User[]defaultUsersArray of collaborating users with presence
additionalUsersCountnumber3Count of additional users not shown in avatars
showBackButtonbooleantrueWhether to display back navigation button
onBackClick() => voidundefinedCallback for back button clicks
onHistoryClick() => voidundefinedCallback for history button clicks
onCommentsClick() => voidundefinedCallback for comments button clicks
onAddUserClick() => voidundefinedCallback for add user button clicks
onUserClick(userId: string) => voidundefinedCallback for user avatar clicks
onAdditionalUsersClick() => voidundefinedCallback for additional users counter clicks

User Interface

interface Navbar17User {
  id: string;          // Unique identifier for the user
  name: string;        // Display name for accessibility
  avatar?: string;     // URL for user avatar image
  fallback: string;    // Initials or fallback text
  isOnline?: boolean;  // Online presence status
}
  • Back Button - Chevron left icon with configurable click handling
  • Title Display - Document or page title with semantic heading markup
  • Responsive Design - Consistent spacing and alignment across screen sizes
  • Link Integration - Support for both href navigation and callback handling

Collaboration Tools

  • History Access - History icon for document version control
  • Comments System - Message square icon for collaborative feedback
  • User Management - Add user icon for team member invitation
  • Action Callbacks - Click handlers for all collaborative actions

User Presence

  • Avatar Display - User profile pictures with fallback initials
  • Online Status - Green dot for online users, gray for offline
  • Clickable Profiles - Interactive user avatars with accessibility labels
  • Overflow Counter - Additional users count with expandable functionality
  • Status Indicators - Visual presence dots with screen reader support

Implementation Notes

  • Uses shadcn/ui Avatar component for user profile display with fallback support
  • Online status indicators use emerald-500 for online and muted-foreground for offline
  • All action buttons use ghost variant with rounded-full styling for consistency
  • User avatars are clickable with proper ARIA labels for accessibility
  • Additional users counter uses secondary variant with hover state changes
  • Compatible with shadcn/ui design system and Tailwind CSS styling framework
  • Status dots positioned absolutely with proper border styling for visual clarity
  • Back button includes preventDefault with callback support for custom navigation handling