Embedded assets and files
Embed local assets like PDFs, videos, and other media directly in your documentation using native HTML5 tags. This allows you to include rich content without relying on external hosting.
Supported tags
Fern supports using the <embed src="..." /> tag to embed external content and the <source src="..." /> tag to embed media or image sources.
Usage (embed video)
Variants
Video file with video tag
Videos with audio will automatically play when the page loads. Using <video> component disables this behavior and provides more control over playback.
PDF document
Downloadable assets
Properties
Path to your local asset (relative to current MDX file)
MIME type of the asset (e.g. ‘video/mp4’, ‘application/pdf’)
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.
Downloadable asset properties
Enable users to download assets from within your documentation, instead of linking to them, by using the <Download> component.
Path to your local asset (relative to current MDX file). The asset must be located within the fern folder.
The text or element to display as the click target for the download.
The filename to use for the downloaded asset. If not provided, the filename will be the same as the asset’s name.