---
title: "Ruler animated icon"
description: "Ruler animated icon (Education). Light: a measuring pulse runs along the ticks, each lengthening 0.6 units in turn. Strong: the pulse runs faster and deeper (1.5 units) while the ruler rocks 2.5° and settles."
canonical: https://generativeicons.com/icons/ruler/
---

# Ruler animated icon

Light: a measuring pulse runs along the ticks, each lengthening 0.6 units in turn. Strong: the pulse runs faster and deeper (1.5 units) while the ruler rocks 2.5° and settles.

- Id: `ruler`
- Category: Education
- Search terms: measure, measuring, measurement, length, inches, centimeters, centimetres, cm, millimeters, straightedge
- One action, back to rest
- Styles: outline, solid, duotone; outline weights 1.5, 2, 2.5 (any from 1 to 3); motion light or strong
- File: https://generativeicons.com/assets/ruler.lottie (dotLottie, 8983 bytes, sha256 019ec44bd6eb0f7269691063b1e36b7c71940911c6896263e37f44211075df24)
- License: MIT

## Install

```sh
npm install @lottiefiles/generative-icons-runtime
npx generative-icons init
npx generative-icons add ruler
```

## React

```tsx
// npm install @lottiefiles/generative-icons-react
'use client';
import { AnimatedIcon } from '@lottiefiles/generative-icons-react';
import icon, { src } from './generative-icons/ruler.mjs';

export function RulerIcon() {
  return <AnimatedIcon icon={icon} src={src} size={32}
    color="#ffffff" variant="outline" weight={2}
    motion="light" theme="dark" />;
}
```

## JavaScript

```js
import { createIcon } from '@lottiefiles/generative-icons-runtime';
import icon, { src } from './generative-icons/ruler.mjs';

const handle = await createIcon(canvas, {
  icon, src,
  color: '#ffffff', style: 'outline', weight: 2,
  motion: 'light', theme: 'dark'
});
button.addEventListener('click', () => handle.play());
// On removal: handle.destroy();
```

More: https://generativeicons.com/icons/ruler/ · https://generativeicons.com/api/icons/ruler
