This is a comprehensive showcase and a boilerplate of UI components built with Next.js 15, ShadCN, and Tailwind CSS. The project serves as a visual library and a starting point for building modern, responsive, and themeable web applications.
Experience the full component showcase live: https://julianoczkowski.github.io/next_modus/
Explore all components, custom implementations, and theming capabilities in the interactive demo. The showcase includes over 40 UI components, 32 calendar variations, custom toolbars, and comprehensive documentation.
- Next.js 15: Built on the latest version of Next.js, utilizing the App Router.
- ShadCN Components: A wide variety of beautifully crafted and accessible UI components.
- Tailwind v3 CSS: A utility-first CSS framework for rapid UI development.
- Theming: Light and dark mode support out-of-the-box, easily customizable via CSS variables.
- Responsive Design: All components are designed to be fully responsive across different screen sizes.
- Component Showcase: A dedicated section (
/styled_components) to view and interact with all available components. - 32 Calendar Variations: Includes an extensive collection of pre-designed calendar components for various use cases.
- Custom Components: Four fully-featured custom components built with Modus icons and advanced functionality.
- Cursor AI Integration: Comprehensive AI assistance with project-specific rules, memories, and intelligent code generation.
- MCP Integration: Model Context Protocol servers including Figma and Context7 for enhanced AI capabilities.
- Modus Design System: Strict enforcement of Modus design system standards with validated icon usage.
- Automated Quality Assurance: ESLint rules, pre-commit hooks, and automated validation to enforce CSS custom properties usage and prevent hardcoded colors.
- Framework: Next.js
- Styling: Tailwind CSS v3
- UI Components: ShadCN/UI
- Icons: Modus Icons
- Theming: next-themes
- Charts: Recharts
- Calendars: React Day Picker
- Toasts: Sonner
- Language: TypeScript
- Linting: ESLint with custom rules for color enforcement
- Git Hooks: Husky for pre-commit validation
This project includes comprehensive Cursor AI configuration for enhanced development experience:
code-rules.mdc: Enforces code quality standards, file size limits, and clean code practicesmodus-icons-usage.mdc: Ensures consistent Modus Icons implementation with accessibility guidelinesmodus-icon-names.mdc: Validates icon names against the complete list of available Modus iconsnew-components.mdc: Provides mandatory component templates and development standardsnextjs15-framework.mdc: Guides proper usage of Next.js 15 and React 19 features
- Figma MCP: Direct design-to-code workflow with real-time Figma asset access
- Context7 MCP: Up-to-date documentation and version-specific code examples
- Real-time Enhancement: Live documentation lookup and design token generation
cursor-memories-guide.md: Complete guide for creating and managing Cursor Memoriesuser-rule.md: User-specific rules for individual Cursor settings
- Intelligent Code Generation: AI understands project patterns and generates compliant code
- Consistent Standards: Automatic enforcement of Modus design system and Next.js 15 best practices
- Icon Validation: Prevents invalid icon usage with real-time validation
- Context Awareness: AI remembers project decisions and preferences across sessions
- Quality Assurance: Built-in code quality checks and architectural guidance
- MCP Server Integration: Figma and Context7 MCP servers for design-to-code workflows and real-time documentation
Follow these instructions to get the project up and running on your local machine.
Make sure you have Node.js (version 18.x or higher) and npm installed.
-
Clone the repository:
git clone https://github.com/your-username/nextjs15-modus-styled.git cd nextjs15-modus-styled -
Install the dependencies:
npm install
Note: The
npm installcommand automatically sets up Husky git hooks via the"prepare"script, enabling pre-commit validation for all contributors.
To build and run the application locally, use the following commands:
npm run build
npm run startThe application will be available at http://localhost:3000.
This project enforces strict code quality standards through automated linting and validation systems that prevent hardcoded colors and ensure compliance with the Modus design system.
Custom ESLint rules prevent hardcoded Tailwind colors at development time:
- Text Colors: Catches
text-blue-500,text-red-600, etc. - Background Colors: Catches
bg-blue-500,bg-green-400, etc. - Border Colors: Catches
border-blue-500,border-l-red-500, etc. - Comprehensive Coverage: Includes directional borders (
border-l-,border-r-,border-t-,border-b-)
Git hooks prevent committing code with hardcoded colors:
# Automatically runs before each commit
npm run validate:stylesIDE-level validation with real-time feedback:
- ESLint integration with immediate error highlighting
- Tailwind CSS IntelliSense with validation
- Automatic formatting and error detection
# Full style validation (ESLint + color check)
npm run validate:styles
# Check for hardcoded colors only
npm run lint:colors
# Standard ESLint check
npm run lint
# Development with strict validation
npm run dev:strict// Use CSS custom properties from globals.css
className="bg-card text-card-foreground border-border"
className="text-primary bg-primary"
style={{ padding: 'var(--spacing)', borderRadius: 'var(--radius)' }}// Hardcoded Tailwind colors (will be caught by ESLint)
className="bg-blue-500 text-white border-red-300"
className="text-gray-900 bg-slate-100"
// Hardcoded CSS values (will be caught by linting)
style={{ padding: '16px', color: '#333333' }}- Automatic Prevention: Impossible to commit hardcoded colors
- Real-time Feedback: Immediate warnings during development
- Consistent Theming: All colors automatically support dark/light mode
- Design System Compliance: Enforced adherence to Modus design standards
- Team Consistency: Standardized approach across all developers
- Zero Configuration: Works automatically for clones and forks
When someone clones or forks this repository:
git clone <repo>- Repository includes all configuration filesnpm install- Automatically runs"prepare": "husky"script- Git hooks activate - Pre-commit validation starts working immediately
- No manual setup required - Everything works out of the box
Files that ensure automatic setup:
.husky/pre-commit- Pre-commit hook configuration (committed to repo)"prepare": "husky"inpackage.json- Auto-installs hooks on npm installeslint.config.mjs- ESLint rules for color validation- Custom npm scripts - Validation commands available immediately
The project follows a standard Next.js App Router structure with some added conventions for organizing components and styles, plus comprehensive Cursor AI integration for enhanced development experience.
@/.cursor: Cursor AI Configuration - Contains project rules for AI assistance and MCP server configurationsrules/: MDC rule files that guide Cursor's AI behavior and code generationmcp.json: Model Context Protocol server configurations for Figma and Context7 integration
@/add_these_manually: Setup Documentation - Manual setup guides and referencescursor-memories-guide.md: Comprehensive guide for using Cursor Memoriesuser-rule.md: User-specific Cursor rules and preferences
@/app: Next.js App Router - Contains all the routes, layouts, and pages for the applicationstyled_components/: The main showcase area with dynamic routes for each component
@/components: Reusable React Components - Houses all UI components and custom implementationsui/: Core ShadCN UI componentscalendars/: The 32 calendar components with various featuresheader/: Custom app header component with mobile responsivenesstoolbars/: Custom toolbar components including the floating toolbarpanes/: Custom side pane components for secondary contenttreeview/: Custom tree view components for hierarchical data
@/hooks: Custom React Hooks - Shared stateful logic and utilities@/lib: Utility Functions - Helper functions and shared utilities@/public: Static Assets - Images, icons, and other public resources
In addition to the standard ShadCN components, this project includes four custom-built components that extend functionality:
A comprehensive application header component with mobile responsiveness and optional elements:
- Configurable Elements: Menu button, logo placeholder, search button, help button, app launcher, avatar, and mode toggle
- Project Dropdown: Optional centered dropdown for project selection
- Mobile Responsive: Adaptive layout with overflow menu for mobile devices
- Modus Icons: Fully integrated with the Modus icon system
- Accessibility: Full keyboard navigation and screen reader support
A versatile floating toolbar component with advanced features:
- Multiple Item Types: Supports buttons, toggles, dropdowns, and select inputs
- Flexible Positioning: Top, bottom, custom, or contained positioning with precise control
- Orientation Support: Horizontal and vertical layouts
- Interactive Features: Tooltips, keyboard shortcuts, active states, and action callbacks
- Responsive Design: Adapts to different screen sizes with overflow handling
A flexible side panel component for secondary content and navigation:
- Multiple Positions: Left, right, top, or bottom positioning
- Resizable: Optional resize functionality with drag handles
- Collapsible: Expandable and collapsible states with smooth animations
- Overlay Support: Modal-style overlay for mobile experiences
- Content Areas: Header, content, and footer sections with customizable layouts
A hierarchical tree view component for file systems and navigation:
- Drag & Drop: Built-in drag and drop functionality for reorganizing items
- Custom Icons: Support for different icons per node state (open, closed, selected)
- Interactive Actions: Action buttons that appear on hover or selection
- Expandable Nodes: Collapsible tree structure with nested children
- Selection States: Single and multi-select capabilities with callbacks
Theming is handled using CSS variables defined in @/app/globals.css, with custom styles to mimic the Modus brand. You can customize the color palette for both light and dark themes by modifying the variables in the :root and .dark selectors. The next-themes library is used to toggle between themes.
This project includes a wide range of components, each with its own showcase page. Here are some of the categories available:
- Layout: Accordion, Card, Carousel, Resizable, Separator, Tabs
- Forms: Button, Checkbox, Input, Form, Radio Group, Select, Slider, Switch, Textarea
- Feedback: Alert, Progress, Skeleton, Sonner (Toasts)
- Overlays: Alert Dialog, Dialog, Drawer, Hover Card, Popover, Sheet, Tooltip
- Navigation: Breadcrumb, Dropdown Menu, Menubar, Navigation Menu, Pagination, Sidebar
- Data Display: Aspect Ratio, Avatar, Badge, Calendar (32 variants), Chart, Table
- Custom Components: App Header, Floating Toolbar, Side Pane, Tree View
- MCP Integration: Figma and Context7 MCP servers for enhanced AI development workflows
- Icons: A dedicated page to browse and search all Modus Icons.
To see them all in action, navigate to /styled_components. The icon showcase is at /styled_components/modus-icons and MCP integration details are at /styled_components/mcp.
This project is licensed under the MIT License. See the LICENSE file for more details.
Here is a tree view of the project structure:
.
βββ .husky/ # Git Hooks Configuration
β βββ pre-commit # Pre-commit validation script
βββ .vscode/ # VS Code Configuration
β βββ settings.json # IDE settings for ESLint and Tailwind validation
βββ .cursor/ # Cursor AI Configuration
β βββ mcp.json # Model Context Protocol server configurations
β βββ rules/ # Project rules for AI assistance
β βββ code-rules.mdc # Code quality standards and best practices
β βββ modus-icon-names.mdc # Complete list of valid Modus icon names
β βββ modus-icons-usage.mdc # Modus Icons implementation patterns
β βββ new-components.mdc # Component development standards
β βββ nextjs15-framework.mdc # Next.js 15 and React 19 framework patterns
βββ add_these_manually/ # Setup Documentation
β βββ cursor-memories-guide.md # Comprehensive guide for using Cursor Memories
β βββ user-rule.md # User-specific Cursor rules and preferences
βββ app/ # Next.js App Router
β βββ favicon.ico # Application favicon
β βββ globals.css # Global styles and CSS custom properties
β βββ layout.tsx # Root layout with theme provider
β βββ page.tsx # Home page component
β βββ styled_components/ # Component showcase section
β βββ [slug]/ # Dynamic component showcase routes
β β βββ page.tsx # Dynamic page for individual components
β βββ components/ # Individual component showcase files
β β βββ accordion-showcase.tsx # Accordion component demonstration
β β βββ alert-dialog-showcase.tsx # Alert dialog component demonstration
β β βββ alert-showcase.tsx # Alert component demonstration
β β βββ ... (and many other component showcases)
β β βββ tooltip-showcase.tsx # Tooltip component demonstration
β βββ floating-toolbar/ # Custom floating toolbar showcase
β β βββ floating-toolbar-demo.tsx # Floating toolbar component demo
β β βββ page.tsx # Floating toolbar showcase page
β βββ header/ # Custom app header showcase
β β βββ app-header-demo.tsx # App header component demo
β β βββ page.tsx # App header showcase page
β βββ side-pane/ # Custom side pane showcase
β β βββ side-pane-demo.tsx # Side pane component demo
β β βββ page.tsx # Side pane showcase page
β βββ treeview/ # Custom tree view showcase
β β βββ tree-view-demo.tsx # Tree view component demo
β β βββ page.tsx # Tree view showcase page
β βββ layout.tsx # Layout for component showcase pages
β βββ mcp/ # Model Context Protocol showcase
β β βββ page.tsx # MCP servers documentation and configuration
β βββ modus-icons/ # Modus Icons showcase
β β βββ page.tsx # Icons browser and search page
β βββ page.tsx # Component showcase landing page
βββ components/ # Reusable React Components
β βββ calendars/ # Calendar component collection
β β βββ calendar-01.tsx # Calendar variant 1
β β βββ ... (32 calendar components) # Additional calendar variants
β β βββ calendar-32.tsx # Calendar variant 32
β βββ header/ # Custom app header components
β β βββ app-header.tsx # Main app header component
β β βββ index.ts # Header components export file
β βββ panes/ # Custom side pane components
β β βββ side-pane.tsx # Main side pane component
β β βββ index.ts # Pane components export file
β βββ toolbars/ # Custom toolbar components
β β βββ floating-toolbar.tsx # Main floating toolbar component
β β βββ index.ts # Toolbar components export file
β βββ treeview/ # Custom tree view components
β β βββ tree-view.tsx # Main tree view component
β β βββ index.ts # Tree view components export file
β βββ ui/ # Core ShadCN UI components
β β βββ accordion.tsx # Accordion UI component
β β βββ alert-dialog.tsx # Alert dialog UI component
β β βββ alert.tsx # Alert UI component
β β βββ ... (many shadcn ui components) # Additional ShadCN components
β β βββ tooltip.tsx # Tooltip UI component
β βββ copy-button.tsx # Copy to clipboard button component
β βββ mode-toggle.tsx # Theme mode toggle component
β βββ theme-provider.tsx # Theme context provider component
βββ hooks/ # Custom React Hooks
β βββ use-mobile.ts # Mobile device detection hook
β βββ use-mobile.tsx # Alternative mobile hook implementation
βββ lib/ # Utility Functions
β βββ utils.ts # Shared utility functions (cn, etc.)
βββ public/ # Static Assets
β βββ file.svg # File icon asset
β βββ globe.svg # Globe icon asset
β βββ next.svg # Next.js logo asset
β βββ next2.svg # Alternative Next.js logo
β βββ product_logos/ # Product logo assets
β β βββ Connect-Horizontal-RGB.svg # Connect product logo
β β βββ Logo-Accubid-Anywhere-RGB-Full-Horizontal.svg # AccuBid logo
β β βββ ... (multiple product logos) # Additional product logos
β β βββ Trimble_logo_light.svg # Trimble company logo
β βββ vercel.svg # Vercel logo asset
β βββ window.svg # Window icon asset
βββ eslint.config.mjs # ESLint configuration with custom color validation rules
βββ components.json # ShadCN components configuration
βββ next.config.ts # Next.js configuration
βββ package.json # Project dependencies and scripts
βββ postcss.config.js # PostCSS configuration
βββ project-structure.md # Detailed project structure documentation
βββ README.md # Project documentation
βββ tailwind.config.js # Tailwind CSS configuration
βββ tsconfig.json # TypeScript configuration
This directory contains Git hooks configuration using Husky for automated quality assurance and pre-commit validation.
pre-commit: Automatically runs style validation before each commit to prevent hardcoded colors and ensure code quality compliance. Executesnpm run validate:stylesto catch ESLint violations and color validation issues.
This directory contains VS Code workspace configuration for consistent development environment and real-time validation.
settings.json: IDE-specific settings that enable ESLint integration, Tailwind CSS validation, and automatic error detection. Provides immediate feedback for hardcoded colors and CSS violations during development.
This directory contains Cursor AI configuration that enhances the development experience with intelligent code assistance and MCP server integration.
mcp.json: Model Context Protocol server configurations for extending AI capabilities:- Figma MCP: Local server connection for design-to-code workflows and asset extraction
- Context7 MCP: Remote NPM package providing up-to-date documentation and code examples
rules/: Contains MDC (Markdown Document with Context) rule files that guide Cursor's AI behavior:code-rules.mdc: Code quality standards, naming conventions, and best practices for the projectmodus-icon-names.mdc: Complete list of valid Modus icon names for validation and referencemodus-icons-usage.mdc: Implementation patterns and guidelines for using Modus Icons consistentlynew-components.mdc: Component development standards and mandatory templates for Next.js 15 + React 19nextjs15-framework.mdc: Framework-specific patterns for App Router, Server Components, and React 19 features
This directory contains setup documentation and guides that should be manually reviewed and applied by developers.
cursor-memories-guide.md: Comprehensive guide explaining how to create and manage Cursor Memories for project-specific AI assistanceuser-rule.md: User-specific Cursor rules and preferences that can be added to individual Cursor settings
This directory is the heart of the Next.js application, following the App Router paradigm. It's responsible for routing and defining the structure of different pages and layouts.
globals.css: Contains the global styles for the application, including CSS variables for theming.layout.tsx: The root layout that wraps all pages. It sets up the HTML structure, includes the global font, and wraps the application with theThemeProvider.page.tsx: The main entry point or home page of the application.styled_components/: A dedicated section for showcasing the various UI components available in the project.[slug]/page.tsx: A dynamic page that renders a specific component showcase based on the URL slug. It dynamically imports and displays the component.components/: Contains the individual showcase components for each UI element (e.g.,accordion-showcase.tsx,button-showcase.tsx).header/: Showcase for the custom App Header component.floating-toolbar/: Showcase for the custom Floating Toolbar component.side-pane/: Showcase for the custom Side Pane component.treeview/: Showcase for the custom Tree View component.layout.tsx: Provides a layout for the component showcase pages, including a sidebar for navigation.page.tsx: The landing page for the/styled_componentsroute.mcp/: A dedicated section for showcasing Model Context Protocol server integration.page.tsx: Documentation and configuration details for Figma and Context7 MCP servers.
modus-icons/: A dedicated section for showcasing the various Modus icons available in the project.page.tsx: The landing page for the/modus-iconsroute.
This directory houses all the reusable React components of the application, organized for clarity and maintainability.
ui/: This sub-directory contains the core ShadCN UI components. These are low-level building blocks likeButton,Card,Input,Dialog, etc. They are styled and ready to be used across the application.calendars/: A collection of 32 different pre-built calendar components with various features and configurations.header/: Custom app header component with mobile responsiveness and configurable elements.toolbars/: Custom toolbar components including the floating toolbar with advanced positioning and interaction features.panes/: Custom side pane components for secondary content and navigation.treeview/: Custom tree view components for hierarchical data display and interaction.copy-button.tsx: A simple component for a button that copies given text to the clipboard.mode-toggle.tsx: A component that allows the user to switch between light, dark, and system themes.theme-provider.tsx: A wrapper component that provides theme management capabilities to the entire application usingnext-themes.
This directory contains custom React hooks that encapsulate and reuse stateful logic.
use-mobile.ts: A custom hook to detect if the application is being viewed on a mobile device by checking for a media query match.
This directory is for utility functions, helpers, and other library-like code that can be used throughout the application.
utils.ts: Contains helper functions. Currently, it includes thecnfunction fromtailwind-mergeandclsxfor conditionally combining CSS classes.
This directory stores static assets that are served directly from the root of the application.
- This includes images (
.svg,.ico), and other static files that need to be publicly accessible.
Built by Julian Oczkowski β I build AI tools for knowledge work.
- π₯ YouTube Β· @aiforwork_app β walkthroughs and AI-for-work tutorials
- βοΈ Medium β deep dives on product and AI workflows
- πΌ LinkedIn β connect and follow along
