
Product
Socket for Jira Is Now Available
Socket for Jira lets teams turn alerts into Jira tickets with manual creation, automated ticketing rules, and two-way sync.
@locomotivemtl/grid-helper
Advanced tools
Creates an overlay grid for web development, allowing designers and developers to visualize the grid structure based on design guidelines.
The GridHelper class is a utility that creates an overlay grid for web development, allowing designers and developers to visualize the grid structure based on design guidelines. It provides easy toggling and responsiveness based on screen breakpoints.
Control + g (customizable key).npm install @locomotivemtl/grid-helper
To initialize the grid with default settings:
const gridHelper = new GridHelper();
You can provide a custom configuration to adjust the grid properties:
const gridHelper = new GridHelper({
columns: 4,
gutterWidth: '10px',
marginWidth: '10px',
color: 'blue',
opacity: 0.2,
key: 'g',
breakpoints: {
'768': { columns: 8, gutterWidth: '15px' },
'1024': { columns: 12, gutterWidth: '20px' }
}
});
You can also use CSS variables to bind them with your CSS logic, especially for columns, gutterWidth, and marginWidth. This can be useful in cases where you dynamically update CSS variables within media queries.
const gridHelper = new GridHelper({
columns: 'var(--grid-columns)',
gutterWidth: `var(--grid-gutter)`,
marginWidth: `var(--grid-margin)`,
});
| Option | Default Value | Type | Description |
|---|---|---|---|
columns | 12 | number | string | Number of columns in the grid or a CSS variable for columns. |
gutterWidth | '16px' | string | CSSVariable | Width of the gutters between columns or a CSS variable for gutter width. |
marginWidth | '16px' | string | CSSVariable | Width of the margins around the grid or a CSS variable for margin width. |
color | 'red' | string | Color of the grid in CSS format. |
opacity | 0.1 | number | Opacity of the grid. |
key | 'g' | string | Key to toggle the grid visibility (with Control key). |
breakpoints | undefined | object | Breakpoint configurations for responsive grids. |
| Option | Type | Description |
|---|---|---|
columns | number | string | Number of columns in the grid or a CSS variable for columns. |
gutterWidth | string | CSSVariable | Width of the gutters between columns or a CSS variable for gutter width. |
marginWidth | string | CSSVariable | Width of the margins around the grid or a CSS variable for margin width. |
color | string | Color of the grid in CSS format. |
opacity | number | Opacity of the grid. |
key | string | Key to toggle the grid visibility (with Control key). |
FAQs
Creates an overlay grid for web development, allowing designers and developers to visualize the grid structure based on design guidelines.
We found that @locomotivemtl/grid-helper demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket for Jira lets teams turn alerts into Jira tickets with manual creation, automated ticketing rules, and two-way sync.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.