MediaView

An image, an audio clip, a video or a file from a request, with a line that names it and a download.

View source
Image (PNG, 1,024 × 768, 1.2 MB)Download
import { MediaView } from "@logicplanes/kaeso-ui";

Props

  • detail
    string

    What the file is, after its name: its format, dimensions and size.

  • download
    string

    The address the download saves from, when it isn't the one shown or played, such as a blob: URL beside an image's data: URL.

  • filename
    string

    The name the download saves under; without it the browser chooses one.

  • kind
    "file" | "image" | "audio" | "video" = image

    What the file is: an image, audio, a video, or a file that can only be downloaded.

  • label
    string

    What the file is or shows, in words: the caption, the image's text alternative and the player's accessible name.

  • src
    string

    The file's address: a data: URL for an image, a blob: URL for audio and video where the content security policy allows no other.