Linx logoLinx Docs
On this page
On this page

Media Players

Embed videos, configure ratios, and render custom images/GIFs with skeleton states.

Media

Media Players

Embed external and native video streams and customize image rendering options in documentation.

1. Video Player

Linx Books supports embedding YouTube, Vimeo, and custom native HTML5 videos (.mp4, .webm, etc.) with customizable properties and custom layout aspect ratios.

YouTube Embed Example

To embed a YouTube video, provide either the YouTube video ID or URL:

Vimeo Embed Example

To embed a Vimeo video, provide either the Vimeo ID or URL:

Native Video Example

To embed a native HTML5 video, provide the direct video file URL:


2. Custom Image Component

Linx Books provides a premium, responsive image component (ui:image) that supports local/remote image and GIF URLs, includes a skeleton loading animation, offers an elegant broken-link fallback card, and supports layout-specific titles.

Size Configurations

The size prop controls the rendering layout:

  • size: full: Renders a full-width image with title as a glassmorphic badge overlaying the bottom-right corner.
  • Whitelist Ratios & auto (video, square, portrait, cinema, 4:3, auto): Centers the image container on the page, keeps its width within bounds without stretching it (w-fit), and renders the title as a caption underneath the image.

Full-Width Layout with Badge Overlay (size: full)

Abstract Gradient Art (Full Mode)

Centered Layout with Whitelist Ratio (size: square)

Setting the size to a whitelisted ratio centered layout (e.g. square):

Classic Oil Painting Masterpiece (Square Ratio - Centered)

Centered Layout with Auto Aspect Ratio (size: auto)

Setting the size to auto centers the image on the page while maintaining its natural proportions:

Dynamic Animated GIF Loading Demo (Auto Ratio - Centered)

Failure Fallback UI

If an image fails to load or has an invalid URL, a premium error card is displayed gracefully:

Non-Existent Image