# @types/react-youtube-embed

> TypeScript definitions for react-youtube-embed

Latest version **1.0.5** (published 2025-05-20) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/react-youtube-embed
pnpm add @types/react-youtube-embed
yarn add @types/react-youtube-embed
bun add @types/react-youtube-embed
```

## Health

**Score 50/100 (C)** — status: stable.

Positive: has types; no vulnerabilities; popular repo; extremely popular.

Warnings: low downloads; no esm support.

Negative: stale.

## Facts

| | |
|---|---|
| Version | 1.0.5 |
| Published | 2025-05-20 |
| First published | 2018-05-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 4.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51420 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/react-youtube-embed
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-youtube-embed
- npm.io page: https://npm.io/package/@types/react-youtube-embed

## Dependencies (1)

- [@types/react](https://npm.io/package/@types/react.md) *

## Recent versions

- 1.0.5 (latest) — 2025-05-20
- 1.0.4 (ts5.0) — 2023-11-07
- 1.0.2 (ts3.7) — 2021-07-08
- 1.0.1 (ts3.4) — 2018-08-06
- 1.0.0 (ts2.6) — 2018-05-22
- 1.0.3 — 2023-10-18

## README

# Installation
> `npm install --save @types/react-youtube-embed`

# Summary
This package contains type definitions for react-youtube-embed (https://github.com/escaladesports/react-youtube-embed#readme).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-youtube-embed.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-youtube-embed/index.d.ts)
````ts
import * as React from "react";

declare namespace YouTubeEmbed {
    interface YouTubeEmbedProps {
        id: string;

        /**
         * Set an aspect ratio or percentage.
         * @default "16:9"
         */
        aspectRatio?: string | undefined;

        /**
         * Prepends a string to the embed URL (before the YouTube ID).
         * @default "https://www.youtube.com/embed/"
         */
        prependSrc?: string | undefined;

        /**
         * Appends a string to the embed URL.
         * @default ""
         */
        appendSrc?: string | undefined;

        width?: number | string | undefined;
    }
}

declare class YouTubeEmbed extends React.Component<YouTubeEmbed.YouTubeEmbedProps> {}

export = YouTubeEmbed;

````

### Additional Details
 * Last updated: Tue, 20 May 2025 17:35:34 GMT
 * Dependencies: [@types/react](https://npmjs.com/package/@types/react)

# Credits
These definitions were written by [Charles Salmon](https://github.com/charles-salmon).

---
_Source: https://npm.io/package/@types/react-youtube-embed · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
