Skip to content
HomeCobalt

Media tile

Shows a thing by its picture first: a room, a venue, an event, a listing.

Examples

Events as tiles with the photo first, one link per tile and a bookmark on each photo.

Film night

Thu, Oct 22, 7:30 PM

Screening room, Arts building

Fjord walk

Sun, Oct 25, 9:00 AM

Meet at the harbour car park

States

LoadingWhile the events load, each tile keeps its size, a grey square and lines where the words will go.

Usage

Use it when

  • A list where the picture is how a person chooses: rooms, venues, listings, events.
  • Search results for things people recognise by sight.

Use something else when

  • The list is read by name and compared by figures. Use Item instead, or Table.
  • The thing has no picture of its own. Use Item instead; a tile with a placeholder in every square is a list pretending to be a gallery.
  • A record's details in a side column. Use Card instead.

Rules

General

Content

Avoid

Limits

Install

npx shadcn@latest add https://kaanarici.com/r/cobalt/media-tile.json
import { MediaTile, MediaTileMedia, MediaTileTitle, MediaTileMeta } from "@/components/cobalt/ui/media-tile"