prongs
GitHub

media.embed

Another page shown inside this one: a video player, an article preview, a map. Its alt becomes the frame title

Component

Renders

<iframe>

Profile

Comes from

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

Example

Preview
AL
<Media intent="media.embed" src={video.embedUrl} alt="What the frame shows" />

Connections

Choosing between neighbours

  • If it is

    Use

  • Another page shown inside this one: a video player, an article preview, a map. Its alt becomes the frame title

    media.embed
  • A picture

    media.image

For registry authors

Pack intent. prongs add editorial puts the editorial 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.embed 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.embed

    Another page shown inside this one: a video player, an article preview, a map. Its alt becomes the frame title

    border-0
Final classes
flex aspect-video w-full items-center justify-center
overflow-hidden rounded-lg bg-surface-active object-cover
text-sm text-surface-muted border-0
Definition
TS
'media.embed': {
kind: 'semantic',
description: 'Another page shown inside this one: a video player, an article preview, a map. Its alt becomes the frame title',
refs: ['frame.cover'],
binding: { element: 'iframe', classes: 'border-0' },
notFor: [{ context: 'a picture', instead: 'media.image' }],
},