whatisgithub

What is ruler-mode?

timothymaarv/ruler-mode — explained in plain English

Analysis updated 2026-05-18

11TypeScriptAudience · developerComplexity · 1/5Setup · easy

In one sentence

ruler-mode adds Figma-style pixel rulers and draggable alignment guides directly on top of any running web app.

Mindmap

mindmap
  root((repo))
    What it does
      Shows pixel rulers on page
      Adds draggable guide lines
      Persists guides across reloads
    Tech stack
      TypeScript
      React optional
      localStorage
    Use cases
      Check layout alignment visually
      Measure spacing on a live app
      Debug pixel positioning issues
    Audience
      Frontend developers
      Vibe coders
      UI designers who code
    Controls
      Shift plus R toggles rulers
      Drag from ruler creates guide
      Arrow keys nudge guide
    Setup
      Copy folder into project
      Mount React overlay
      Or create instance directly

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Check pixel-perfect alignment on a live web app instead of a static design file.

USE CASE 2

Add draggable guide lines to a React app with a single overlay component.

USE CASE 3

Use ruler-mode in a framework-free project by creating an instance directly.

USE CASE 4

Save alignment guides across page reloads for repeated layout checks.

What is it built with?

TypeScriptReact

How does it compare?

timothymaarv/ruler-mode1e3pm/knowledge-chatbotaaravmaloo/revera
Stars111111
LanguageTypeScriptTypeScriptTypeScript
Setup difficultyeasymoderateeasy
Complexity1/53/52/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 5min

No package to install, you copy the folder into your project and mount one component or instance.

The README does not state a license.

So what is it?

ruler-mode adds Figma-style pixel rulers and draggable guide lines to any web app you are building. Instead of measuring spacing and alignment by eye or with browser developer tools, you press a keyboard shortcut and rulers appear along the top and left edges of the page, just like in a design tool. Dragging out from a ruler places a guide line directly on your running app, so you can check alignment against your actual layout rather than a static mockup. It is meant to be small and simple: there are no external dependencies, it works with server-rendered pages, and you add it to a project by copying its folder in rather than pulling in a package manager dependency. In a React app, you mount a single overlay component. In a plain JavaScript project without any framework, you create an instance of it directly and can remove it again when you are done. Once enabled, guides can be dragged to reposition, nudged a pixel at a time with the arrow keys, duplicated by holding a modifier key while dragging, and deleted by pressing delete, right-clicking, or dragging them back onto the ruler they came from. While dragging, a guide shows its exact pixel position, and it stays marked on the opposite ruler for reference. Guides are saved to the browser's local storage so they are still there after you reload the page. The tool accepts a small set of configuration options, including a light or dark appearance, a custom z-index, a custom color for guide lines, and a way to disable the local storage persistence. It also exposes a small programmatic API for toggling ruler mode, adding or removing guides, and reacting to changes.

Copy-paste prompts

Prompt 1
Show me how to add the RulerModeOverlay component to my React app.
Prompt 2
Explain how to use ruler-mode in a plain JavaScript project with no framework.
Prompt 3
What keyboard shortcuts does ruler-mode support for creating and removing guides?
Prompt 4
Help me configure ruler-mode's appearance and disable guide persistence.
Prompt 5
Explain the difference between Shift+R and Ctrl+Shift+R in ruler-mode.

Frequently asked questions

What is ruler-mode?

ruler-mode adds Figma-style pixel rulers and draggable alignment guides directly on top of any running web app.

What language is ruler-mode written in?

Mainly TypeScript. The stack also includes TypeScript, React.

What license does ruler-mode use?

The README does not state a license.

How hard is ruler-mode to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is ruler-mode for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.