A pixel-accurate React UI for a Knowledge Base application built with React and Tailwind CSS.
knowledge-base-app/
βββ public/
β βββ index.html
βββ src/
β βββ components/
β β βββ Button.jsx # Reusable button component
β β βββ Header.jsx # Header with branding
β β βββ Sidebar.jsx # Sidebar navigation
β β βββ KnowledgeCard.jsx # Knowledge base card component
β β βββ CreateNewModal.jsx # Create new article modal
β βββ layout/
β β βββ MainLayout.jsx # Main layout wrapper
β βββ pages/
β β βββ Home.jsx # Home page with all articles
β βββ App.jsx # Main App component
β βββ index.jsx # React DOM entry point
β βββ index.css # Global styles & Tailwind imports
βββ package.json # Dependencies
βββ tailwind.config.js # Tailwind configuration
βββ postcss.config.js # PostCSS configuration
βββ README.md # This file
- Primary Color: #4F46E5 (Indigo)
- Secondary Color: #1E1B4B (Dark Navy)
- Pixel-accurate UI replicated from Figma design
- Responsive Layout: Works on desktop and tablet screens
- Component-based Architecture: Reusable, clean components
β Home Screen
- Header with branding and user profile
- Sidebar navigation with menu items
- Knowledge base cards grid layout
- Responsive design
β Create New Modal
- Opens on "Create New" button click
- Dimmed overlay background
- Centered modal with close button
- Form with title, category, and description fields
- Submit and cancel actions
β User Interaction
- "Create New" button opens/closes modal
- Responsive hover states
- Smooth transitions and animations
Before running the application, ensure you have:
- Node.js (v14 or higher)
- npm or yarn package manager
cd Project Assignments/knowledge-base-appnpm installThis will install:
- React 18
- Tailwind CSS 3
- PostCSS and Autoprefixer
npm startThe application will open at http://localhost:3000
# Start development server
npm start
# Build for production
npm build
# Run tests
npm test- Sidebar Navigation - Click on menu items (currently static)
- Create New Button - Click to open modal
- Knowledge Cards - Display articles in responsive grid
- Close Button (β) - Available in modal header
- Click "Create New" button β Modal opens with overlay
- Fill in form fields (Title, Category, Description)
- Click "Cancel" β Modal closes
- Click "Create Article" β Modal closes (form submission)
- Click overlay β Modal closes (backdrop click)
- Mobile: Base styles (< 768px)
- Tablet: md breakpoint (768px - 1024px)
- Desktop: lg breakpoint (1024px+)
| Name | Color | Usage |
|---|---|---|
| Primary | #4F46E5 | Buttons, active states, accents |
| Secondary | #1E1B4B | Sidebar background |
| Gray-50 | #F9FAFB | Main background |
| Gray-200 | #E5E7EB | Borders |
| White | #FFFFFF | Cards, modals |
- Logo with KB badge
- Title
- Search and notification icons
- User profile avatar
- Create New button (primary action)
- Navigation menu items
- Version info and footer
- Title and description
- Category badge
- Publication date
- Read time estimate
- Hover effects
Variants: primary, secondary, ghost Sizes: sm, md, lg
- Header with title and close button
- Form inputs (text, select, textarea)
- Footer with action buttons
- Overlay backdrop
Edit tailwind.config.js:
colors: {
primary: "#YOUR_COLOR_HERE",
}Edit src/components/Sidebar.jsx:
const menuItems = [
{ icon: 'π', label: 'Custom Item', active: false },
// ...
];Edit src/pages/Home.jsx and update the knowledgeArticles array
- React 18 - UI library
- Tailwind CSS 3 - Utility-first CSS framework
- PostCSS - CSS processing
- React Scripts - Build tooling
- This is a frontend-only implementation
- No backend API integration (as per requirements)
- No authentication system
- No database
- Focus on UI/UX and component structure
Feel free to customize and extend the components as needed.
For issues or questions about the application, refer to the component files in the src/ directory.
Created: 2026
Status: Complete - Ready for production deployment