---
title: "Piano keys animated icon"
description: "Piano keys animated icon (Music & audio). Light: the middle black key presses 1.4 units and lifts. Strong: the three black keys press 2.2 units in a quick run from left to right."
canonical: https://generativeicons.com/icons/piano-keys/
---

# Piano keys animated icon

Light: the middle black key presses 1.4 units and lifts. Strong: the three black keys press 2.2 units in a quick run from left to right.

- Id: `piano-keys`
- Category: Music & audio
- Search terms: synth, synthesizer, musical keyboard, keyboard instrument, midi, organ, ivories, play piano
- 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/piano-keys.lottie (dotLottie, 9247 bytes, sha256 8bfce89a7af0d79d969d9e753490efeacb3ae14b9d305dc87b39f4459042aed6)
- License: MIT

## Install

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

## React

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

export function PianoKeysIcon() {
  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/piano-keys.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/piano-keys/ · https://generativeicons.com/api/icons/piano-keys
