Embed
The Embed component allows you to include local assets directly in your documentation. This is useful for displaying PDFs, images, videos, OpenAPI files, and other media files.
Properties
Path to your local asset (relative to current MDX file)
MIME type of the asset (e.g. ‘video/mp4’, ‘application/pdf’)
Width of the embedded content. Can be a number (interpreted as pixels) or a string with CSS units (e.g. ‘100%’, ‘500px’, ‘50vw’)
Height of the embedded content. Can be a number (interpreted as pixels) or a string with CSS units (e.g. ‘500px’, ‘80vh’)
Examples
Video File
Example
Markdown
Videos with audio will automatically play when the page loads. If you want to prevent this behavior, consider using the <video>
component instead, which provides more control over playback.
PDF Document
Example
Markdown
Common MIME Types
The supported file types and behavior may vary depending on the browser and the type of content being embedded. For video files, consider using MP4 format for maximum compatibility.