Star 历史趋势
数据来源: GitHub API · 生成自 Stargazers.cn
README.md
Mesurer

npm version downloads

Mesurer is a lightweight measurement and alignment overlay for React apps. Toggle it on, select elements, and measure distances directly in the browser.

Full documentation

Install

npm install mesurer

Usage

import { Measurer } from "mesurer"; function App() { return ( <> <YourApp /> <Measurer /> </> ); }

No additional CSS import is required.

Props

PropDescription
highlightColorBase color for selection/hover overlays (defaults to oklch(0.62 0.18 255)).
guideColorBase color for guides (defaults to oklch(0.63 0.26 29.23)).
hoverHighlightEnabledDisables hover highlight and deselects on click when false.
persistOnReloadPersists state in localStorage as mesurer-state when true.

Commands

ShortcutAction
MToggle measurer on/off.
SToggle Select mode.
GToggle Guides mode.
HSet guide orientation to horizontal.
VSet guide orientation to vertical.
AltTemporarily enable option/guide measurement overlays.
EscClear all measurements and guides.
Backspace / DeleteRemove selected guides.
Cmd/Ctrl + ZUndo.
Cmd/Ctrl + Shift + ZRedo.

Features

  • Toggle on/off – Enable the overlay with a single shortcut
  • Select mode – Click elements to measure their bounds
  • Guides mode – Add vertical or horizontal guides
  • Distance overlays – Hold Alt for quick spacing checks
  • Undo/redo – Command history for guide and measurement changes
  • Persist state – Keep guides and measurements on reload

Requirements

  • React 18+

License

Licensed under the MIT License.

关于 About

No description, website, or topics provided.

语言 Languages

TypeScript97.9%
HTML0.9%
CSS0.8%
JavaScript0.3%

提交活跃度 Commit Activity

代码提交热力图
过去 52 周的开发活跃度
13
Total Commits
峰值: 13次/周
Less
More

核心贡献者 Contributors