Neo-Brutalist Angular Media Frame

Media Frame

Use nbMediaFrame for framed visual content: images, video, illustrations, portraits, waveforms, maps, product previews, or any media-like block.

12Tones
7Ratios
6Shapes
Source ↗Open Docs

Preview

Neo-brutalist media frame landscape
Neo-brutalist media frame circle
Neo-brutalist media frame square

Usage

Add the directive to the element that owns the frame. Captions, labels, badges, and actions belong outside the primitive.

Import
import { NbMediaFrame } from '@ng-brutalism/ui';
Template
<div nbMediaFrame>
  <img src="/..." alt="" />
</div>

<div nbMediaFrame ratio="16/9" tone="lavender">
  <video src="/..." />
</div>

<div nbMediaFrame ratio="1/1" fit="cover">
  <img src="/profile.png" alt="Profile" />
</div>

Ratios

AutoNo ratio enforced — content defines the height
Auto ratio demo
1 / 1Square — profiles, avatars, album art
1 / 1 ratio demo
3 / 4Portrait — headshots, covers, vertical art
3 / 4 ratio demo
4 / 3Classic photo — product cards, listings
4 / 3 ratio demo
3 / 2Editorial — standard photography ratio
3 / 2 ratio demo
16 / 9Video — presentations, hero images
16 / 9 ratio demo
21 / 9Cinematic — immersive panoramic banners
21 / 9 ratio demo

Fit

CoverFills the frame and crops to fit — best for hero images
Cover fit demo
ContainShows the full image, may reveal the background tone
Contain fit demo
FillStretches to fill the exact frame dimensions
Fill fit demo

Shape

SharpHard edges, no shadow — raw brutalist style
Sharp shape demo
PosterRounded corners with a soft offset shadow
Poster shape demo
PortraitFully circular with a bold brutalist drop shadow
Portrait shape demo

Customization

Override these CSS variables on :root, a wrapper, or the component element. More local values win, so per-instance styling can sit directly on the element.

Token Default Used for
--nb-media-frame-bg var(--nb-surface) Frame background color. Reassigned by the tone input.
--nb-media-frame-fg var(--nb-surface-foreground) Frame foreground color. Reassigned by the tone input.
--nb-media-frame-border-width var(--nb-border-width) Frame border width. Reassigned by the shadow input.
--nb-media-frame-radius 1rem Frame corner radius. Reassigned by the radius input.
--nb-media-frame-shadow none Frame box shadow. Reassigned by the shadow input.
--nb-border #000000 Border color and focus ring color
--nb-shadow #000000 Offset shadow color
--nb-radius 0rem Corner radius through the rounded-nb utility
--nb-shadow-offset-x 4px Horizontal shadow and press offset
--nb-shadow-offset-y 4px Vertical shadow and press offset
--nb-foreground #000000 Default foreground text color
--nb-background #ffffff Default surface background color

API

Input Type Default Description
tone 'default' | 'cream' | 'white' | 'black' | 'yellow' | 'pink' | 'mint' | 'lavender' | 'blue' | 'primary' | 'secondary' | 'accent' 'default' Background color shown when content doesn't fill the frame.
ratio 'auto' | '1/1' | '3/4' | '4/3' | '3/2' | '16/9' | '21/9' 'auto' Locks the frame to the given aspect ratio. 'auto' lets content define the height.
fit 'cover' | 'contain' | 'fill' 'cover' Object-fit applied to direct img, video, and picture children.
radius 'none' | 'sm' | 'md' | 'lg' | 'xl' | 'full' 'lg' Corner radius preset. Use 'full' for circular portrait frames.
shadow 'none' | 'default' | 'hard' 'none' Offset shadow preset. 'hard' adds a bold 6 px brutalist drop shadow.