imgcuter
is a simple front-end image cropping tool built with React and TypeScript.
- Image cropping functionality using
react-easy-crop
. - Image manipulation using HTML5 Canvas API.
- Cropping history saved in browser
localStorage
.
- Framework: React
- Language: TypeScript
- Build Tool: Vite
- Key Libraries:
react-easy-crop
: For the cropping UI.
- Storage: Browser
localStorage
for history. - Core Logic: HTML5 Canvas API for image manipulation.
imgcuter/
├── src/
│ ├── components/ # React components
│ │ └── Cropper.tsx
│ ├── pages/ # Page components
│ │ └── index.tsx
│ ├── types/ # TypeScript definitions
│ │ └── crop.ts
│ ├── utils/ # Utility functions
│ │ └── cropImage.ts
│ └── main.tsx # App entry point
├── index.html # Main HTML file
├── package.json # Dependencies and scripts
└── vite.config.ts # Vite configuration
In the project directory, you can run:
Installs all necessary dependencies.
Runs the app in development mode. Opens http://localhost:5173 in your browser.
The page will reload when you make changes. You may also see any lint errors in the console.
Builds the app for production to the dist
folder.
It correctly bundles React in production mode and optimizes the build for the best performance.
The build is minified and the filenames include the hashes. Your app is ready to be deployed!
Serves the production build locally. This is useful for checking the production build before deploying.