---
title: "Embed animated icon"
description: "Embed animated icon (Actions). A code snippet is embedded. Light: the slash lifts out and the brackets part to make room, then the slash drops back in between them from above and stops dead, and the brackets clamp shut on it, close a little past their place and settle. Strong: the brackets part wider, the slash drops from higher and lands with a bounce, and the brackets slam shut and rebound twice."
canonical: https://generativeicons.com/icons/embed/
---

# Embed animated icon

A code snippet is embedded. Light: the slash lifts out and the brackets part to make room, then the slash drops back in between them from above and stops dead, and the brackets clamp shut on it, close a little past their place and settle. Strong: the brackets part wider, the slash drops from higher and lands with a bounce, and the brackets slam shut and rebound twice.

- Id: `embed`
- Category: Actions
- Search terms: code, code snippet, snippet, html, iframe, source code, angle brackets, markup, insert code, view source, xml
- 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/embed.lottie (dotLottie, 3207 bytes, sha256 cf1309318394c7f386beaee8b655a889d0179929f5d6d1ab7883d03ea03d967a)
- License: MIT

## Install

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

## React

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

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