1 GitHub star = 1 new component.

Star the repo
Agency & Marketing

Agency Case Study Hero

Case-study header: back link, client and category, headline, summary, project facts and a big result over generated art.

case-studyheroagencyportfolio
Live Preview
All case studies

AdsNordlys

Scaling a skincare brand to 6.2ร— ROAS on Meta and Google

Nordlys had a loyal community but paid social stopped scaling past โ‚ฌ20k a month. We rebuilt tracking, campaign structure and the creative engine.

Industry
Beauty ยท D2C e-commerce
Services
Meta Ads, Google Shopping, Creative
Duration
9 months
Year
2026

6.2ร— ROASHeadline result

Usage

Copy and paste this code into your React component:

tsx
import { AgencyCaseStudyHero } from 'react-component-kit-ui/sections';

<AgencyCaseStudyHero client="Nordlys" category="Ads" title="Scaling a skincare brand to 6.2ร— ROAS" result="6.2ร— ROAS" hue={190} />

Manual Installation

If you are not using the npm package, create a new file and paste the following code: src/components/sections/AgencyCaseStudyHero.tsx + AgencyCaseStudyHero.css:

AgencyCaseStudyHero.tsx
'use client';

import type { CSSProperties } from 'react';
import './AgencyCaseStudyHero.css';

/** class:list โ†’ className */
function cx(...args: unknown[]): string {
  const out: string[] = [];
  const walk = (v: unknown) => {
    if (!v) return;
    if (typeof v === 'string' || typeof v === 'number') out.push(String(v));
    else if (Array.isArray(v)) v.forEach(walk);
    else if (typeof v === 'object') for (const [k, on] of Object.entries(v as Record<string, unknown>)) if (on) out.push(k);
  };
  args.forEach(walk);
  return out.join(' ');
}

/** "a: b; --c: d" โ†’ style object */
function st(css: string | undefined): CSSProperties {
  const o: Record<string, string> = {};
  for (const decl of String(css ?? '').split(';')) {
    const i = decl.indexOf(':');
    if (i < 0) continue;
    const k = decl.slice(0, i).trim();
    if (k) o[k.startsWith('--') ? k : k.replace(/-([a-z])/g, (_, c) => c.toUpperCase())] = decl.slice(i + 1).trim();
  }
  return o as CSSProperties;
}

/**
 * AgencyCaseStudyHero โ€” Case-study header: back link, client and category, headline, summary,
 * a big headline result, project facts (industry, services, duration, year) and a generated art
 * panel tinted by `hue` (or a real image).
 *
 * @param {string} client - Client name. Default 'Nordlys'.
 * @param {string} category - Category chip (Ads, SEO, Webโ€ฆ). Default 'Ads'.
 * @param {string} title - Headline.
 * @param {string} summary - Short summary.
 * @param {string} result - Headline result. Default '6.2ร— ROAS'.
 * @param {string} resultLabel - Caption under the result. Default 'Headline result'.
 * @param {Array<{label: string, value: string}>} facts - Project facts.
 * @param {number} hue - Art colour (0โ€“360). Default 190.
 * @param {string} image - Optional image URL replacing the art.
 * @param {string} imageAlt - Alt text for `image`. Default ''.
 * @param {{label: string, href: string}} back - Back link. Default 'All case studies'.
 * @param {string} className - Extra class.
 *
 * Accessibility: h1 headline; facts as a description list; generated art is decorative and an
 * image needs meaningful alt text via `imageAlt`.
 */
export interface AgencyCaseStudyHeroProps {
  client?: string;
  category?: string;
  title?: string;
  summary?: string;
  result?: string;
  resultLabel?: string;
  facts?: Array<{ label: string; value: string }>;
  hue?: number;
  image?: string;
  imageAlt?: string;
  back?: { label: string; href: string };
  className?: string;
}

export function AgencyCaseStudyHero({
  client = 'Nordlys',
  category = 'Ads',
  title = 'Scaling a skincare brand to 6.2ร— ROAS on Meta and Google',
  summary = 'Nordlys had a loyal community but paid social stopped scaling past โ‚ฌ20k a month. We rebuilt tracking, campaign structure and the creative engine.',
  result = '6.2ร— ROAS',
  resultLabel = 'Headline result',
  facts = [
    { label: 'Industry', value: 'Beauty ยท D2C e-commerce' },
    { label: 'Services', value: 'Meta Ads, Google Shopping, Creative' },
    { label: 'Duration', value: '9 months' },
    { label: 'Year', value: '2026' },
  ],
  hue = 190,
  image,
  imageAlt = '',
  back = { label: 'All case studies', href: '#' },
  className = '',
}: AgencyCaseStudyHeroProps) {
  return (
    <>
      <div className="ach-cq" data-rk-6f1196="">
      <section className={cx(['ach', className])} style={st(`--h: ${hue}`)} data-rk-6f1196="">
        <div className="ach__copy" data-rk-6f1196="">
          {back && <a className="ach__back" href={back.href} data-rk-6f1196=""><span aria-hidden="true" data-rk-6f1196="">โ†</span> {back.label}</a>}
          <p className="ach__meta" data-rk-6f1196=""><span className="ach__chip" data-rk-6f1196="">{category}</span><span data-rk-6f1196="">{client}</span></p>
          <h1 className="ach__title" data-rk-6f1196="">{title}</h1>
          {summary && <p className="ach__summary" data-rk-6f1196="">{summary}</p>}
          <dl className="ach__facts" data-rk-6f1196="">
            {facts.map((f, __i: number) => <div key={__i} data-rk-6f1196=""><dt data-rk-6f1196="">{f.label}</dt><dd data-rk-6f1196="">{f.value}</dd></div>)}
          </dl>
        </div>
        <div className="ach__art" data-rk-6f1196="">
          {image ? <img src={image} alt={imageAlt} loading="eager" data-rk-6f1196="" /> : (
            <svg viewBox="0 0 400 400" aria-hidden="true" preserveAspectRatio="xMidYMid slice" data-rk-6f1196="">
              <rect width="400" height="400" fill={`hsl(${hue} 55% 18%)`} data-rk-6f1196="" />
              <circle cx="300" cy="90" r="150" fill={`hsl(${hue} 70% 45%)`} opacity="0.55" data-rk-6f1196="" />
              <circle cx="80" cy="330" r="120" fill={`hsl(${(hue + 40) % 360} 75% 60%)`} opacity="0.45" data-rk-6f1196="" />
              <path d="M0 300 C 100 240, 160 330, 260 250 S 380 200, 400 150 V400 H0Z" fill={`hsl(${hue} 60% 10%)`} opacity="0.6" data-rk-6f1196="" />
              <g stroke={`hsl(${hue} 80% 85%)`} strokeWidth="2" fill="none" opacity="0.7" data-rk-6f1196="">
                <path d="M40 260 L120 220 L190 236 L260 160 L330 120" data-rk-6f1196="" />
                <circle cx="330" cy="120" r="7" fill={`hsl(${hue} 80% 85%)`} data-rk-6f1196="" />
              </g>
            </svg>
          )}
          <p className="ach__result" data-rk-6f1196=""><strong data-rk-6f1196="">{result}</strong><span data-rk-6f1196="">{resultLabel}</span></p>
        </div>
      </section>
      </div>
    </>
  );
}

export default AgencyCaseStudyHero;
AgencyCaseStudyHero.css
.ach-cq:where([data-rk-6f1196]) { container-type: inline-size; }
.ach:where([data-rk-6f1196]) { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(1.5rem, 5cqi, 4rem); align-items: stretch; max-width: 1280px; margin: 0 auto; padding: clamp(2rem, 6cqi, 4.5rem) clamp(1rem, 4cqi, 2.5rem); color: var(--c-text-1, #fff); }
.ach__back:where([data-rk-6f1196]) { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin-bottom: var(--sp-4, 1rem); color: var(--c-text-2, #a3a3a3); font-weight: 700; text-decoration: none; }
.ach__back:hover:where([data-rk-6f1196]) { color: var(--c-text-1, #fff); }
.ach__back:focus-visible:where([data-rk-6f1196]) { outline: 2px solid var(--agency-accent, var(--c-primary-light, #d4a017)); outline-offset: 3px; border-radius: 6px; }
.ach__meta:where([data-rk-6f1196]) { display: flex; align-items: center; gap: 10px; margin: 0 0 var(--sp-4, 1rem); font-weight: 800; }
.ach__chip:where([data-rk-6f1196]) { padding: 0.3rem 0.75rem; border-radius: 999px; background: var(--agency-accent, var(--c-primary-light, #d4a017)); color: var(--c-on-primary, #050505); font-size: 0.8rem; }
.ach__title:where([data-rk-6f1196]) { margin: 0; font-size: clamp(2.2rem, 5.6cqi, 4.4rem); font-weight: 900; line-height: 0.98; letter-spacing: -0.055em; text-wrap: balance; }
.ach__summary:where([data-rk-6f1196]) { margin: var(--sp-5, 1.25rem) 0 0; max-width: 40rem; font-size: 1.1rem; line-height: 1.6; color: var(--c-text-2, #a3a3a3); }
.ach__facts:where([data-rk-6f1196]) { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-4, 1rem); margin: clamp(1.5rem, 4cqi, 2.5rem) 0 0; padding-top: var(--sp-5, 1.25rem); border-top: 1.5px solid currentColor; }
.ach__facts:where([data-rk-6f1196]) dt:where([data-rk-6f1196]) { font-size: 0.78rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--c-text-3, #777); }
.ach__facts:where([data-rk-6f1196]) dd:where([data-rk-6f1196]) { margin: 4px 0 0; font-weight: 700; }
.ach__art:where([data-rk-6f1196]) { position: relative; min-height: 360px; border-radius: var(--r-xl, 28px); overflow: hidden; }
.ach__art:where([data-rk-6f1196]) svg:where([data-rk-6f1196]), .ach__art:where([data-rk-6f1196]) img:where([data-rk-6f1196]) { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ach__result:where([data-rk-6f1196]) { position: absolute; left: 16px; right: 16px; bottom: 16px; display: grid; gap: 2px; margin: 0; padding: var(--sp-5, 1.25rem); border-radius: 20px; background: var(--agency-accent, var(--c-primary-light, #d4a017)); color: var(--c-on-primary, #050505); }
.ach__result:where([data-rk-6f1196]) strong:where([data-rk-6f1196]) { font-size: clamp(2.4rem, 6cqi, 3.8rem); font-weight: 900; letter-spacing: -0.06em; line-height: 0.95; }
.ach__result:where([data-rk-6f1196]) span:where([data-rk-6f1196]) { font-size: 0.85rem; font-weight: 800; }
@container (max-width: 820px) { .ach:where([data-rk-6f1196]) { grid-template-columns: 1fr; } .ach__art:where([data-rk-6f1196]) { min-height: 300px; } }