media.artwork
The cover art of something people play, read or watch: an album, a book, a film poster. Taller than it is wide
Media intents
Example
<Media intent="media.artwork" src={post.coverUrl} alt="What the image shows" />Choosing between neighbours
Find the row that describes your element, and use the intent on the right.
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.artworkthis pageAn image that illustrates an article
media.image
Connections
Declared in the registry, both directions. Where an intent is used in your own code is something check and the gallery see; this site has no app code.
- Built from
For registry authors
Starter intents. These are the intents prongs add puts in your registry, shown in this site’s theme. Yours are your own registry.ts: 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.coverWide 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-muted object-cover text-sm text-muted-foreground
media.artworkThe cover art of something people play, read or watch: an album, a book, a film poster. Taller than it is wide
aspect-[3/4]
flex w-full items-center justify-center overflow-hidden rounded-lg bg-muted object-cover text-sm text-muted-foreground aspect-[3/4]
'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',
},
],
},