Skip to content

Media & display

Images, galleries and small display elements. Carousels pause on hover and focus and never auto-advance under reduced motion; every image requires alt text.

11 components on this page. Every demo is live — change the theme in the header or flip a demo to right-to-left with its RTL button. 8 of them are React-only for now; Vue, Svelte and Angular versions are coming.

Galleria Link to Galleria

An image gallery with thumbnails, captions and a full-screen mode.

Live demo
Illustration of Petra
Petra — Jordan

Image 1 of 6

Showing: 1 of 6

Props

PropTypeDescription
items { src, alt, thumbnailSrc?, caption? }[] Images.
label string Accessible name (required).
showThumbnails / showCaptions boolean UI parts.
fullScreen boolean Adds a full-screen viewer.
activeIndex / onActiveIndexChange number Controlled index.

Accessibility

Galleria keyboard support
KeyAction
Arrow Left / Arrow Right Previous / next image (mirrored in RTL)
Escape Leave full screen

Code

ReactComing to Vue, Svelte and Angular.

Galleria · React
<Galleria label="Trip photos" items={photos} showThumbnails showCaptions fullScreen />

Image Link to Image

An image with an optional zoomable, rotatable preview overlay.

Live demo

Click an image (or focus it and press Enter) to preview, zoom and rotate.

Props

PropTypeDescription
src / alt string Image and required alt text.
preview boolean Click to open the preview.
previewSrc string Higher-resolution source for the preview.

Accessibility

Image keyboard support
KeyAction
Enter / Space Open the preview
Escape Close the preview

The preview is a modal dialog with a labelled toolbar (zoom, rotate, close).

Code

ReactComing to Vue, Svelte and Angular.

Image · React
<Image src="/photos/amman.jpg" alt="Amman citadel at sunset" width={240} preview />

ImageCompare Link to ImageCompare

Compare two images with a draggable divider.

Live demo
Warm, colour-graded photoOriginal, cool-toned photo

Divider: 50%

Props

PropTypeDescription
before / after { src, alt } The two images.
value / onChange number (0–100) Divider position.
label string Accessible name of the slider.

Accessibility

ImageCompare keyboard support
KeyAction
Arrow keys Move the divider
Home / End Show only one image

The divider is a native range input, so it works with every assistive technology.

Code

ReactComing to Vue, Svelte and Angular.

ImageCompare · React
<ImageCompare label="Before and after retouching"
  before={{ src: before, alt: 'Original photo' }} after={{ src: after, alt: 'Edited photo' }} />

Avatar Link to Avatar

A user picture with initials fallback.

Live demo
LHOSSN

Props

PropTypeDescription
name string Used for initials and the accessible name.
src string Optional image.
size 'sm' | 'md' | 'lg' Size.

Accessibility

Code

Avatar · React
<Avatar name="Lina Haddad" />
<Avatar name="Omar Saleh" src="/omar.jpg" size="lg" />

Badge Link to Badge

A small status label.

Live demo
NeutralPrimaryActivePendingOverdueBeta

Props

PropTypeDescription
variant 'neutral' | 'primary' | 'info' | 'success' | 'warning' | 'danger' Colour and meaning.

Accessibility

Status is carried by the text, not only the colour, and every variant meets 4.5:1 contrast in all themes.

Code

Badge · React
<Badge variant="success">Active</Badge>

Tag Link to Tag

A label for categorising, optionally removable.

Live demo
Design systemAccessibilityRTLCharts

Props

PropTypeDescription
removable / onRemove boolean / () => void Adds a remove button.
children ReactNode Label.

Accessibility

Tag keyboard support
KeyAction
Enter / Space Remove (on the remove button)

Code

Tag · React
<Tag removable onRemove={() => remove('design')}>Design</Tag>

Chip Link to Chip

A compact element with an image or icon, for people, filters or selections.

Live demo
Lina HaddadOmar SalehSara NasserAmmanRemote OK

Props

PropTypeDescription
label string Text.
image / imageAlt string Leading image.
icon ReactNode Leading icon.
removable / onRemove / removeLabel … Remove button and its name.

Accessibility

Code

ReactComing to Vue, Svelte and Angular.

Chip · React
<Chip label="Lina Haddad" image={avatar} imageAlt="" removable onRemove={drop} />
<Chip label="Amman" icon="📍" />

MeterGroup Link to MeterGroup

Several values stacked in one bar, such as storage by type.

Live demo

Props

PropTypeDescription
value { label, value, color? }[] Segments.
label string Accessible name (required).
min / max number Scale.
showLegend / formatValue boolean / fn Legend and value formatting.

Accessibility

A labelled group of role="meter" segments, each with its own label and aria-valuetext; segments also differ by pattern, not only colour.

Code

ReactComing to Vue, Svelte and Angular.

MeterGroup · React
<MeterGroup label="Storage" max={256} formatValue={(v) => v + ' GB'} value={[
  { label: 'Apps', value: 64, color: 'primary' },
  { label: 'Photos', value: 48, color: 'success' },
  { label: 'System', value: 24, color: 'warning' },
]} />

FileUpload Link to FileUpload

Choose or drop files, validate size and type, and show upload progress.

Live demo

Drag and drop files here, or use Choose.

Status: No uploads yet

Props

PropTypeDescription
mode 'basic' | 'advanced' Single button or drop zone with a file list.
accept / multiple / maxFileSize / fileLimit … Validation.
auto boolean Upload right after choosing.
onUpload (files, { onProgress }) => Promise Your upload; report progress per file.
onSelect / onRemove / onError callbacks Lifecycle.

Accessibility

FileUpload keyboard support
KeyAction
Enter / Space Open the file chooser
Tab Reach upload, cancel and per-file remove buttons

Validation errors and upload completion are announced; drag and drop is optional, never required.

Code

ReactComing to Vue, Svelte and Angular.

FileUpload · React
<FileUpload label="Attachments" multiple accept="image/*,.pdf" maxFileSize={2_000_000}
  onUpload={async (files, { onProgress }) => {
    for (const f of files) await send(f, (p) => onProgress(f, p));
  }} />

Terminal Link to Terminal

A command-line style console that runs your command handler.

Live demo
Welcome to the Pelagic UI demo shell. Type help and press Enter.

Props

PropTypeDescription
onCommand (command) => ReactNode | Promise<ReactNode> Returns the response.
prompt string Prompt text. Default "$".
welcomeMessage ReactNode First line.
label string Accessible name.

Accessibility

Terminal keyboard support
KeyAction
Enter Run the command
Arrow Up / Arrow Down Command history

Responses are added to a log region and announced; the terminal stays left-to-right even in RTL pages.

Code

ReactComing to Vue, Svelte and Angular.

Terminal · React
<Terminal label="Demo shell" welcomeMessage="Type help"
  onCommand={(cmd) => cmd === 'date' ? new Date().toString() : 'Unknown command: ' + cmd} />

Search Pelagic UI