Beautiful code screenshots in seconds.
A free, open-source alternative to shots.so β create stunning code images for social media, blog posts, and presentations.
π Live Demo: https://codeshot-lovat.vercel.app
Other Languages: δΈζ | νκ΅μ΄ | ζ₯ζ¬θͺ
- π― Real-time Preview β See changes instantly as you type
- π¨ 12+ Code Themes β GitHub Dark, Dracula, One Dark Pro, Nord, and more
- π Gradient Backgrounds β Beautiful preset gradients or custom colors
- πͺ Window Styles β macOS, Windows, Minimal, and Rounded frames
- π Customizable β Padding, line numbers, title, and more
- π Copy to Clipboard β One-click copy for quick sharing
- π₯ Export PNG/SVG β High-resolution exports for any use case
- π Pure Frontend β No server, no tracking, runs entirely in your browser
# Clone the repo
git clone https://github.com/yourusername/codeshot.git
cd codeshot
# Install dependencies
npm install
# Start development server
npm run devOpen http://localhost:5173 and start creating!
- Framework: React 18 + TypeScript
- Build Tool: Vite
- Styling: Tailwind CSS
- Syntax Highlighting: Shiki (200+ themes, 100+ languages)
- Image Export: html-to-image
- Paste your code in the left editor panel
- Choose a theme from the dropdown (GitHub Dark, Dracula, etc.)
- Pick a background gradient or solid color
- Select a window style (macOS dots, Windows, Minimal, etc.)
- Adjust padding and toggle line numbers
- Export as PNG/SVG or copy to clipboard
| Dark Themes | Light Themes |
|---|---|
| GitHub Dark | GitHub Light |
| Dracula | Solarized Light |
| One Dark Pro | Vitesse Light |
| Nord | |
| Monokai | |
| Tokyo Night | |
| Slack Dark |
codeshot/
βββ src/
β βββ components/
β β βββ Editor.tsx # Code input editor
β β βββ Preview.tsx # Real-time preview panel
β β βββ Toolbar.tsx # Customization controls
β β βββ ExportButton.tsx # Export/copy buttons
β βββ themes/
β β βββ index.ts # Theme definitions
β βββ utils/
β β βββ export.ts # Export utilities
β βββ types/
β β βββ index.ts # TypeScript types
β βββ App.tsx # Main application
β βββ main.tsx # Entry point
βββ index.html
βββ package.json
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Shiki for beautiful syntax highlighting
- Tailwind CSS for utility-first CSS
- shots.so for inspiration
Made with β€οΈ by developers, for developers.