A small side project built for my wife to use in her job. This application provides a simple and intuitive interface for converting between height and weight units with automatic BMI calculation and health category insights.
- Height Conversion: Switch between imperial (feet/inches) and metric (centimeters) units
- Weight Conversion: Convert between pounds and kilograms
- Automatic BMI Calculation: Real-time BMI computation with health category classification
- Responsive Design: Clean, modern interface that works on all devices
- Unit Toggle: Easy switching between measurement systems
- React 19 - Modern React with latest features
- TypeScript - Type-safe development
- Vite - Fast build tool and development server
- Tailwind CSS 4 - Utility-first CSS framework
- shadcn/ui - Beautiful, accessible component library built on Radix UI
- Radix UI - Accessible component primitives (used by shadcn/ui)
- Lucide React - Beautiful icon library
- Class Variance Authority - Component variant management
- ESLint - Code quality and consistency
- TypeScript ESLint - TypeScript-specific linting rules
- pnpm - Fast, disk space efficient package manager
{
"@radix-ui/react-label": "^2.1.7",
"@radix-ui/react-slot": "^1.2.3",
"@tailwindcss/vite": "^4.1.12",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"lucide-react": "^0.542.0",
"react": "^19.1.1",
"react-dom": "^19.1.1",
"tailwind-merge": "^3.3.1",
"tailwindcss": "^4.1.12"
}{
"@eslint/js": "^9.33.0",
"@types/node": "^24.3.0",
"@types/react": "^19.1.10",
"@types/react-dom": "^19.1.7",
"@vitejs/plugin-react": "^5.0.0",
"eslint": "^9.33.0",
"eslint-plugin-react-hooks": "^5.2.0",
"eslint-plugin-react-refresh": "^0.4.20",
"globals": "^16.3.0",
"tw-animate-css": "^1.3.7",
"typescript": "~5.8.3",
"typescript-eslint": "^8.39.1",
"vite": "^7.1.2"
}- Node.js (version 18 or higher)
- pnpm (recommended) or npm
-
Clone the repository
git clone <repository-url> cd bmi-calc
-
Install dependencies
pnpm install # or npm install -
Start development server
pnpm dev # or npm run dev -
Open your browser Navigate to
http://localhost:5173to view the application
pnpm dev- Start development server with hot reloadpnpm build- Build for productionpnpm preview- Preview production build locallypnpm lint- Run ESLint to check code quality
src/
├── components/ # React components
│ ├── BMIDisplay.tsx # BMI calculation display
│ ├── HeightConverter.tsx # Height conversion component
│ ├── WeightConverter.tsx # Weight conversion component
│ └── ui/ # Reusable UI components
├── utils/ # Utility functions
│ └── conversions.ts # Conversion and BMI calculation logic
├── App.tsx # Main application component
└── main.tsx # Application entry point
- Enter Height: Choose between imperial (feet/inches) or metric (centimeters)
- Enter Weight: Input weight in pounds or kilograms
- View Results: The application automatically calculates and displays your BMI
- Health Insights: See which health category your BMI falls into