Caliper logo

Essential tooling for detail-obsessed design engineers.

Installation

// app/layout.tsx (or _document.tsx)
import Script from "next/script";

export default function RootLayout({ children }) {
  return (
    <html lang="en">
      <body>
        {process.env.NODE_ENV === "development" && (
          <Script
             src="https://unpkg.com/@oyerinde/caliper/dist/index.global.js"
             data-config={JSON.stringify({ theme: { primary: '#AC2323' } })}
             strategy="afterInteractive"
          />
        )}
        {children}
      </body>
    </html>
  );
}

Configuration

export interface OverlayConfig {
  theme?: ThemeConfig;
  commands?: CommandsConfig;
  animation?: AnimationConfig;
}

How to Use

Core Measurement

Projection (Edge Alignment)

Viewport Rulers

Excluding Elements

Command Palette

ActionShortcut
Activate
Alt
Freeze/Unfreeze
Space
Select Element
Ctrl + Hold + Click
Clear Selection
Escape
Calculator: Top
t
Calculator: Right
r
Calculator: Bottom
b
Calculator: Left
l
Calculator: Distance
d
Projection: Top
w
Projection: Left
a
Projection: Bottom
s
Projection: Right
d
Viewport Ruler
Shift + r
Chain Rulers
Shift + Click
Nudge Ruler
Arrow Keys

Shortcut Configurator

Customize your workflow. Keybindings are local to this generator.Tip: Calculator and Projection modes are state-exclusive, so they can safely share keys (like "D").

Core Commands
Calculator Triggers
Projection Alignment
Ready to paste! 📋