Media slot

Playground

Select an image to preview, replace or remove it. Files selected in this example stay in your browser; they are not uploaded or saved.

Properties

Size
Shape
State

Usage

Use state to show empty, uploading, error and filled states. Your app handles file selection and uploading.

'use client';
import { MediaSlot } from '@mbsw/ui';

export default function Example() {
  return <MediaSlot state="empty" aria-label={"Choose an image file"} />;
}

The Playground Code tab includes the full example with your current settings. See Installation for the CSS imports.

Composition