Figma Grid Overlay Chrome Extension
A Chrome extension that adds a configurable grid overlay to any webpage, similar to Figma's layout grid functionality. Perfect for web developers and designers who want to ensure their layouts match design specifications.
Features
- 🎯 Configurable columns and rows
- 📏 Adjustable gutters
- 🎨 Custom colors with opacity control
- 📐 Stretch or fixed layout types
- 🔄 Real-time updates
- 💾 Persistent settings
Installation
- Clone this repository or download the files
- Open Chrome and navigate to
chrome://extensions/ - Enable "Developer mode" in the top right corner
- Click "Load unpacked"
- Select the directory containing the extension files
Usage
- Click the extension icon in your Chrome toolbar to open the configuration panel
- Adjust the grid settings:
- Grid Size: Base size for the grid
- Columns: Number of vertical grid lines
- Column Type: Choose between 'Stretch' or 'Fixed'
- Column Gutter: Space between columns
- Rows: Number of horizontal grid lines
- Row Type: Choose between 'Stretch' or 'Fixed'
- Row Gutter: Space between rows
- Grid Color: Color of the grid lines
- Opacity: Transparency of the grid lines
- Click "Toggle Grid" to show/hide the overlay
Development
File Structure
manifest.json- Extension configuration and permissionspopup.html- Configuration interfacepopup.js- Configuration logic and messagingcontent.js- Grid overlay implementationstyles.css- Additional styling
Testing
- Make changes to the code
- Go to
chrome://extensions/ - Click the refresh icon on the extension card
- Test the changes on any webpage
To test specific features:
-
Grid Toggle
- Click the extension icon
- Click "Toggle Grid"
- Verify the grid appears/disappears
-
Settings Persistence
- Adjust grid settings
- Close and reopen the popup
- Verify settings are preserved
-
Real-time Updates
- Show the grid
- Change settings
- Verify grid updates immediately
-
Cross-page Functionality
- Enable grid on one page
- Navigate to another page
- Verify grid state and settings persist
Common Issues
-
Grid not showing
- Check if the extension has permission for the current page
- Verify the toggle button is working
- Check browser console for errors
-
Settings not saving
- Ensure Chrome storage permission is granted
- Check if other extensions are conflicting
Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
License
MIT License - feel free to use this in your own projects!
Full Changelog: https://github.com/DriekvanderMeulen/grid-layout/commits/release