Marketing sectionsBentoMedia

Open in Create
Search
astronomic.dev

BentoMedia

Pro

To show several strengths at once in tiles of different sizes, each with a photo above, beside or behind its text.

File
BentoMedia.astro
Group
Marketing sections
Kind
Static: no JavaScript
Examples
3
import BentoMedia from "@astronomic/ui-pro/components/BentoMedia.astro";

Examples

Drag the orange handle to set the width. Frames get real breakpoints.

  • Static
  • Interactive
  • Framed

Studio strengths with pictures

Seven tiles, each with a photo above its title and text. In the large, the tall and the wide tile the photo fills the free height, cropped to cover; in a normal tile it keeps 16/9, so the normal tiles set the row height. The photo sits above the text, the default mediaPlacement.

main.astro

Photos beside the text

mediaPlacement="start" and "end" put the photo beside the text once that tile is 28rem wide: here the large tile and the three wide ones are. The two normal tiles are narrower, so their photos stack, above the text for start and below it for end. On a phone every tile stacks.

beside.astro

Text on the photo

Every tile has mediaPlacement="behind": the photo fills the tile and the text sits on a scrim that keeps it readable on any picture. Two tiles are links with a viewText cue, so the grid packs sparsely; the large, tall and two normal tiles fill it with no hole.

behind.astro
Minimal · Light

Waitlist

Be first in line

Join the waitlist and we'll email you the moment it's out.

You'll also get our newsletter: new themes, plugins and guides. Unsubscribe any time.