Brand Image

A responsive picture with focal point and loading priority.

A cobalt ceramic cup of coffee on a brushed steel counter in morning light.
import { BrandImage } from '@brand-studio/ui';
import { cup } from '@/demos/assets';

export default function BrandImageDemo() {
  return (
    <div style={{ width: '100%', maxWidth: 560, aspectRatio: '3 / 2', borderRadius: 'var(--bs-radius)', overflow: 'hidden' }}>
      <BrandImage asset={cup} sizes="(min-width: 768px) 560px, 100vw" />
    </div>
  );
}

Installation

pnpm add @brand-studio/ui

Usage

import { BrandImage } from '@brand-studio/ui';
<BrandImage asset={cup} sizes="(min-width: 768px) 50vw, 100vw" />

Accessibility

  • priority loads the image eagerly with high fetch priority; use it for the first image on a page.
  • focalPoint keeps the subject in frame when the image is cropped.

API Reference

PropTypeDefault
assetImageAsset
priority?booleanfalse
className?string''
sizes?string'100vw'

Still, Deskhand and Hollis are fictional brands. The coffee photographs are original generated artwork. @brand-studio/ui is MIT licensed.