> ## Documentation Index
> Fetch the complete documentation index at: https://api.fanvue.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# 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.

```tsx theme={null}
import { formatPlayChipDuration, MediaPlayChip } from "@fanvue/ui";
import type { MediaPlayChipProps } from "@fanvue/ui";
```

## Examples

## On Light Media

[MediaPlayChip — On Light Media](https://main--697a1b6dd4dad73ee9c0e5f5.chromatic.com/iframe.html?id=components-mediaplaychip--on-light-media\&viewMode=story\&shortcuts=false\&singleStory=true\&globals=theme:light)

```tsx theme={null}
import { MediaPlayChip } from "@fanvue/ui";

<MediaPlayChip
  className="absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2"
  duration={42}
/>
```

## On Selectable Tile

[MediaPlayChip — On Selectable Tile](https://main--697a1b6dd4dad73ee9c0e5f5.chromatic.com/iframe.html?id=components-mediaplaychip--on-selectable-tile\&viewMode=story\&shortcuts=false\&singleStory=true\&globals=theme:light)

```tsx theme={null}
import { formatPlayChipDuration, MediaPlayChip } from "@fanvue/ui";

<button
  type="button"
  aria-label={["Beach video", formatPlayChipDuration(42)].filter(Boolean).join(", ")}
  className="absolute inset-0 cursor-pointer"
>
  <MediaPlayChip
    className="absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2"
    duration={42}
  />
</button>
```

## Icon Only

[MediaPlayChip — Icon Only](https://main--697a1b6dd4dad73ee9c0e5f5.chromatic.com/iframe.html?id=components-mediaplaychip--icon-only\&viewMode=story\&shortcuts=false\&singleStory=true\&globals=theme:light)

```tsx theme={null}
import { MediaPlayChip } from "@fanvue/ui";

<MediaPlayChip
  className="absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2"
/>
```

## Long Video

[MediaPlayChip — Long Video](https://main--697a1b6dd4dad73ee9c0e5f5.chromatic.com/iframe.html?id=components-mediaplaychip--long-video\&viewMode=story\&shortcuts=false\&singleStory=true\&globals=theme:light)

```tsx theme={null}
import { MediaPlayChip } from "@fanvue/ui";

<MediaPlayChip
  className="absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2"
  duration={3725}
/>
```

## 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`.

**duration** `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](https://api.fanvue.com/docs/ui/installation.md) · [Theming](https://api.fanvue.com/docs/ui/theming.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.