New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More

padded-grid

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

padded-grid

A development tool for visualizing and maintaining consistent grid systems in React applications. Similar to design tools like Figma, it provides toggleable grid overlays that help ensure precise spacing, alignment, and layout consistency during developme


Version published
Weekly downloads
14
decreased by-12.5%
Maintainers
0
Weekly downloads
 
Created
Issues
0

Padded Grid

A development tool for visualizing and maintaining consistent grid systems in React applications. Similar to design tools like Figma, it provides toggleable grid overlays that help ensure precise spacing and alignment during development.

Features

  • 🎯 Interactive grid overlays for development
  • 📏 Column grid visualization (like Figma's layout grid)
  • 📐 Baseline grid for typography alignment
  • 🎚️ Toggleable grid visibility
  • 🎨 Customizable grid colors and opacity
  • 🔧 TypeScript-first with comprehensive types
  • ⚡️ Zero runtime dependencies
  • 🪶 Tree-shakeable & optimized bundle

Quick Start

import { XGrid, YGrid } from 'padded-grid';
import 'padded-grid/styles.css';

function App() {
  const showGrid = process.env.NODE_ENV === 'development';

  return (
    <div>
      {/* Baseline grid for typography alignment */}
      <YGrid
        config={{
          baseUnit: 8,
          height: "100%",
        }}
        visibility={showGrid ? 'visible' : 'hidden'}
      />

      {/* Column grid overlay */}
      <XGrid
        config={{
          columns: 12,
          gap: 16,
          maxWidth: "1200px",
        }}
        visibility={showGrid ? 'visible' : 'hidden'}
      />

      <main>Your content...</main>
    </div>
  );
}

Documentation

Browser Support

  • Modern browsers (Chrome, Firefox, Safari, Edge)
  • CSS Grid Layout support required
  • CSS Custom Properties (CSS Variables) support required

Contributing

See CONTRIBUTING.md for guidelines.

License

MIT © François Denavaut

FAQs

Package last updated on 29 Dec 2024

Did you know?

Socket

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.

Install

Related posts