prongs
GitHub

media.artwork

The cover art of something people play, read or watch: an album, a book, a film poster. Taller than it is wide

Component

Renders

<img>

Profile

Comes from

Read https://www.prongs.dev/docs/intents/media/artwork.md and tell me whether media.artwork fits what I am building.

Example

Preview
Ada LovelaceAL
<Media intent="media.artwork" src={post.coverUrl} alt="What the image shows" />

Connections

Choosing between neighbours

  • If it is

    Use

  • The cover art of something people play, read or watch: an album, a book, a film poster. Taller than it is wide

    media.artwork
  • An image that illustrates an article

    media.image

For registry authors

Pack intent. prongs add media puts the media pack’s intents in your registry. They are then yours like the starter intents: rename, restyle and add to them, and see them with prongs add gallery.

What this intent is built from and its entry in components/prongs/registry.ts. You only need this to change how it looks or to add an intent like it.

How media.artwork resolves, and its definition

Each layer adds to the one before it; a later class wins over an earlier one that sets the same thing.

  • frame.cover

    Wide rounded rectangle; centres the fallback text when there is no image

    flex aspect-video w-full items-center justify-center
    overflow-hidden rounded-lg bg-surface-active object-cover
    text-sm text-surface-muted
  • media.artwork

    The cover art of something people play, read or watch: an album, a book, a film poster. Taller than it is wide

    aspect-[3/4]
Final classes
flex w-full items-center justify-center overflow-hidden
rounded-lg bg-surface-active object-cover text-sm
text-surface-muted aspect-[3/4]
Definition
TS
'media.artwork': {
kind: 'semantic',
description: 'The cover art of something people play, read or watch: an album, a book, a film poster. Taller than it is wide',
refs: ['frame.cover'],
binding: { classes: 'aspect-[3/4]' },
notFor: [
{
context: 'an image that illustrates an article',
instead: 'media.image',
},
],
},