Skip to main content

Examples

On Light Media

On Selectable Tile

Icon Only

Long Video

Props

formatPlayChipDuration

A video’s length as the chip shows it: mm:ss, or hh:mm:ss from an hour. Returns undefined for a missing, non-finite or sub-second length. Use it to put the same length in the label of the tile the chip sits on. Takes no props of its own beyond the standard attributes of the element it renders.

MediaPlayChip

Marks a video tile with a play icon and its length, or a 32px circle with the icon alone when the length is unknown. The chip is decorative, so the tile it sits on carries the label and the action. It is white on a translucent white fill on every theme, as it sits over media rather than the page. The chip has no position of its own; the host places it, e.g. centred with absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2.
number
Length of the video in seconds, shown next to the icon as mm:ss, or hh:mm:ss from an hour. Lengths under a second are not shown.

Exported types

Also exported from @fanvue/ui: MediaPlayChipProps.
Setup: Installation · Theming