Components/Marketing/AdUnit

AdUnit

Marketing

Fixed-dimension ad creative — 11 platform presets (LinkedIn, Reddit, X, Meta) for PNG export.

Fixed-dimension ad creative. Eleven platform presets cover LinkedIn, Reddit, X, and Meta. Each preset renders at its exact platform dimensions via inline style={{ width, height }}, so Playwright or a headless browser can screenshot the rendered element to produce ready-to-upload PNGs.

See the full gallery at /docs/ads.

Presets

PlatformPresetDimensions
LinkedInlinkedinLandscape1200 × 627
LinkedInlinkedinSquare1080 × 1080
LinkedInlinkedinStory1080 × 1920
RedditredditLink1200 × 628
RedditredditSquare1200 × 1200
RedditredditMrec300 × 250
XxLandscape1600 × 900
XxSummary1200 × 675
MetametaSquare1080 × 1080
MetametaPortrait1080 × 1350
MetametaStory1080 × 1920

Usage

import { AdUnit } from "nosible-ux"

export default function Example() {
  return (
    <AdUnit
      preset="linkedinLandscape"
      eyebrow="RESEARCH DESK · v1.0"
      headline="Build at the speed of signal"
      subhead="Live market context, AI-native research, one surface."
      cta="Request access"
      data-ad-id="linkedin-landscape"
    />
  )
}

Examples

Square (LinkedIn / Meta / Reddit)

MREC (300×250)

Manual dimensions

For platforms not covered by a preset, pass explicit width, height, and layout:

<AdUnit
  width={600}
  height={500}
  layout="square"
  headline="Custom slot"
/>

PNG export

Every AdUnit carries data-ad-id plus role="img" + aria-label={headline}. The bundled export:ads script loops every preset, sets the viewport to the exact platform dimensions, and screenshots the locator:

pnpm --filter nosible-ux-website export:ads
# → ads-export/<preset>.png

Props

Name TypeDefaultDescription
accentStripe
boolean | undefinedAdds a 2 px Neo Green left stripe — brand signal accent. Default: `true` for dark tones.
anchor
"center" | "top-left" | "top-center" | "top-right" | "center-left" | "bottom-left" | "bottom-center" | "bottom-right" | undefinedWhere the content stack anchors inside the frame. Default: `"bottom-left"`.
asChild
boolean | undefinedWhen true, merges styles onto the child element instead of rendering a `<div>`.
backgroundAlt
string | undefinedAlt text for the backdrop — ad units are static creative so keep descriptive for cataloguing.
backgroundFit
"fill" | "cover" | "contain" | undefinedBackdrop fit. Default: `"cover"`.
backgroundPosition
"center" | "top-left" | "top-right" | "bottom-left" | "bottom-right" | "top" | "bottom" | "left" | "right" | undefinedBackdrop focal point. Default: `"center"`.
backgroundSrc
string | undefinedBackdrop image URL — illustration or share-cover.
cta
ReactNodeNon-interactive CTA label rendered as a filled chip. Pass `null` to hide.
data-ad-id
string | undefinedExtra data attribute used by PNG export tooling to locate ads on a gallery page.
eyebrow
ReactNodeOptional pre-headline label (Space Mono, uppercase, tracked).
headline
ReactNodePrimary headline — Space Grotesk. Required.
height
number | undefinedExact export height in CSS pixels. Required when `preset` is not set.
layout
AdLayout | undefinedLayout archetype — drives typography / padding. Required when `preset` is not set.
logo
ReactNodeLogo node rendered in the corner. Defaults to the Nosible wordmark.
overlay
"strong" | "none" | "soft" | "medium" | "solid" | "gradient-top" | "gradient-bottom" | "gradient-left" | "gradient-right" | "gradient-diagonal" | undefinedOverlay painted over the backdrop. Default: `"gradient-bottom"` when backdrop is set, else `"none"`.
preset
"linkedinLandscape" | "linkedinSquare" | "linkedinStory" | "redditLink" | "redditSquare" | "redditMrec" | "xLandscape" | "xSummary" | "metaSquare" | "metaPortrait" | "metaStory" | undefinedPreset key — auto-fills `width`, `height`, and `layout`. Override individual props below to customise.
subhead
ReactNodeOptional supporting copy.
tone
"obsidian" | "slate" | "accent" | undefinedBase colour of the ad frame. Default: `"obsidian"`.
width
number | undefinedExact export width in CSS pixels. Required when `preset` is not set.