Content

Frame

A box with a fixed aspect ratio that crops its content to fit. Golden unless told otherwise.

Examples

Frames

1:1
φ
16:9

Portrait

1:φ

Anatomy

.frameRatio box on a tinted fill, clipping overflow.
> *Any child, usually an <img> or <video>, stretched to cover the box.

API

AttributeValuesDescription
data-ratiogoldensquarevideoportraitgolden φ:1 is the default; square is 1:1, video 16:9, portrait 1:φ.

Accessibility

  • The frame is a plain box and adds no semantics. Put alt on the image inside, or wrap it in a <figure> with a caption.
  • Cropping can cut off what the image is about. Keep important detail near the centre, or describe it in the alt.
Jump to
ProportionFoundations
MaterialFoundations
PresetsFoundations
ShellLayouts · Application
Container and stacksLayouts · Pages
SplitLayouts · Pages
Grid, bento, masonryLayouts · Pages
Switcher and rowLayouts · Pages
↑↓Move↵OpenescClose