Data displayMediaShape

Open in Create
Search
astronomic.dev

MediaShape

Pro

For a photo with a shaped frame: a curved cutout where a badge, a button or a figure sits, or an arch, ticket or blob shape.

File
MediaShape.astro
Group
Data display
Kind
Interactive: inline script
Examples
11
import MediaShape from "@astronomic/ui-pro/components/MediaShape.astro";

Examples

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

  • Static
  • Interactive
  • Framed

Corner badge

A Badge in the bottom-end slot: the frame is cut around it, and the page shows through the cut.

main.astro

Corner button

A round icon link in a square notch: a Button with an aria-label, made round at the large control size.

corner-button.astro

Two corners

A small label box (a label and a title, from type roles) in top-start, and a round icon link in bottom-end. Each corner gets its own notch. The label box is bare text, so it takes notch-float and floats clear of the frame's edges; the icon link sits flush in its corner.

two-corners.astro

Bottom tab

A Button in bottom-center: a tab cut from the middle of the bottom edge, for one call to action.

bottom-tab.astro

Big stat corner

A tall photo (ratio="4/5") with one figure in top-end, in the stat role sized to the frame, so the deep notch fits it at any width. Bare text, so it takes notch-float.

big-stat.astro

Slanted corner

angle={40}: the notch's wall that meets the bottom edge slopes, so the cut widens toward it.

slanted-corner.astro

Slanted tab

angle={35} on a bottom tab: both walls slope, so the tab is a trapezoid.

slanted-tab.astro

Round bite

shape="bite": a round bite out of the bottom-end corner that hugs one round item, here a round play link with an aria-label. The bite is a circle on the item's larger side plus the gap, so it is made for a round item: a square one's corners would sit on the photo.

round-bite.astro

Arch

shape="arch": a round top on a tall photo (ratio="4/5"). An arch wants a tall ratio; on a wide one the top flattens. It takes no items.

arch.astro

Ticket

shape="ticket": a round punch in the middle of each side, for an event or an offer, with a caption. It takes no items.

ticket.astro

Blob

shape="blob": an uneven, soft outline on a square photo (ratio="1/1"). It takes no items.

blob.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.