// @ts-nocheck
/* Lanyard Team — Framer code component by El Mehdi Sekrare (MIT). Generated file: edit src/ + framer/wrapper.tsx, then run `npm run framer`. */
import * as React from "react";
import { addPropertyControls, ControlType } from "framer";
// ---------- component ----------
/**
* Lanyard Team — a team section where every member hangs on a lanyard.
* Drag a badge and let go, brush past it, or click to flip it for the bio.
* Zero dependencies (React + Tailwind), RTL-ready, keyboard accessible,
* respects prefers-reduced-motion. © El Mehdi Sekrare — MIT.
*/
export type LanyardLink = {
/** Visible text, e.g. "GitHub". */
label: string;
/** Where the link goes. Opens in a new tab. */
href: string;
};
export type LanyardMember = {
/** Stable key. Defaults to the name. */
id?: string;
/** Full name, shown on the front and back of the badge. */
name: string;
/** Job title under the name. */
role: string;
/** Photo URL. Falls back to initials on the badge colour. */
avatar?: string;
/** Badge + strap colour (any CSS colour, including `var(--color-primary)`). Defaults to `palette`. */
accent?: string;
/** Small pill under the role, e.g. a city or "Remote". */
location?: string;
/** Short bio on the back of the badge (about 120 characters). */
bio?: string;
/** Up to 4 skill chips on the back. */
skills?: string[];
/** Up to 3 links on the back. */
links?: LanyardLink[];
/** Printed on the badge, e.g. "042". Generated from the name when empty. */
badgeNumber?: string;
};
export type LanyardLabels = {
/** Accessible label of the flip button on the front. */
flip: string;
/** Accessible label of the flip button on the back. */
flipBack: string;
/** Heading on the back of the badge. */
about: string;
/** Small caption above the barcode. */
access: string;
};
export type LanyardTeamProps = Omit<React.HTMLAttributes<HTMLElement>, "title"> & {
/** The people to hang on the rail. Works best with 3–8 members. */
members: LanyardMember[];
/** Small uppercase line above the title. */
eyebrow?: React.ReactNode;
/** Section heading. Also used as the accessible name of the list. */
title?: React.ReactNode;
/** Supporting text under the title. */
description?: React.ReactNode;
/** Text printed along every strap and on the badge band, e.g. an event or company name. */
event?: string;
/** Badge colours used (in order) for members without an `accent`. */
palette?: string[];
/** Gentle idle sway while the section is on screen. Default `true`. */
breeze?: boolean;
/** Badges drop in from the rail the first time the section is seen. Default `true`. */
entrance?: boolean;
/** UI text for translation (e.g. Arabic). */
labels?: Partial<LanyardLabels>;
};
const DEFAULT_LABELS: LanyardLabels = {
flip: "Flip badge",
flipBack: "Show front",
about: "About",
access: "All access",
};
const DEFAULT_PALETTE = ["#E5484D", "#3E63DD", "#12A594", "#8E4EC6", "#F76B15", "#D6409F", "#0090FF", "#46A758"];
// ---------- small utils ----------
const cx = (...c: Array<string | false | null | undefined>) => c.filter(Boolean).join(" ");
const clamp = (v: number, a: number, b: number) => Math.max(a, Math.min(b, v));
function hashString(s: string) {
let h = 2166136261;
for (let i = 0; i < s.length; i++) {
h ^= s.charCodeAt(i);
h = Math.imul(h, 16777619);
}
return h >>> 0;
}
function seeded(seed: number) {
let a = seed || 1;
return () => {
a = (a + 0x6d2b79f5) | 0;
let t = Math.imul(a ^ (a >>> 15), 1 | a);
t = (t + Math.imul(t ^ (t >>> 7), 61 | t)) ^ t;
return ((t ^ (t >>> 14)) >>> 0) / 4294967296;
};
}
function initials(name: string) {
const parts = name.trim().split(/\s+/);
return ((parts[0]?.[0] ?? "") + (parts.length > 1 ? parts[parts.length - 1][0] : "")).toUpperCase();
}
// ---------- physics constants ----------
const GRAVITY = 2600; // px/s², tuned for a ~1.4 s swing on a 150 px strap
const SWING_DAMP = 0.85;
const HINGE_K = 95;
const HINGE_DAMP = 7;
const STRETCH_K = 260;
const STRETCH_DAMP = 16;
const FLIP_K = 170;
const FLIP_DAMP = 2 * Math.sqrt(FLIP_K) * 0.72;
const DROP_K = 110;
const DROP_DAMP = 2 * Math.sqrt(DROP_K) * 0.5;
const MAX_ANGLE = 1.25;
const RAIL_Y = 18;
type Sim = {
th: number[]; om: number[]; acc: number[];
ph: number[]; pv: number[];
s: number[]; sv: number[];
f: number[]; fv: number[]; ft: number[];
dy: number[]; dv: number[]; delay: number[];
drag: number; t0: number; raf: number; last: number;
visible: boolean; entered: boolean;
};
const emptySim = (): Sim => ({
th: [], om: [], acc: [], ph: [], pv: [], s: [], sv: [], f: [], fv: [], ft: [],
dy: [], dv: [], delay: [], drag: -1, t0: 0, raf: 0, last: 0, visible: false, entered: false,
});
// ---------- decorative pieces ----------
function Barcode({ seed, className }: { seed: number; className?: string }) {
const r = seeded(seed);
const bars: Array<[number, number]> = [];
let x = 0;
while (x < 96) {
const w = 0.8 + Math.floor(r() * 3) * 0.9;
if (r() > 0.3) bars.push([x, w]);
x += w + 0.9 + r() * 1.2;
}
return (
<svg viewBox="0 0 100 20" preserveAspectRatio="none" aria-hidden="true" className={className}>
{bars.map(([bx, w], i) => (
<rect key={i} x={bx} y={0} width={w} height={20} fill="currentColor" />
))}
</svg>
);
}
function DotCode({ seed, className }: { seed: number; className?: string }) {
const r = seeded(seed);
const n = 13;
const cells: React.ReactNode[] = [];
const finder = (x: number, y: number) =>
(x < 4 && y < 4) || (x > n - 5 && y < 4) || (x < 4 && y > n - 5);
for (let y = 0; y < n; y++)
for (let x = 0; x < n; x++) {
if (finder(x, y)) continue;
if (r() > 0.52) cells.push(<rect key={`${x}-${y}`} x={x} y={y} width={0.86} height={0.86} rx={0.2} />);
}
const Finder = ({ x, y }: { x: number; y: number }) => (
<g>
<rect x={x} y={y} width={3.6} height={3.6} rx={0.8} fill="none" stroke="currentColor" strokeWidth={0.7} />
<rect x={x + 1.1} y={y + 1.1} width={1.4} height={1.4} rx={0.3} />
</g>
);
return (
<svg viewBox={`0 0 ${n} ${n}`} aria-hidden="true" className={className} fill="currentColor">
{cells}
<Finder x={0} y={0} />
<Finder x={n - 3.6} y={0} />
<Finder x={0} y={n - 3.6} />
</svg>
);
}
function FlipIcon({ className }: { className?: string }) {
return (
<svg viewBox="0 0 16 16" aria-hidden="true" className={className} fill="none" stroke="currentColor" strokeWidth={1.5} strokeLinecap="round" strokeLinejoin="round">
<path d="M2.5 8a5.5 5.5 0 0 1 9.4-3.9L13.5 5.6" />
<path d="M13.5 2.5v3.1h-3.1" />
<path d="M13.5 8a5.5 5.5 0 0 1-9.4 3.9L2.5 10.4" />
<path d="M2.5 13.5v-3.1h3.1" />
</svg>
);
}
// ---------- component ----------
function LanyardTeam({
members,
eyebrow,
title,
description,
event = "TEAM",
palette = DEFAULT_PALETTE,
breeze = true,
entrance = true,
labels: labelsProp,
className,
...rest
}: LanyardTeamProps) {
const labels = { ...DEFAULT_LABELS, ...labelsProp };
const count = members.length;
const uid = React.useId().replace(/[^a-zA-Z0-9_-]/g, "");
const stageRef = React.useRef<HTMLDivElement>(null);
const colEls = React.useRef<Array<HTMLDivElement | null>>([]);
const groupEls = React.useRef<Array<HTMLDivElement | null>>([]);
const strapEls = React.useRef<Array<HTMLDivElement | null>>([]);
const cardEls = React.useRef<Array<HTMLDivElement | null>>([]);
const innerEls = React.useRef<Array<HTMLDivElement | null>>([]);
const sheenEls = React.useRef<Array<HTMLDivElement | null>>([]);
const faceEls = React.useRef<Array<[HTMLDivElement | null, HTMLDivElement | null]>>([]);
const sim = React.useRef<Sim>(emptySim());
const pointer = React.useRef({ id: -1, index: -1, x: 0, y: 0, grab: 1, moved: false, lastT: 0, lastX: 0, lastY: 0 });
const [layout, setLayout] = React.useState({ colW: 200, cardW: 172, scroll: false, ready: false });
const [flipped, setFlipped] = React.useState<boolean[]>(() => members.map(() => false));
const [reduced, setReduced] = React.useState(false);
const cardH = Math.round(layout.cardW * 1.46);
const strapW = clamp(Math.round(layout.cardW * 0.085), 10, 16);
const lengths = React.useMemo(
() =>
members.map((m, i) => {
const h = hashString((m.id ?? m.name) + i);
return Math.round(layout.cardW * (0.42 + (h % 4) * 0.09));
}),
[members, layout.cardW],
);
const maxLen = lengths.length ? Math.max(...lengths) : 0;
const stageH = RAIL_Y + maxLen + cardH + 48;
// keep latest values for the animation loop
const live = React.useRef({ lengths, cardH, reduced, breeze, count });
live.current = { lengths, cardH, reduced, breeze, count };
React.useEffect(() => {
setFlipped((f) => members.map((_, i) => f[i] ?? false));
}, [members]);
// reduced motion
React.useEffect(() => {
const mq = window.matchMedia("(prefers-reduced-motion: reduce)");
const update = () => setReduced(mq.matches);
update();
mq.addEventListener("change", update);
return () => mq.removeEventListener("change", update);
}, []);
// measure
React.useEffect(() => {
const el = stageRef.current;
if (!el) return;
const measure = (width: number) => {
const minCol = 168;
const scroll = count * minCol > width;
const colW = scroll ? minCol : width / Math.max(1, count);
const cardW = Math.round(clamp(colW * 0.8, 132, 212));
setLayout((p) =>
p.ready && Math.abs(p.colW - colW) < 0.5 && p.cardW === cardW && p.scroll === scroll
? p
: { colW, cardW, scroll, ready: true },
);
};
measure(el.clientWidth);
const ro = new ResizeObserver((e) => e[0] && measure(e[0].contentRect.width));
ro.observe(el);
return () => ro.disconnect();
}, [count]);
// ---- render one badge from the sim ----
const paint = React.useCallback((i: number) => {
const S = sim.current;
const L = live.current.lengths[i] ?? 0;
const g = groupEls.current[i];
const st = strapEls.current[i];
const c = cardEls.current[i];
const inner = innerEls.current[i];
const sheen = sheenEls.current[i];
const th = S.th[i] ?? 0, ph = S.ph[i] ?? 0, s = S.s[i] ?? 1, f = S.f[i] ?? 0, dy = S.dy[i] ?? 0, om = S.om[i] ?? 0;
// CSS rotate() is clockwise; the physics angle is positive when the badge swings right
if (g) g.style.transform = `translate3d(0,${dy.toFixed(2)}px,0) rotate(${(-th).toFixed(4)}rad)`;
if (st) st.style.transform = `scaleY(${s.toFixed(4)})`;
if (c) c.style.transform = `translate3d(-50%,${((s - 1) * L).toFixed(2)}px,0) rotate(${(-ph).toFixed(4)}rad)`;
if (inner) inner.style.transform = `perspective(900px) rotateY(${(f * 180 + clamp(-om * 7, -22, 22)).toFixed(2)}deg)`;
if (sheen) sheen.style.transform = `translate3d(${(-(th + ph) * 140).toFixed(1)}%,0,0)`;
}, []);
const step = React.useCallback(
(now: number) => {
const S = sim.current;
const { lengths: Ls, reduced: red, breeze: br, count: n } = live.current;
const dt = S.last ? Math.min(1 / 30, (now - S.last) / 1000) : 1 / 60;
S.last = now;
const sub = 2;
const h = dt / sub;
const t = now / 1000;
let busy = false;
for (let k = 0; k < sub; k++) {
for (let i = 0; i < n; i++) {
const L = Math.max(40, Ls[i] ?? 120);
// swing (pendulum around the hook)
if (i !== S.drag) {
const wind = br ? 0.55 * Math.sin(t * 0.9 + i * 1.31) + 0.35 * Math.sin(t * 0.37 + i * 2.07) : 0;
const a = -(GRAVITY / L) * Math.sin(S.th[i]) - SWING_DAMP * S.om[i] + wind;
S.acc[i] = a;
S.om[i] += a * h;
S.th[i] = clamp(S.th[i] + S.om[i] * h, -MAX_ANGLE, MAX_ANGLE);
}
// card hinge at the clip lags behind the strap
const pa = -HINGE_K * S.ph[i] - HINGE_DAMP * S.pv[i] - S.acc[i] * 0.5;
S.pv[i] += pa * h;
S.ph[i] = clamp(S.ph[i] + S.pv[i] * h, -0.7, 0.7);
// strap stretch springs back
if (i !== S.drag) {
const sa = -STRETCH_K * (S.s[i] - 1) - STRETCH_DAMP * S.sv[i];
S.sv[i] += sa * h;
S.s[i] += S.sv[i] * h;
}
// flip
const fa = -FLIP_K * (S.f[i] - S.ft[i]) - FLIP_DAMP * S.fv[i];
S.fv[i] += fa * h;
S.f[i] += S.fv[i] * h;
// entrance drop
if (now - S.t0 > S.delay[i]) {
const da = -DROP_K * S.dy[i] - DROP_DAMP * S.dv[i];
S.dv[i] += da * h;
S.dy[i] += S.dv[i] * h;
}
}
}
for (let i = 0; i < n; i++) {
paint(i);
if (
Math.abs(S.om[i]) > 0.01 || Math.abs(S.th[i]) > 0.002 || Math.abs(S.pv[i]) > 0.01 ||
Math.abs(S.s[i] - 1) > 0.001 || Math.abs(S.f[i] - S.ft[i]) > 0.002 || Math.abs(S.fv[i]) > 0.01 ||
Math.abs(S.dy[i]) > 0.3 || Math.abs(S.dv[i]) > 0.3
)
busy = true;
}
if (S.drag >= 0) busy = true;
if (br && S.visible) busy = true;
if (busy && !red && S.visible) S.raf = requestAnimationFrame(step);
else S.raf = 0;
},
[paint],
);
const kick = React.useCallback(() => {
const S = sim.current;
if (live.current.reduced || S.raf || !S.visible) return;
S.last = 0;
S.raf = requestAnimationFrame(step);
}, [step]);
// (re)size sim arrays when members change
React.useEffect(() => {
const S = sim.current;
for (let i = 0; i < count; i++) {
S.th[i] ??= 0; S.om[i] ??= 0; S.acc[i] ??= 0; S.ph[i] ??= 0; S.pv[i] ??= 0;
S.s[i] ??= 1; S.sv[i] ??= 0; S.f[i] ??= 0; S.fv[i] ??= 0; S.ft[i] ??= 0;
S.dy[i] ??= 0; S.dv[i] ??= 0; S.delay[i] ??= 0;
}
for (const k of ["th", "om", "acc", "ph", "pv", "s", "sv", "f", "fv", "ft", "dy", "dv", "delay"] as const) S[k].length = count;
for (let i = 0; i < count; i++) paint(i);
}, [count, paint]);
// visibility + entrance
React.useEffect(() => {
const el = stageRef.current;
if (!el || !layout.ready) return;
const S = sim.current;
const io = new IntersectionObserver(
([e]) => {
S.visible = !!e?.isIntersecting;
if (!S.visible) return;
if (!S.entered) {
S.entered = true;
const showAll = () => groupEls.current.forEach((g) => g && (g.style.opacity = "1"));
if (entrance && !live.current.reduced) {
S.t0 = performance.now();
for (let i = 0; i < count; i++) {
S.dy[i] = -(RAIL_Y + (live.current.lengths[i] ?? 0) + live.current.cardH + 80);
S.dv[i] = 0;
S.delay[i] = 90 * i + (hashString(String(i)) % 60);
S.om[i] = (i % 2 ? 1 : -1) * (0.6 + (i % 3) * 0.25);
paint(i);
}
}
showAll();
}
kick();
},
{ threshold: 0.15 },
);
io.observe(el);
return () => {
io.disconnect();
cancelAnimationFrame(S.raf);
S.raf = 0;
};
}, [layout.ready, count, entrance, kick, paint]);
// repaint on layout / reduced changes
React.useEffect(() => {
const S = sim.current;
if (reduced) {
for (let i = 0; i < count; i++) {
S.th[i] = 0; S.om[i] = 0; S.ph[i] = 0; S.pv[i] = 0; S.s[i] = 1; S.sv[i] = 0;
S.f[i] = S.ft[i]; S.fv[i] = 0; S.dy[i] = 0; S.dv[i] = 0;
}
}
for (let i = 0; i < count; i++) paint(i);
kick();
}, [layout, reduced, count, paint, kick]);
// hidden face is inert (works in React 18 and 19)
React.useEffect(() => {
faceEls.current.forEach((pair, i) => {
const [front, back] = pair ?? [];
if (front) (front as HTMLElement & { inert: boolean }).inert = !!flipped[i];
if (back) (back as HTMLElement & { inert: boolean }).inert = !flipped[i];
});
}, [flipped]);
const toggleFlip = React.useCallback(
(i: number) => {
setFlipped((prev) => {
const next = [...prev];
next[i] = !prev[i];
const S = sim.current;
S.ft[i] = next[i] ? 1 : 0;
if (live.current.reduced) {
S.f[i] = S.ft[i];
paint(i);
} else {
S.om[i] += (i % 2 ? -1 : 1) * 1.4; // a little twist when it flips
kick();
}
return next;
});
},
[kick, paint],
);
const nudge = React.useCallback(
(i: number, dir: number) => {
sim.current.om[i] += dir * 2.2;
kick();
},
[kick],
);
// ---- pointer: drag, fling, brush ----
const anchorOf = (i: number) => {
const col = colEls.current[i];
if (!col) return null;
const r = col.getBoundingClientRect();
return { x: r.left + r.width / 2, y: r.top + RAIL_Y };
};
const onCardPointerDown = (i: number) => (e: React.PointerEvent<HTMLDivElement>) => {
if (e.button !== 0 || (e.target as HTMLElement).closest("a,button")) return;
const a = anchorOf(i);
if (!a) return;
const p = pointer.current;
p.id = e.pointerId;
p.index = i;
p.x = e.clientX;
p.y = e.clientY;
p.lastX = e.clientX;
p.lastY = e.clientY;
p.lastT = performance.now();
p.moved = false;
p.grab = Math.max(40, Math.hypot(e.clientX - a.x, e.clientY - a.y));
e.currentTarget.setPointerCapture(e.pointerId);
};
const onCardPointerMove = (i: number) => (e: React.PointerEvent<HTMLDivElement>) => {
const p = pointer.current;
if (p.id !== e.pointerId || p.index !== i || live.current.reduced) return;
const S = sim.current;
if (!p.moved && Math.hypot(e.clientX - p.x, e.clientY - p.y) > 5) {
p.moved = true;
S.drag = i;
}
if (!p.moved) return;
const a = anchorOf(i);
if (!a) return;
const now = performance.now();
const dt = Math.max(8, now - p.lastT) / 1000;
const dx = e.clientX - a.x;
const dy = Math.max(8, e.clientY - a.y);
const th = clamp(Math.atan2(dx, dy), -MAX_ANGLE, MAX_ANGLE);
const prev = S.th[i];
S.th[i] = th;
S.om[i] = S.om[i] * 0.4 + ((th - prev) / dt) * 0.6;
S.s[i] = clamp(Math.hypot(dx, dy) / p.grab, 0.9, 1.22);
S.sv[i] = 0;
p.lastT = now;
p.lastX = e.clientX;
p.lastY = e.clientY;
kick();
};
const onCardPointerUp = (i: number) => (e: React.PointerEvent<HTMLDivElement>) => {
const p = pointer.current;
if (p.id !== e.pointerId) return;
const S = sim.current;
p.id = -1;
if (e.currentTarget.hasPointerCapture(e.pointerId)) e.currentTarget.releasePointerCapture(e.pointerId);
if (S.drag === i) {
S.drag = -1;
S.om[i] = clamp(S.om[i], -9, 9);
kick();
} else if (!p.moved && e.type === "pointerup") {
toggleFlip(i);
}
};
// brushing past a badge with the mouse pushes it
const brush = React.useRef({ x: 0, t: 0 });
const onStagePointerMove = (e: React.PointerEvent<HTMLDivElement>) => {
if (e.pointerType !== "mouse" || pointer.current.id >= 0 || live.current.reduced) return;
const now = performance.now();
const b = brush.current;
const vx = b.t ? (e.clientX - b.x) / Math.max(8, now - b.t) : 0; // px/ms
b.x = e.clientX;
b.t = now;
if (Math.abs(vx) < 0.05) return;
for (let i = 0; i < count; i++) {
const c = cardEls.current[i];
if (!c) continue;
const r = c.getBoundingClientRect();
if (e.clientX >= r.left && e.clientX <= r.right && e.clientY >= r.top && e.clientY <= r.bottom) {
const L = live.current.lengths[i] ?? 120;
sim.current.om[i] = clamp(sim.current.om[i] + vx * 0.9 * (150 / L), -6, 6);
kick();
}
}
};
return (
<section
{...rest}
data-slot="lanyard-team"
className={cx("relative w-full overflow-hidden bg-background text-foreground", className)}
>
{(eyebrow || title || description) && (
<header className="relative z-10 mx-auto flex max-w-2xl flex-col items-center gap-3 px-6 pt-14 text-center">
{eyebrow && (
<p className="text-[11px] font-medium uppercase tracking-[0.24em] text-muted-foreground rtl:tracking-normal">{eyebrow}</p>
)}
{title && <h2 className="text-balance text-3xl font-semibold tracking-tight sm:text-4xl">{title}</h2>}
{description && <p className="text-pretty text-sm leading-relaxed text-muted-foreground sm:text-base">{description}</p>}
</header>
)}
<div
ref={stageRef}
role="list"
aria-label={typeof title === "string" ? title : "Team"}
onPointerMove={onStagePointerMove}
className={cx(
"relative mt-6 w-full",
layout.scroll ? "snap-x snap-mandatory overflow-x-auto overflow-y-hidden [scrollbar-width:none]" : "overflow-visible",
)}
style={{ height: stageH }}
>
<div className="relative flex h-full" style={{ width: layout.scroll ? count * layout.colW : "100%" }}>
{/* ceiling rail */}
<div aria-hidden="true" className="pointer-events-none absolute inset-x-0" style={{ top: RAIL_Y - 4 }}>
<div className="h-[5px] w-full rounded-full bg-gradient-to-b from-foreground/20 via-foreground/10 to-foreground/25 shadow-[0_6px_14px_-6px_rgba(0,0,0,.35)]" />
</div>
{members.map((m, i) => {
const accent = m.accent ?? palette[i % palette.length] ?? DEFAULT_PALETTE[0];
const seed = hashString(m.id ?? m.name);
const number = m.badgeNumber ?? String(seed % 1000).padStart(3, "0");
const L = lengths[i] ?? 100;
const isFlipped = !!flipped[i];
const strapText = `${event} · ${event} · ${event} · ${event} · ${event} · `;
return (
<div
key={m.id ?? `${m.name}-${i}`}
role="listitem"
ref={(el) => {
colEls.current[i] = el;
}}
className="relative h-full shrink-0 snap-center"
style={{ width: layout.colW }}
>
{/* hook */}
<div
aria-hidden="true"
className="absolute left-1/2 size-[11px] -translate-x-1/2 rounded-full border-2 border-foreground/30 bg-background"
style={{ top: RAIL_Y - 7 }}
/>
{/* pendulum: strap + card rotate around the hook */}
<div
ref={(el) => {
groupEls.current[i] = el;
}}
className="absolute left-1/2 top-0 will-change-transform"
style={{
top: RAIL_Y,
width: 0,
height: L,
transformOrigin: "0 0",
opacity: entrance ? 0 : 1,
}}
>
{/* strap */}
<div
ref={(el) => {
strapEls.current[i] = el;
}}
aria-hidden="true"
className="absolute top-0 overflow-hidden rounded-b-[3px] shadow-[inset_1px_0_0_rgba(255,255,255,.18),inset_-1px_0_0_rgba(0,0,0,.18)]"
style={{ left: -strapW / 2, width: strapW, height: L, background: accent, transformOrigin: "50% 0" }}
>
<span
className="absolute left-1/2 top-1 -translate-x-1/2 whitespace-nowrap font-mono font-semibold uppercase text-white/75 [writing-mode:vertical-rl] rtl:font-sans rtl:!tracking-normal"
style={{ fontSize: Math.max(7, strapW * 0.62), letterSpacing: "0.18em" }}
>
{strapText}
</span>
</div>
{/* card, hinged at the clip */}
<div
ref={(el) => {
cardEls.current[i] = el;
}}
onPointerDown={onCardPointerDown(i)}
onPointerMove={onCardPointerMove(i)}
onPointerUp={onCardPointerUp(i)}
onPointerCancel={onCardPointerUp(i)}
className="absolute left-0 cursor-grab touch-pan-y select-none active:cursor-grabbing"
style={{
top: L,
width: layout.cardW,
height: cardH,
transformOrigin: "50% 0",
transform: "translate3d(-50%,0,0)",
fontSize: layout.cardW / 13.5,
}}
>
{/* clip */}
<svg
aria-hidden="true"
viewBox="0 0 40 34"
className="pointer-events-none absolute left-1/2 z-20 -translate-x-1/2 text-foreground/55"
style={{ top: -layout.cardW * 0.1, width: layout.cardW * 0.2 }}
>
<rect x="11" y="0" width="18" height="12" rx="3" fill="currentColor" />
<rect x="14" y="2.5" width="12" height="2" rx="1" fill="white" fillOpacity=".35" />
<path d="M15 11 L15 22 a5 5 0 0 0 10 0 L25 11" fill="none" stroke="currentColor" strokeWidth="2.6" />
</svg>
{/* drop shadow, stays flat */}
<div
aria-hidden="true"
className="pointer-events-none absolute inset-x-[8%] -bottom-3 h-6 rounded-[50%] bg-black/25 blur-md dark:bg-black/60"
/>
<div
ref={(el) => {
innerEls.current[i] = el;
}}
className="relative size-full [transform-style:preserve-3d]"
>
{/* FRONT */}
<div
ref={(el) => {
faceEls.current[i] = [el, faceEls.current[i]?.[1] ?? null];
}}
className="absolute inset-0 flex flex-col overflow-hidden rounded-[1.1em] bg-card text-card-foreground shadow-[0_18px_40px_-18px_rgba(0,0,0,.45)] ring-1 ring-black/5 [backface-visibility:hidden] dark:ring-white/10"
>
<div
className="relative h-[27%] shrink-0 px-[0.9em] pt-[1.5em] text-white"
style={{
background: `linear-gradient(135deg, ${accent}, color-mix(in oklab, ${accent} 72%, black))`,
}}
>
<div
aria-hidden="true"
className="absolute inset-0 opacity-25"
style={{
backgroundImage:
"repeating-linear-gradient(-45deg, rgba(255,255,255,.35) 0 1px, transparent 1px 7px)",
}}
/>
{/* slot punched for the clip */}
<div
aria-hidden="true"
className="absolute left-1/2 top-[0.55em] h-[0.42em] w-[26%] -translate-x-1/2 rounded-full bg-background shadow-[inset_0_1px_2px_rgba(0,0,0,.45)]"
/>
<div className="relative flex items-center justify-between gap-2 font-mono text-[0.55em] font-semibold uppercase tracking-[0.16em] rtl:font-sans rtl:tracking-normal">
<span className="truncate">{event}</span>
<span className="opacity-80">No. {number}</span>
</div>
</div>
<div className="relative -mt-[2.1em] flex flex-1 flex-col items-center px-[0.9em] text-center">
<div
className="grid size-[4.2em] place-items-center overflow-hidden rounded-[1em] text-[1em] font-semibold text-white ring-[0.2em] ring-card"
style={{ background: `linear-gradient(160deg, color-mix(in oklab, ${accent} 70%, white), ${accent})` }}
>
{m.avatar ? (
<img src={m.avatar} alt="" draggable={false} loading="lazy" className="size-full object-cover" />
) : (
<span aria-hidden="true">{initials(m.name)}</span>
)}
</div>
<p className="mt-[0.6em] line-clamp-1 text-[1.08em] font-semibold leading-tight tracking-tight">{m.name}</p>
<p className="mt-[0.2em] line-clamp-1 text-[0.72em] text-muted-foreground">{m.role}</p>
{m.location && (
<p className="mt-[0.5em] rounded-full border border-border px-[0.6em] py-[0.15em] text-[0.58em] text-muted-foreground">
{m.location}
</p>
)}
<div className="mt-auto flex w-full items-end justify-between gap-[0.5em] pb-[0.8em]">
<div className="flex min-w-0 flex-col items-start gap-[0.2em]">
<span className="font-mono text-[0.48em] uppercase tracking-[0.18em] text-muted-foreground rtl:font-sans rtl:tracking-normal">
{labels.access}
</span>
<Barcode seed={seed} className="h-[1.4em] w-[6.5em] text-foreground/80" />
</div>
<button
type="button"
onClick={() => toggleFlip(i)}
onKeyDown={(e) => {
if (e.key === "ArrowLeft") nudge(i, -1);
if (e.key === "ArrowRight") nudge(i, 1);
}}
aria-label={`${labels.flip}: ${m.name}`}
aria-pressed={isFlipped}
className="grid size-[1.9em] shrink-0 place-items-center rounded-full border border-border text-muted-foreground outline-none transition-colors hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring"
>
<FlipIcon className="size-[0.95em]" />
</button>
</div>
</div>
{/* laminate glare */}
<div aria-hidden="true" className="pointer-events-none absolute inset-0 overflow-hidden rounded-[inherit]">
<div
ref={(el) => {
sheenEls.current[i] = el;
}}
className="absolute inset-y-0 -left-1/2 w-[200%] mix-blend-soft-light"
style={{
background:
"linear-gradient(105deg, transparent 38%, rgba(255,255,255,.55) 48%, rgba(255,255,255,.1) 53%, transparent 62%)",
}}
/>
</div>
</div>
{/* BACK */}
<div
ref={(el) => {
faceEls.current[i] = [faceEls.current[i]?.[0] ?? null, el];
}}
className="absolute inset-0 flex flex-col overflow-hidden rounded-[1.1em] bg-card px-[0.9em] pb-[0.8em] pt-[1.5em] text-start text-card-foreground shadow-[0_18px_40px_-18px_rgba(0,0,0,.45)] ring-1 ring-black/5 [backface-visibility:hidden] [transform:rotateY(180deg)] dark:ring-white/10"
>
<div
aria-hidden="true"
className="absolute left-1/2 top-[0.55em] h-[0.42em] w-[26%] -translate-x-1/2 rounded-full bg-background shadow-[inset_0_1px_2px_rgba(0,0,0,.45)]"
/>
<div className="flex items-center justify-between gap-2">
<span className="font-mono text-[0.55em] font-semibold uppercase tracking-[0.16em] rtl:font-sans rtl:tracking-normal" style={{ color: accent }}>
{labels.about}
</span>
<span className="font-mono text-[0.5em] text-muted-foreground">No. {number}</span>
</div>
<p className="mt-[0.5em] text-[0.9em] font-semibold leading-tight">{m.name}</p>
{m.bio && <p className="mt-[0.45em] line-clamp-5 text-[0.64em] leading-relaxed text-muted-foreground">{m.bio}</p>}
{m.skills && m.skills.length > 0 && (
<ul className="mt-[0.6em] flex flex-wrap gap-[0.3em]">
{m.skills.slice(0, 4).map((s) => (
<li key={s} className="rounded-full bg-muted px-[0.55em] py-[0.15em] text-[0.55em] text-muted-foreground">
{s}
</li>
))}
</ul>
)}
<div className="mt-auto flex items-end justify-between gap-[0.5em]">
<div className="flex min-w-0 flex-col gap-[0.25em]">
{(m.links ?? []).slice(0, 3).map((l) => (
<a
key={l.href + l.label}
href={l.href}
target="_blank"
rel="noreferrer"
className="truncate text-[0.62em] font-medium underline-offset-2 outline-none hover:underline focus-visible:ring-2 focus-visible:ring-ring"
>
{l.label}
<svg aria-hidden="true" viewBox="0 0 12 12" className="ms-[0.2em] inline size-[0.8em] align-[-0.05em] rtl:-scale-x-100" fill="none" stroke="currentColor" strokeWidth={1.6} strokeLinecap="round"><path d="M3.5 8.5l5-5M4.5 3.5h4v4" /></svg>
</a>
))}
</div>
<div className="flex flex-col items-end gap-[0.4em]">
<DotCode seed={seed} className="size-[2.6em] text-foreground/80" />
<button
type="button"
onClick={() => toggleFlip(i)}
aria-label={`${labels.flipBack}: ${m.name}`}
className="grid size-[1.9em] place-items-center rounded-full border border-border text-muted-foreground outline-none transition-colors hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring"
>
<FlipIcon className="size-[0.95em]" />
</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
);
})}
</div>
</div>
<span id={`${uid}-hint`} className="sr-only">
Drag a badge to swing it, or use the flip button to read the back.
</span>
</section>
);
}
// ---------- Framer wrapper ----------
const SCOPE = "lanyard-team"
const CSS = "@supports (((-webkit-hyphens: none)) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color: rgb(from red r g b)))) {.lanyard-team *, .lanyard-team :before, .lanyard-team :after, .lanyard-team ::backdrop {--tw-translate-x: 0;--tw-translate-y: 0;--tw-translate-z: 0;--tw-rotate-x: initial;--tw-rotate-y: initial;--tw-rotate-z: initial;--tw-skew-x: initial;--tw-skew-y: initial;--tw-pan-x: initial;--tw-pan-y: initial;--tw-pinch-zoom: initial;--tw-scroll-snap-strictness: proximity;--tw-border-style: solid;--tw-gradient-position: initial;--tw-gradient-from: #0000;--tw-gradient-via: #0000;--tw-gradient-to: #0000;--tw-gradient-stops: initial;--tw-gradient-via-stops: initial;--tw-gradient-from-position: 0%;--tw-gradient-via-position: 50%;--tw-gradient-to-position: 100%;--tw-leading: initial;--tw-font-weight: initial;--tw-tracking: initial;--tw-shadow: 0 0 #0000;--tw-shadow-color: initial;--tw-shadow-alpha: 100%;--tw-inset-shadow: 0 0 #0000;--tw-inset-shadow-color: initial;--tw-inset-shadow-alpha: 100%;--tw-ring-color: initial;--tw-ring-shadow: 0 0 #0000;--tw-inset-ring-color: initial;--tw-inset-ring-shadow: 0 0 #0000;--tw-ring-inset: initial;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-offset-shadow: 0 0 #0000;--tw-blur: initial;--tw-brightness: initial;--tw-contrast: initial;--tw-grayscale: initial;--tw-hue-rotate: initial;--tw-invert: initial;--tw-opacity: initial;--tw-saturate: initial;--tw-sepia: initial;--tw-drop-shadow: initial;--tw-drop-shadow-color: initial;--tw-drop-shadow-alpha: 100%;--tw-drop-shadow-size: initial;--tw-scale-x: 1;--tw-scale-y: 1;--tw-scale-z: 1;}}.lanyard-team, .lanyard-team {--font-sans: ui-sans-serif, system-ui, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\";--font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace;--color-black: #000;--color-white: #fff;--spacing: .25rem;--container-2xl: 42rem;--text-sm: .875rem;--text-sm--line-height: calc(1.25 / .875);--text-base: 1rem;--text-base--line-height: calc(1.5 / 1);--text-3xl: 1.875rem;--text-3xl--line-height: calc(2.25 / 1.875);--text-4xl: 2.25rem;--text-4xl--line-height: calc(2.5 / 2.25);--font-weight-medium: 500;--font-weight-semibold: 600;--tracking-tight: -.025em;--tracking-normal: 0em;--leading-tight: 1.25;--leading-relaxed: 1.625;--blur-md: 12px;--default-transition-duration: .15s;--default-transition-timing-function: cubic-bezier(.4, 0, .2, 1);--default-font-family: var(--font-sans);--default-mono-font-family: var(--font-mono);}.lanyard-team *, .lanyard-team :after, .lanyard-team :before, .lanyard-team ::backdrop {box-sizing: border-box;border: 0 solid;margin: 0;padding: 0;}.lanyard-team ::file-selector-button {box-sizing: border-box;border: 0 solid;margin: 0;padding: 0;}.lanyard-team, .lanyard-team {-webkit-text-size-adjust: 100%;tab-size: 4;line-height: 1.5;font-family: var(--default-font-family, ui-sans-serif, system-ui, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\");font-feature-settings: var(--default-font-feature-settings, normal);font-variation-settings: var(--default-font-variation-settings, normal);-webkit-tap-highlight-color: transparent;}.lanyard-team hr {height: 0;color: inherit;border-top-width: 1px;}.lanyard-team abbr:where([title]) {-webkit-text-decoration: underline dotted;text-decoration: underline dotted;}.lanyard-team h1, .lanyard-team h2, .lanyard-team h3, .lanyard-team h4, .lanyard-team h5, .lanyard-team h6 {font-size: inherit;font-weight: inherit;}.lanyard-team a {color: inherit;-webkit-text-decoration: inherit;-webkit-text-decoration: inherit;text-decoration: inherit;}.lanyard-team b, .lanyard-team strong {font-weight: bolder;}.lanyard-team code, .lanyard-team kbd, .lanyard-team samp, .lanyard-team pre {font-family: var(--default-mono-font-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace);font-feature-settings: var(--default-mono-font-feature-settings, normal);font-variation-settings: var(--default-mono-font-variation-settings, normal);font-size: 1em;}.lanyard-team small {font-size: 80%;}.lanyard-team sub, .lanyard-team sup {vertical-align: baseline;font-size: 75%;line-height: 0;position: relative;}.lanyard-team sub {bottom: -.25em;}.lanyard-team sup {top: -.5em;}.lanyard-team table {text-indent: 0;border-color: inherit;border-collapse: collapse;}.lanyard-team :-moz-focusring {outline: auto;}.lanyard-team progress {vertical-align: baseline;}.lanyard-team summary {display: list-item;}.lanyard-team ol, .lanyard-team ul, .lanyard-team menu {list-style: none;}.lanyard-team img, .lanyard-team svg, .lanyard-team video, .lanyard-team canvas, .lanyard-team audio, .lanyard-team iframe, .lanyard-team embed, .lanyard-team object {vertical-align: middle;display: block;}.lanyard-team img, .lanyard-team video {max-width: 100%;height: auto;}.lanyard-team button, .lanyard-team input, .lanyard-team select, .lanyard-team optgroup, .lanyard-team textarea {font: inherit;font-feature-settings: inherit;font-variation-settings: inherit;letter-spacing: inherit;color: inherit;opacity: 1;background-color: #0000;border-radius: 0;}.lanyard-team ::file-selector-button {font: inherit;font-feature-settings: inherit;font-variation-settings: inherit;letter-spacing: inherit;color: inherit;opacity: 1;background-color: #0000;border-radius: 0;}.lanyard-team :where(select:is([multiple], [size])) optgroup {font-weight: bolder;}.lanyard-team :where(select:is([multiple], [size])) optgroup option {padding-inline-start: 20px;}.lanyard-team ::file-selector-button {margin-inline-end: 4px;}.lanyard-team ::placeholder {opacity: 1;}@supports (not ((-webkit-appearance: -apple-pay-button))) or (contain-intrinsic-size: 1px) {.lanyard-team ::placeholder {color: currentColor;}@supports (color: color-mix(in lab, red, red)) {.lanyard-team ::placeholder {color: color-mix(in oklab, currentcolor 50%, transparent);}}}.lanyard-team textarea {resize: vertical;}.lanyard-team ::-webkit-search-decoration {-webkit-appearance: none;}.lanyard-team ::-webkit-date-and-time-value {min-height: 1lh;text-align: inherit;}.lanyard-team ::-webkit-datetime-edit {display: inline-flex;}.lanyard-team ::-webkit-datetime-edit-fields-wrapper {padding: 0;}.lanyard-team ::-webkit-datetime-edit {padding-block: 0;}.lanyard-team ::-webkit-datetime-edit-year-field {padding-block: 0;}.lanyard-team ::-webkit-datetime-edit-month-field {padding-block: 0;}.lanyard-team ::-webkit-datetime-edit-day-field {padding-block: 0;}.lanyard-team ::-webkit-datetime-edit-hour-field {padding-block: 0;}.lanyard-team ::-webkit-datetime-edit-minute-field {padding-block: 0;}.lanyard-team ::-webkit-datetime-edit-second-field {padding-block: 0;}.lanyard-team ::-webkit-datetime-edit-millisecond-field {padding-block: 0;}.lanyard-team ::-webkit-datetime-edit-meridiem-field {padding-block: 0;}.lanyard-team :-moz-ui-invalid {box-shadow: none;}.lanyard-team button, .lanyard-team input:where([type=\"button\"], [type=\"reset\"], [type=\"submit\"]) {appearance: button;}.lanyard-team ::file-selector-button {appearance: button;}.lanyard-team ::-webkit-inner-spin-button {height: auto;}.lanyard-team ::-webkit-outer-spin-button {height: auto;}.lanyard-team [hidden]:where(:not([hidden=\"until-found\"])) {display: none !important;}.lanyard-team .pointer-events-none {pointer-events: none;}.lanyard-team .visible {visibility: visible;}.lanyard-team .sr-only {clip: rect(0, 0, 0, 0);white-space: nowrap;border-width: 0;width: 1px;height: 1px;margin: -1px;padding: 0;position: absolute;overflow: hidden;}.lanyard-team .absolute {position: absolute;}.lanyard-team .relative {position: relative;}.lanyard-team .inset-0 {inset: calc(var(--spacing) * 0);}.lanyard-team .inset-x-0 {inset-inline: calc(var(--spacing) * 0);}.lanyard-team .inset-x-\\[8\\%\\] {inset-inline: 8%;}.lanyard-team .inset-y-0 {inset-block: calc(var(--spacing) * 0);}.lanyard-team .top-0 {top: calc(var(--spacing) * 0);}.lanyard-team .top-1 {top: calc(var(--spacing) * 1);}.lanyard-team .top-\\[0\\.55em\\] {top: .55em;}.lanyard-team .-bottom-3 {bottom: calc(var(--spacing) * -3);}.lanyard-team .-left-1\\/2 {left: -50%;}.lanyard-team .left-0 {left: calc(var(--spacing) * 0);}.lanyard-team .left-1\\/2 {left: 50%;}.lanyard-team .z-10 {z-index: 10;}.lanyard-team .z-20 {z-index: 20;}.lanyard-team .mx-auto {margin-inline: auto;}.lanyard-team .ms-\\[0\\.2em\\] {margin-inline-start: .2em;}.lanyard-team .-mt-\\[2\\.1em\\] {margin-top: -2.1em;}.lanyard-team .mt-6 {margin-top: calc(var(--spacing) * 6);}.lanyard-team .mt-\\[0\\.2em\\] {margin-top: .2em;}.lanyard-team .mt-\\[0\\.5em\\] {margin-top: .5em;}.lanyard-team .mt-\\[0\\.6em\\] {margin-top: .6em;}.lanyard-team .mt-\\[0\\.45em\\] {margin-top: .45em;}.lanyard-team .mt-auto {margin-top: auto;}.lanyard-team .line-clamp-1 {-webkit-line-clamp: 1;-webkit-box-orient: vertical;display: -webkit-box;overflow: hidden;}.lanyard-team .line-clamp-5 {-webkit-line-clamp: 5;-webkit-box-orient: vertical;display: -webkit-box;overflow: hidden;}.lanyard-team .flex {display: flex;}.lanyard-team .grid {display: grid;}.lanyard-team .hidden {display: none;}.lanyard-team .inline {display: inline;}.lanyard-team .size-\\[0\\.8em\\] {width: .8em;height: .8em;}.lanyard-team .size-\\[0\\.95em\\] {width: .95em;height: .95em;}.lanyard-team .size-\\[1\\.9em\\] {width: 1.9em;height: 1.9em;}.lanyard-team .size-\\[2\\.6em\\] {width: 2.6em;height: 2.6em;}.lanyard-team .size-\\[4\\.2em\\] {width: 4.2em;height: 4.2em;}.lanyard-team .size-\\[11px\\] {width: 11px;height: 11px;}.lanyard-team .size-full {width: 100%;height: 100%;}.lanyard-team .h-6 {height: calc(var(--spacing) * 6);}.lanyard-team .h-\\[0\\.42em\\] {height: .42em;}.lanyard-team .h-\\[1\\.4em\\] {height: 1.4em;}.lanyard-team .h-\\[5px\\] {height: 5px;}.lanyard-team .h-\\[27\\%\\] {height: 27%;}.lanyard-team .h-full {height: 100%;}.lanyard-team .w-\\[6\\.5em\\] {width: 6.5em;}.lanyard-team .w-\\[26\\%\\] {width: 26%;}.lanyard-team .w-\\[200\\%\\] {width: 200%;}.lanyard-team .w-full {width: 100%;}.lanyard-team .max-w-2xl {max-width: var(--container-2xl);}.lanyard-team .min-w-0 {min-width: calc(var(--spacing) * 0);}.lanyard-team .flex-1 {flex: 1;}.lanyard-team .shrink-0 {flex-shrink: 0;}.lanyard-team .-translate-x-1\\/2 {--tw-translate-x: calc(calc(1 / 2 * 100%) * -1);translate: var(--tw-translate-x) var(--tw-translate-y);}.lanyard-team .\\[transform\\:rotateY\\(180deg\\)\\] {transform: rotateY(180deg);}.lanyard-team .transform {transform: var(--tw-rotate-x, ) var(--tw-rotate-y, ) var(--tw-rotate-z, ) var(--tw-skew-x, ) var(--tw-skew-y, );}.lanyard-team .cursor-grab {cursor: grab;}.lanyard-team .touch-pan-y {--tw-pan-y: pan-y;touch-action: var(--tw-pan-x, ) var(--tw-pan-y, ) var(--tw-pinch-zoom, );}.lanyard-team .snap-x {scroll-snap-type: x var(--tw-scroll-snap-strictness);}.lanyard-team .snap-mandatory {--tw-scroll-snap-strictness: mandatory;}.lanyard-team .snap-center {scroll-snap-align: center;}.lanyard-team .flex-col {flex-direction: column;}.lanyard-team .flex-wrap {flex-wrap: wrap;}.lanyard-team .place-items-center {place-items: center;}.lanyard-team .items-center {align-items: center;}.lanyard-team .items-end {align-items: flex-end;}.lanyard-team .items-start {align-items: flex-start;}.lanyard-team .justify-between {justify-content: space-between;}.lanyard-team .gap-2 {gap: calc(var(--spacing) * 2);}.lanyard-team .gap-3 {gap: calc(var(--spacing) * 3);}.lanyard-team .gap-\\[0\\.2em\\] {gap: .2em;}.lanyard-team .gap-\\[0\\.3em\\] {gap: .3em;}.lanyard-team .gap-\\[0\\.4em\\] {gap: .4em;}.lanyard-team .gap-\\[0\\.5em\\] {gap: .5em;}.lanyard-team .gap-\\[0\\.25em\\] {gap: .25em;}.lanyard-team .truncate {text-overflow: ellipsis;white-space: nowrap;overflow: hidden;}.lanyard-team .overflow-hidden {overflow: hidden;}.lanyard-team .overflow-visible {overflow: visible;}.lanyard-team .overflow-x-auto {overflow-x: auto;}.lanyard-team .overflow-y-hidden {overflow-y: hidden;}.lanyard-team .rounded-\\[1\\.1em\\] {border-radius: 1.1em;}.lanyard-team .rounded-\\[1em\\] {border-radius: 1em;}.lanyard-team .rounded-\\[50\\%\\] {border-radius: 50%;}.lanyard-team .rounded-\\[inherit\\] {border-radius: inherit;}.lanyard-team .rounded-full {border-radius: 3.40282e38px;}.lanyard-team .rounded-b-\\[3px\\] {border-bottom-right-radius: 3px;border-bottom-left-radius: 3px;}.lanyard-team .border {border-style: var(--tw-border-style);border-width: 1px;}.lanyard-team .border-2 {border-style: var(--tw-border-style);border-width: 2px;}.lanyard-team .border-border {border-color: var(--border);}.lanyard-team .border-foreground\\/30 {border-color: var(--foreground);}@supports (color: color-mix(in lab, red, red)) {.lanyard-team .border-foreground\\/30 {border-color: color-mix(in oklab, var(--foreground) 30%, transparent);}}.lanyard-team .bg-background {background-color: var(--background);}.lanyard-team .bg-black\\/25 {background-color: #00000040;}@supports (color: color-mix(in lab, red, red)) {.lanyard-team .bg-black\\/25 {background-color: color-mix(in oklab, var(--color-black) 25%, transparent);}}.lanyard-team .bg-card {background-color: var(--card);}.lanyard-team .bg-muted {background-color: var(--muted);}.lanyard-team .bg-gradient-to-b {--tw-gradient-position: to bottom in oklab;background-image: linear-gradient(var(--tw-gradient-stops));}.lanyard-team .from-foreground\\/20 {--tw-gradient-from: var(--foreground);}@supports (color: color-mix(in lab, red, red)) {.lanyard-team .from-foreground\\/20 {--tw-gradient-from: color-mix(in oklab, var(--foreground) 20%, transparent);}}.lanyard-team .from-foreground\\/20 {--tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position));}.lanyard-team .via-foreground\\/10 {--tw-gradient-via: var(--foreground);}@supports (color: color-mix(in lab, red, red)) {.lanyard-team .via-foreground\\/10 {--tw-gradient-via: color-mix(in oklab, var(--foreground) 10%, transparent);}}.lanyard-team .via-foreground\\/10 {--tw-gradient-via-stops: var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-via-stops);}.lanyard-team .to-foreground\\/25 {--tw-gradient-to: var(--foreground);}@supports (color: color-mix(in lab, red, red)) {.lanyard-team .to-foreground\\/25 {--tw-gradient-to: color-mix(in oklab, var(--foreground) 25%, transparent);}}.lanyard-team .to-foreground\\/25 {--tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position));}.lanyard-team .object-cover {object-fit: cover;}.lanyard-team .px-6 {padding-inline: calc(var(--spacing) * 6);}.lanyard-team .px-\\[0\\.6em\\] {padding-inline: .6em;}.lanyard-team .px-\\[0\\.9em\\] {padding-inline: .9em;}.lanyard-team .px-\\[0\\.55em\\] {padding-inline: .55em;}.lanyard-team .py-\\[0\\.15em\\] {padding-block: .15em;}.lanyard-team .pt-14 {padding-top: calc(var(--spacing) * 14);}.lanyard-team .pt-\\[1\\.5em\\] {padding-top: 1.5em;}.lanyard-team .pb-\\[0\\.8em\\] {padding-bottom: .8em;}.lanyard-team .text-center {text-align: center;}.lanyard-team .text-start {text-align: start;}.lanyard-team .align-\\[-0\\.05em\\] {vertical-align: -.05em;}.lanyard-team .font-mono {font-family: var(--font-mono);}.lanyard-team .text-3xl {font-size: var(--text-3xl);line-height: var(--tw-leading, var(--text-3xl--line-height));}.lanyard-team .text-sm {font-size: var(--text-sm);line-height: var(--tw-leading, var(--text-sm--line-height));}.lanyard-team .text-\\[0\\.5em\\] {font-size: .5em;}.lanyard-team .text-\\[0\\.9em\\] {font-size: .9em;}.lanyard-team .text-\\[0\\.48em\\] {font-size: .48em;}.lanyard-team .text-\\[0\\.55em\\] {font-size: .55em;}.lanyard-team .text-\\[0\\.58em\\] {font-size: .58em;}.lanyard-team .text-\\[0\\.62em\\] {font-size: .62em;}.lanyard-team .text-\\[0\\.64em\\] {font-size: .64em;}.lanyard-team .text-\\[0\\.72em\\] {font-size: .72em;}.lanyard-team .text-\\[1\\.08em\\] {font-size: 1.08em;}.lanyard-team .text-\\[1em\\] {font-size: 1em;}.lanyard-team .text-\\[11px\\] {font-size: 11px;}.lanyard-team .leading-relaxed {--tw-leading: var(--leading-relaxed);line-height: var(--leading-relaxed);}.lanyard-team .leading-tight {--tw-leading: var(--leading-tight);line-height: var(--leading-tight);}.lanyard-team .font-medium {--tw-font-weight: var(--font-weight-medium);font-weight: var(--font-weight-medium);}.lanyard-team .font-semibold {--tw-font-weight: var(--font-weight-semibold);font-weight: var(--font-weight-semibold);}.lanyard-team .tracking-\\[0\\.16em\\] {--tw-tracking: .16em;letter-spacing: .16em;}.lanyard-team .tracking-\\[0\\.18em\\] {--tw-tracking: .18em;letter-spacing: .18em;}.lanyard-team .tracking-\\[0\\.24em\\] {--tw-tracking: .24em;letter-spacing: .24em;}.lanyard-team .tracking-tight {--tw-tracking: var(--tracking-tight);letter-spacing: var(--tracking-tight);}.lanyard-team .text-balance {text-wrap: balance;}.lanyard-team .text-pretty {text-wrap: pretty;}.lanyard-team .whitespace-nowrap {white-space: nowrap;}.lanyard-team .text-card-foreground {color: var(--card-foreground);}.lanyard-team .text-foreground {color: var(--foreground);}.lanyard-team .text-foreground\\/55 {color: var(--foreground);}@supports (color: color-mix(in lab, red, red)) {.lanyard-team .text-foreground\\/55 {color: color-mix(in oklab, var(--foreground) 55%, transparent);}}.lanyard-team .text-foreground\\/80 {color: var(--foreground);}@supports (color: color-mix(in lab, red, red)) {.lanyard-team .text-foreground\\/80 {color: color-mix(in oklab, var(--foreground) 80%, transparent);}}.lanyard-team .text-muted-foreground {color: var(--muted-foreground);}.lanyard-team .text-white {color: var(--color-white);}.lanyard-team .text-white\\/75 {color: #ffffffbf;}@supports (color: color-mix(in lab, red, red)) {.lanyard-team .text-white\\/75 {color: color-mix(in oklab, var(--color-white) 75%, transparent);}}.lanyard-team .uppercase {text-transform: uppercase;}.lanyard-team .underline-offset-2 {text-underline-offset: 2px;}.lanyard-team .opacity-25 {opacity: .25;}.lanyard-team .opacity-80 {opacity: .8;}.lanyard-team .mix-blend-soft-light {mix-blend-mode: soft-light;}.lanyard-team .shadow-\\[0_6px_14px_-6px_rgba\\(0\\,0\\,0\\,\\.35\\)\\] {--tw-shadow: 0 6px 14px -6px var(--tw-shadow-color, #00000059);box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);}.lanyard-team .shadow-\\[0_18px_40px_-18px_rgba\\(0\\,0\\,0\\,\\.45\\)\\] {--tw-shadow: 0 18px 40px -18px var(--tw-shadow-color, #00000073);box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);}.lanyard-team .shadow-\\[inset_0_1px_2px_rgba\\(0\\,0\\,0\\,\\.45\\)\\] {--tw-shadow: inset 0 1px 2px var(--tw-shadow-color, #00000073);box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);}.lanyard-team .shadow-\\[inset_1px_0_0_rgba\\(255\\,255\\,255\\,\\.18\\)\\,inset_-1px_0_0_rgba\\(0\\,0\\,0\\,\\.18\\)\\] {--tw-shadow: inset 1px 0 0 var(--tw-shadow-color, #ffffff2e), inset -1px 0 0 var(--tw-shadow-color, #0000002e);box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);}.lanyard-team .ring-1 {--tw-ring-shadow: var(--tw-ring-inset, ) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);}.lanyard-team .ring-\\[0\\.2em\\] {--tw-ring-shadow: var(--tw-ring-inset, ) 0 0 0 calc(.2em + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);}.lanyard-team .ring-black\\/5 {--tw-ring-color: #0000000d;}@supports (color: color-mix(in lab, red, red)) {.lanyard-team .ring-black\\/5 {--tw-ring-color: color-mix(in oklab, var(--color-black) 5%, transparent);}}.lanyard-team .ring-card {--tw-ring-color: var(--card);}.lanyard-team .blur-md {--tw-blur: blur(var(--blur-md));filter: var(--tw-blur, ) var(--tw-brightness, ) var(--tw-contrast, ) var(--tw-grayscale, ) var(--tw-hue-rotate, ) var(--tw-invert, ) var(--tw-saturate, ) var(--tw-sepia, ) var(--tw-drop-shadow, );}.lanyard-team .transition-colors {transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to;transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));transition-duration: var(--tw-duration, var(--default-transition-duration));}.lanyard-team .will-change-transform {will-change: transform;}.lanyard-team .outline-none {--tw-outline-style: none;outline-style: none;}.lanyard-team .select-none {-webkit-user-select: none;user-select: none;}.lanyard-team .\\[backface-visibility\\:hidden\\] {backface-visibility: hidden;}.lanyard-team .\\[scrollbar-width\\:none\\] {scrollbar-width: none;}.lanyard-team .\\[transform-style\\:preserve-3d\\] {transform-style: preserve-3d;}.lanyard-team .\\[writing-mode\\:vertical-rl\\] {writing-mode: vertical-rl;}@media (hover: hover) {.lanyard-team .hover\\:text-foreground:hover {color: var(--foreground);}}@media (hover: hover) {.lanyard-team .hover\\:underline:hover {text-decoration-line: underline;}}.lanyard-team .focus-visible\\:ring-2:focus-visible {--tw-ring-shadow: var(--tw-ring-inset, ) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);}.lanyard-team .focus-visible\\:ring-ring:focus-visible {--tw-ring-color: var(--ring);}.lanyard-team .active\\:cursor-grabbing:active {cursor: grabbing;}@media (min-width: 40rem) {.lanyard-team .sm\\:text-4xl {font-size: var(--text-4xl);line-height: var(--tw-leading, var(--text-4xl--line-height));}}@media (min-width: 40rem) {.lanyard-team .sm\\:text-base {font-size: var(--text-base);line-height: var(--tw-leading, var(--text-base--line-height));}}.lanyard-team .rtl\\:-scale-x-100:where(:is(:lang(ae), :lang(ar), :lang(arc), :lang(bcc), :lang(bqi), :lang(ckb), :lang(dv), :lang(fa), :lang(glk), :lang(he), :lang(ku), :lang(mzn), :lang(nqo), :lang(pnb), :lang(ps), :lang(sd), :lang(ug), :lang(ur), :lang(yi)), [dir=\"rtl\"], [dir=\"rtl\"] *) {--tw-scale-x: calc(100% * -1);scale: var(--tw-scale-x) var(--tw-scale-y);}.lanyard-team .rtl\\:font-sans:where(:is(:lang(ae), :lang(ar), :lang(arc), :lang(bcc), :lang(bqi), :lang(ckb), :lang(dv), :lang(fa), :lang(glk), :lang(he), :lang(ku), :lang(mzn), :lang(nqo), :lang(pnb), :lang(ps), :lang(sd), :lang(ug), :lang(ur), :lang(yi)), [dir=\"rtl\"], [dir=\"rtl\"] *) {font-family: var(--font-sans);}.lanyard-team .rtl\\:\\!tracking-normal:where(:is(:lang(ae), :lang(ar), :lang(arc), :lang(bcc), :lang(bqi), :lang(ckb), :lang(dv), :lang(fa), :lang(glk), :lang(he), :lang(ku), :lang(mzn), :lang(nqo), :lang(pnb), :lang(ps), :lang(sd), :lang(ug), :lang(ur), :lang(yi)), [dir=\"rtl\"], [dir=\"rtl\"] *) {--tw-tracking: var(--tracking-normal) !important;letter-spacing: var(--tracking-normal) !important;}.lanyard-team .rtl\\:tracking-normal:where(:is(:lang(ae), :lang(ar), :lang(arc), :lang(bcc), :lang(bqi), :lang(ckb), :lang(dv), :lang(fa), :lang(glk), :lang(he), :lang(ku), :lang(mzn), :lang(nqo), :lang(pnb), :lang(ps), :lang(sd), :lang(ug), :lang(ur), :lang(yi)), [dir=\"rtl\"], [dir=\"rtl\"] *) {--tw-tracking: var(--tracking-normal);letter-spacing: var(--tracking-normal);}.lanyard-team .dark\\:bg-black\\/60:is(.dark *) {background-color: #0009;}@supports (color: color-mix(in lab, red, red)) {.lanyard-team .dark\\:bg-black\\/60:is(.dark *) {background-color: color-mix(in oklab, var(--color-black) 60%, transparent);}}.lanyard-team .dark\\:ring-white\\/10:is(.dark *) {--tw-ring-color: #ffffff1a;}@supports (color: color-mix(in lab, red, red)) {.lanyard-team .dark\\:ring-white\\/10:is(.dark *) {--tw-ring-color: color-mix(in oklab, var(--color-white) 10%, transparent);}}.lanyard-team {--radius: .625rem;--background: #fafafa;--foreground: #0a0a0a;--card: #fff;--card-foreground: #0a0a0a;--muted: #f5f5f5;--muted-foreground: #737373;--border: #e5e5e5;--ring: #a1a1a1;}@supports (color: lab(0% 0 0)) {.lanyard-team {--background: lab(98.26% 0 0);--foreground: lab(2.75381% 0 0);--card: lab(100% 0 0);--card-foreground: lab(2.75381% 0 0);--muted: lab(96.52% -.0000596046 0);--muted-foreground: lab(48.496% 0 0);--border: lab(90.952% -.0000596046 0);--ring: lab(66.128% -.0000298023 .0000119209);}}.lanyard-team.dark {--background: #0a0a0a;--foreground: #fafafa;--card: #171717;--card-foreground: #fafafa;--muted: #262626;--muted-foreground: #a1a1a1;--border: #ffffff1a;--ring: #737373;}@supports (color: lab(0% 0 0)) {.lanyard-team.dark {--background: lab(2.75381% 0 0);--foreground: lab(98.26% 0 0);--card: lab(7.78201% -.0000149012 0);--card-foreground: lab(98.26% 0 0);--muted: lab(15.204% 0 0);--muted-foreground: lab(66.128% -.0000298023 .0000119209);--border: lab(100% 0 0 / .1);--ring: lab(48.496% 0 0);}}@property --tw-translate-x {syntax: \"*\";inherits: false;initial-value: 0;}@property --tw-translate-y {syntax: \"*\";inherits: false;initial-value: 0;}@property --tw-translate-z {syntax: \"*\";inherits: false;initial-value: 0;}@property --tw-rotate-x {syntax: \"*\";inherits: false}@property --tw-rotate-y {syntax: \"*\";inherits: false}@property --tw-rotate-z {syntax: \"*\";inherits: false}@property --tw-skew-x {syntax: \"*\";inherits: false}@property --tw-skew-y {syntax: \"*\";inherits: false}@property --tw-pan-x {syntax: \"*\";inherits: false}@property --tw-pan-y {syntax: \"*\";inherits: false}@property --tw-pinch-zoom {syntax: \"*\";inherits: false}@property --tw-scroll-snap-strictness {syntax: \"*\";inherits: false;initial-value: proximity;}@property --tw-border-style {syntax: \"*\";inherits: false;initial-value: solid;}@property --tw-gradient-position {syntax: \"*\";inherits: false}@property --tw-gradient-from {syntax: \"<color>\";inherits: false;initial-value: #0000;}@property --tw-gradient-via {syntax: \"<color>\";inherits: false;initial-value: #0000;}@property --tw-gradient-to {syntax: \"<color>\";inherits: false;initial-value: #0000;}@property --tw-gradient-stops {syntax: \"*\";inherits: false}@property --tw-gradient-via-stops {syntax: \"*\";inherits: false}@property --tw-gradient-from-position {syntax: \"<length-percentage>\";inherits: false;initial-value: 0%;}@property --tw-gradient-via-position {syntax: \"<length-percentage>\";inherits: false;initial-value: 50%;}@property --tw-gradient-to-position {syntax: \"<length-percentage>\";inherits: false;initial-value: 100%;}@property --tw-leading {syntax: \"*\";inherits: false}@property --tw-font-weight {syntax: \"*\";inherits: false}@property --tw-tracking {syntax: \"*\";inherits: false}@property --tw-shadow {syntax: \"*\";inherits: false;initial-value: 0 0 #0000;}@property --tw-shadow-color {syntax: \"*\";inherits: false}@property --tw-shadow-alpha {syntax: \"<percentage>\";inherits: false;initial-value: 100%;}@property --tw-inset-shadow {syntax: \"*\";inherits: false;initial-value: 0 0 #0000;}@property --tw-inset-shadow-color {syntax: \"*\";inherits: false}@property --tw-inset-shadow-alpha {syntax: \"<percentage>\";inherits: false;initial-value: 100%;}@property --tw-ring-color {syntax: \"*\";inherits: false}@property --tw-ring-shadow {syntax: \"*\";inherits: false;initial-value: 0 0 #0000;}@property --tw-inset-ring-color {syntax: \"*\";inherits: false}@property --tw-inset-ring-shadow {syntax: \"*\";inherits: false;initial-value: 0 0 #0000;}@property --tw-ring-inset {syntax: \"*\";inherits: false}@property --tw-ring-offset-width {syntax: \"<length>\";inherits: false;initial-value: 0;}@property --tw-ring-offset-color {syntax: \"*\";inherits: false;initial-value: #fff;}@property --tw-ring-offset-shadow {syntax: \"*\";inherits: false;initial-value: 0 0 #0000;}@property --tw-blur {syntax: \"*\";inherits: false}@property --tw-brightness {syntax: \"*\";inherits: false}@property --tw-contrast {syntax: \"*\";inherits: false}@property --tw-grayscale {syntax: \"*\";inherits: false}@property --tw-hue-rotate {syntax: \"*\";inherits: false}@property --tw-invert {syntax: \"*\";inherits: false}@property --tw-opacity {syntax: \"*\";inherits: false}@property --tw-saturate {syntax: \"*\";inherits: false}@property --tw-sepia {syntax: \"*\";inherits: false}@property --tw-drop-shadow {syntax: \"*\";inherits: false}@property --tw-drop-shadow-color {syntax: \"*\";inherits: false}@property --tw-drop-shadow-alpha {syntax: \"<percentage>\";inherits: false;initial-value: 100%;}@property --tw-drop-shadow-size {syntax: \"*\";inherits: false}@property --tw-scale-x {syntax: \"*\";inherits: false;initial-value: 1;}@property --tw-scale-y {syntax: \"*\";inherits: false;initial-value: 1;}@property --tw-scale-z {syntax: \"*\";inherits: false;initial-value: 1;}"
const dicebear = (seed) =>
`https://api.dicebear.com/9.x/notionists/svg?seed=${encodeURIComponent(seed)}&backgroundType=solid&backgroundColor=transparent`
const DEMO_MEMBERS = [
{ name: "Lina Haddad", role: "Product Designer", location: "Casablanca", bio: "Turns messy flows into calm interfaces. Loves type, hates modals.", skills: ["Figma", "Design systems", "Motion"], links: [{ label: "Portfolio", href: "#" }] },
{ name: "Youssef Amrani", role: "Frontend Engineer", location: "Rabat", bio: "React, TypeScript and a soft spot for spring physics.", skills: ["React", "TypeScript", "Tailwind"], links: [{ label: "GitHub", href: "#" }] },
{ name: "Sara Benali", role: "Backend Engineer", location: "Marrakech", bio: "Ships APIs that stay boring at 3 a.m.", skills: ["Laravel", "MySQL", "Redis"], links: [{ label: "GitHub", href: "#" }] },
{ name: "Omar Tazi", role: "Automation Lead", location: "Tangier", bio: "If you do it twice, he builds an n8n workflow for it.", skills: ["n8n", "Webhooks", "APIs"], links: [{ label: "LinkedIn", href: "#" }] },
{ name: "Nadia Kettani", role: "Engineering Manager", location: "Remote", bio: "Keeps the team shipping and the standups short.", skills: ["Leadership", "Hiring", "Scrum"], links: [{ label: "LinkedIn", href: "#" }] },
]
const DEFAULTS = {
members: DEMO_MEMBERS,
eyebrow: "The crew",
title: "Meet the people behind the build",
description: "Grab a badge and give it a swing. Flip it to read the back.",
event: "SHIP WEEK 26",
breeze: true,
entrance: true,
illustratedAvatars: true,
theme: "light",
direction: "ltr",
labels: { flip: "Flip badge", flipBack: "Show front", about: "About", access: "All access" },
}
const imageSrc = (v) => (v && typeof v === "object" ? v.src : v) || undefined
/**
* Lanyard Team — by El Mehdi Sekrare
*
* @framerSupportedLayoutWidth any-prefer-fixed
* @framerSupportedLayoutHeight any
* @framerIntrinsicWidth 1200
* @framerIntrinsicHeight 760
*/
export default function LanyardTeamFramer(rawProps) {
const p = { ...DEFAULTS }
for (const k in rawProps) if (rawProps[k] !== undefined) p[k] = rawProps[k]
const members = React.useMemo(() => {
const list = p.members && p.members.length ? p.members : DEMO_MEMBERS
return list.map((m, i) => ({
id: `m-${i}`,
name: m.name || `Member ${i + 1}`,
role: m.role || "",
avatar: imageSrc(m.avatar) || (p.illustratedAvatars ? dicebear(m.name || String(i)) : undefined),
accent: m.accent || undefined,
location: m.location || undefined,
bio: m.bio || undefined,
skills: (m.skills || []).filter(Boolean),
links: (m.links || []).filter((l) => l && l.label && l.href),
}))
}, [p.members, p.illustratedAvatars])
return (
<>
<style>{CSS}</style>
<div
className={p.theme === "dark" ? `${SCOPE} dark` : SCOPE}
dir={p.direction}
style={{
...p.style,
width: "100%",
height: "100%",
display: "flex",
alignItems: "center",
background: p.background || "var(--background)",
color: "var(--foreground)",
overflow: "hidden",
}}
>
<LanyardTeam
key={members.length}
members={members}
eyebrow={p.eyebrow || undefined}
title={p.title || undefined}
description={p.description || undefined}
event={p.event}
breeze={p.breeze}
entrance={p.entrance}
labels={p.labels}
style={{ background: "transparent" }}
/>
</div>
</>
)
}
LanyardTeamFramer.defaultProps = DEFAULTS
addPropertyControls(LanyardTeamFramer, {
eyebrow: { type: ControlType.String, title: "Eyebrow", defaultValue: DEFAULTS.eyebrow },
title: { type: ControlType.String, title: "Title", displayTextArea: true, defaultValue: DEFAULTS.title },
description: { type: ControlType.String, title: "Description", displayTextArea: true, defaultValue: DEFAULTS.description },
event: { type: ControlType.String, title: "Strap text", defaultValue: DEFAULTS.event },
breeze: { type: ControlType.Boolean, title: "Idle sway", defaultValue: true },
entrance: { type: ControlType.Boolean, title: "Drop in", defaultValue: true },
theme: { type: ControlType.Enum, title: "Theme", options: ["light", "dark"], optionTitles: ["Light", "Dark"], displaySegmentedControl: true, defaultValue: "light" },
direction: { type: ControlType.Enum, title: "Direction", options: ["ltr", "rtl"], optionTitles: ["LTR", "RTL"], displaySegmentedControl: true, defaultValue: "ltr" },
background: { type: ControlType.Color, title: "Background", optional: true },
illustratedAvatars: { type: ControlType.Boolean, title: "Fallback avatars", enabledTitle: "Illustrated", disabledTitle: "Initials", defaultValue: true },
members: {
type: ControlType.Array,
title: "Members",
maxCount: 12,
defaultValue: DEMO_MEMBERS,
control: {
type: ControlType.Object,
controls: {
name: { type: ControlType.String, title: "Name" },
role: { type: ControlType.String, title: "Role" },
avatar: { type: ControlType.ResponsiveImage, title: "Photo" },
accent: { type: ControlType.Color, title: "Color", optional: true },
location: { type: ControlType.String, title: "Location" },
bio: { type: ControlType.String, title: "Bio", displayTextArea: true },
skills: { type: ControlType.Array, title: "Skills", maxCount: 4, control: { type: ControlType.String } },
links: {
type: ControlType.Array,
title: "Links",
maxCount: 3,
control: {
type: ControlType.Object,
controls: {
label: { type: ControlType.String, title: "Label", defaultValue: "LinkedIn" },
href: { type: ControlType.Link, title: "URL" },
},
},
},
},
},
},
labels: {
type: ControlType.Object,
title: "Labels",
controls: {
flip: { type: ControlType.String, title: "Flip", defaultValue: "Flip badge" },
flipBack: { type: ControlType.String, title: "Flip back", defaultValue: "Show front" },
about: { type: ControlType.String, title: "About", defaultValue: "About" },
access: { type: ControlType.String, title: "Access", defaultValue: "All access" },
},
},
})
// @ts-nocheck
/* Lanyard Team — Framer code component by El Mehdi Sekrare (MIT). Generated file: edit src/ + framer/wrapper.tsx, then run `npm run framer`. */
import * as React from "react";
import { addPropertyControls, ControlType } from "framer";
// ---------- component ----------
/**
* Lanyard Team — a team section where every member hangs on a lanyard.
* Drag a badge and let go, brush past it, or click to flip it for the bio.
* Zero dependencies (React + Tailwind), RTL-ready, keyboard accessible,
* respects prefers-reduced-motion. © El Mehdi Sekrare — MIT.
*/
export type LanyardLink = {
/** Visible text, e.g. "GitHub". */
label: string;
/** Where the link goes. Opens in a new tab. */
href: string;
};
export type LanyardMember = {
/** Stable key. Defaults to the name. */
id?: string;
/** Full name, shown on the front and back of the badge. */
name: string;
/** Job title under the name. */
role: string;
/** Photo URL. Falls back to initials on the badge colour. */
avatar?: string;
/** Badge + strap colour (any CSS colour, including `var(--color-primary)`). Defaults to `palette`. */
accent?: string;
/** Small pill under the role, e.g. a city or "Remote". */
location?: string;
/** Short bio on the back of the badge (about 120 characters). */
bio?: string;
/** Up to 4 skill chips on the back. */
skills?: string[];
/** Up to 3 links on the back. */
links?: LanyardLink[];
/** Printed on the badge, e.g. "042". Generated from the name when empty. */
badgeNumber?: string;
};
export type LanyardLabels = {
/** Accessible label of the flip button on the front. */
flip: string;
/** Accessible label of the flip button on the back. */
flipBack: string;
/** Heading on the back of the badge. */
about: string;
/** Small caption above the barcode. */
access: string;
};
export type LanyardTeamProps = Omit<React.HTMLAttributes<HTMLElement>, "title"> & {
/** The people to hang on the rail. Works best with 3–8 members. */
members: LanyardMember[];
/** Small uppercase line above the title. */
eyebrow?: React.ReactNode;
/** Section heading. Also used as the accessible name of the list. */
title?: React.ReactNode;
/** Supporting text under the title. */
description?: React.ReactNode;
/** Text printed along every strap and on the badge band, e.g. an event or company name. */
event?: string;
/** Badge colours used (in order) for members without an `accent`. */
palette?: string[];
/** Gentle idle sway while the section is on screen. Default `true`. */
breeze?: boolean;
/** Badges drop in from the rail the first time the section is seen. Default `true`. */
entrance?: boolean;
/** UI text for translation (e.g. Arabic). */
labels?: Partial<LanyardLabels>;
};
const DEFAULT_LABELS: LanyardLabels = {
flip: "Flip badge",
flipBack: "Show front",
about: "About",
access: "All access",
};
const DEFAULT_PALETTE = ["#E5484D", "#3E63DD", "#12A594", "#8E4EC6", "#F76B15", "#D6409F", "#0090FF", "#46A758"];
// ---------- small utils ----------
const cx = (...c: Array<string | false | null | undefined>) => c.filter(Boolean).join(" ");
const clamp = (v: number, a: number, b: number) => Math.max(a, Math.min(b, v));
function hashString(s: string) {
let h = 2166136261;
for (let i = 0; i < s.length; i++) {
h ^= s.charCodeAt(i);
h = Math.imul(h, 16777619);
}
return h >>> 0;
}
function seeded(seed: number) {
let a = seed || 1;
return () => {
a = (a + 0x6d2b79f5) | 0;
let t = Math.imul(a ^ (a >>> 15), 1 | a);
t = (t + Math.imul(t ^ (t >>> 7), 61 | t)) ^ t;
return ((t ^ (t >>> 14)) >>> 0) / 4294967296;
};
}
function initials(name: string) {
const parts = name.trim().split(/\s+/);
return ((parts[0]?.[0] ?? "") + (parts.length > 1 ? parts[parts.length - 1][0] : "")).toUpperCase();
}
// ---------- physics constants ----------
const GRAVITY = 2600; // px/s², tuned for a ~1.4 s swing on a 150 px strap
const SWING_DAMP = 0.85;
const HINGE_K = 95;
const HINGE_DAMP = 7;
const STRETCH_K = 260;
const STRETCH_DAMP = 16;
const FLIP_K = 170;
const FLIP_DAMP = 2 * Math.sqrt(FLIP_K) * 0.72;
const DROP_K = 110;
const DROP_DAMP = 2 * Math.sqrt(DROP_K) * 0.5;
const MAX_ANGLE = 1.25;
const RAIL_Y = 18;
type Sim = {
th: number[]; om: number[]; acc: number[];
ph: number[]; pv: number[];
s: number[]; sv: number[];
f: number[]; fv: number[]; ft: number[];
dy: number[]; dv: number[]; delay: number[];
drag: number; t0: number; raf: number; last: number;
visible: boolean; entered: boolean;
};
const emptySim = (): Sim => ({
th: [], om: [], acc: [], ph: [], pv: [], s: [], sv: [], f: [], fv: [], ft: [],
dy: [], dv: [], delay: [], drag: -1, t0: 0, raf: 0, last: 0, visible: false, entered: false,
});
// ---------- decorative pieces ----------
function Barcode({ seed, className }: { seed: number; className?: string }) {
const r = seeded(seed);
const bars: Array<[number, number]> = [];
let x = 0;
while (x < 96) {
const w = 0.8 + Math.floor(r() * 3) * 0.9;
if (r() > 0.3) bars.push([x, w]);
x += w + 0.9 + r() * 1.2;
}
return (
<svg viewBox="0 0 100 20" preserveAspectRatio="none" aria-hidden="true" className={className}>
{bars.map(([bx, w], i) => (
<rect key={i} x={bx} y={0} width={w} height={20} fill="currentColor" />
))}
</svg>
);
}
function DotCode({ seed, className }: { seed: number; className?: string }) {
const r = seeded(seed);
const n = 13;
const cells: React.ReactNode[] = [];
const finder = (x: number, y: number) =>
(x < 4 && y < 4) || (x > n - 5 && y < 4) || (x < 4 && y > n - 5);
for (let y = 0; y < n; y++)
for (let x = 0; x < n; x++) {
if (finder(x, y)) continue;
if (r() > 0.52) cells.push(<rect key={`${x}-${y}`} x={x} y={y} width={0.86} height={0.86} rx={0.2} />);
}
const Finder = ({ x, y }: { x: number; y: number }) => (
<g>
<rect x={x} y={y} width={3.6} height={3.6} rx={0.8} fill="none" stroke="currentColor" strokeWidth={0.7} />
<rect x={x + 1.1} y={y + 1.1} width={1.4} height={1.4} rx={0.3} />
</g>
);
return (
<svg viewBox={`0 0 ${n} ${n}`} aria-hidden="true" className={className} fill="currentColor">
{cells}
<Finder x={0} y={0} />
<Finder x={n - 3.6} y={0} />
<Finder x={0} y={n - 3.6} />
</svg>
);
}
function FlipIcon({ className }: { className?: string }) {
return (
<svg viewBox="0 0 16 16" aria-hidden="true" className={className} fill="none" stroke="currentColor" strokeWidth={1.5} strokeLinecap="round" strokeLinejoin="round">
<path d="M2.5 8a5.5 5.5 0 0 1 9.4-3.9L13.5 5.6" />
<path d="M13.5 2.5v3.1h-3.1" />
<path d="M13.5 8a5.5 5.5 0 0 1-9.4 3.9L2.5 10.4" />
<path d="M2.5 13.5v-3.1h3.1" />
</svg>
);
}
// ---------- component ----------
function LanyardTeam({
members,
eyebrow,
title,
description,
event = "TEAM",
palette = DEFAULT_PALETTE,
breeze = true,
entrance = true,
labels: labelsProp,
className,
...rest
}: LanyardTeamProps) {
const labels = { ...DEFAULT_LABELS, ...labelsProp };
const count = members.length;
const uid = React.useId().replace(/[^a-zA-Z0-9_-]/g, "");
const stageRef = React.useRef<HTMLDivElement>(null);
const colEls = React.useRef<Array<HTMLDivElement | null>>([]);
const groupEls = React.useRef<Array<HTMLDivElement | null>>([]);
const strapEls = React.useRef<Array<HTMLDivElement | null>>([]);
const cardEls = React.useRef<Array<HTMLDivElement | null>>([]);
const innerEls = React.useRef<Array<HTMLDivElement | null>>([]);
const sheenEls = React.useRef<Array<HTMLDivElement | null>>([]);
const faceEls = React.useRef<Array<[HTMLDivElement | null, HTMLDivElement | null]>>([]);
const sim = React.useRef<Sim>(emptySim());
const pointer = React.useRef({ id: -1, index: -1, x: 0, y: 0, grab: 1, moved: false, lastT: 0, lastX: 0, lastY: 0 });
const [layout, setLayout] = React.useState({ colW: 200, cardW: 172, scroll: false, ready: false });
const [flipped, setFlipped] = React.useState<boolean[]>(() => members.map(() => false));
const [reduced, setReduced] = React.useState(false);
const cardH = Math.round(layout.cardW * 1.46);
const strapW = clamp(Math.round(layout.cardW * 0.085), 10, 16);
const lengths = React.useMemo(
() =>
members.map((m, i) => {
const h = hashString((m.id ?? m.name) + i);
return Math.round(layout.cardW * (0.42 + (h % 4) * 0.09));
}),
[members, layout.cardW],
);
const maxLen = lengths.length ? Math.max(...lengths) : 0;
const stageH = RAIL_Y + maxLen + cardH + 48;
// keep latest values for the animation loop
const live = React.useRef({ lengths, cardH, reduced, breeze, count });
live.current = { lengths, cardH, reduced, breeze, count };
React.useEffect(() => {
setFlipped((f) => members.map((_, i) => f[i] ?? false));
}, [members]);
// reduced motion
React.useEffect(() => {
const mq = window.matchMedia("(prefers-reduced-motion: reduce)");
const update = () => setReduced(mq.matches);
update();
mq.addEventListener("change", update);
return () => mq.removeEventListener("change", update);
}, []);
// measure
React.useEffect(() => {
const el = stageRef.current;
if (!el) return;
const measure = (width: number) => {
const minCol = 168;
const scroll = count * minCol > width;
const colW = scroll ? minCol : width / Math.max(1, count);
const cardW = Math.round(clamp(colW * 0.8, 132, 212));
setLayout((p) =>
p.ready && Math.abs(p.colW - colW) < 0.5 && p.cardW === cardW && p.scroll === scroll
? p
: { colW, cardW, scroll, ready: true },
);
};
measure(el.clientWidth);
const ro = new ResizeObserver((e) => e[0] && measure(e[0].contentRect.width));
ro.observe(el);
return () => ro.disconnect();
}, [count]);
// ---- render one badge from the sim ----
const paint = React.useCallback((i: number) => {
const S = sim.current;
const L = live.current.lengths[i] ?? 0;
const g = groupEls.current[i];
const st = strapEls.current[i];
const c = cardEls.current[i];
const inner = innerEls.current[i];
const sheen = sheenEls.current[i];
const th = S.th[i] ?? 0, ph = S.ph[i] ?? 0, s = S.s[i] ?? 1, f = S.f[i] ?? 0, dy = S.dy[i] ?? 0, om = S.om[i] ?? 0;
// CSS rotate() is clockwise; the physics angle is positive when the badge swings right
if (g) g.style.transform = `translate3d(0,${dy.toFixed(2)}px,0) rotate(${(-th).toFixed(4)}rad)`;
if (st) st.style.transform = `scaleY(${s.toFixed(4)})`;
if (c) c.style.transform = `translate3d(-50%,${((s - 1) * L).toFixed(2)}px,0) rotate(${(-ph).toFixed(4)}rad)`;
if (inner) inner.style.transform = `perspective(900px) rotateY(${(f * 180 + clamp(-om * 7, -22, 22)).toFixed(2)}deg)`;
if (sheen) sheen.style.transform = `translate3d(${(-(th + ph) * 140).toFixed(1)}%,0,0)`;
}, []);
const step = React.useCallback(
(now: number) => {
const S = sim.current;
const { lengths: Ls, reduced: red, breeze: br, count: n } = live.current;
const dt = S.last ? Math.min(1 / 30, (now - S.last) / 1000) : 1 / 60;
S.last = now;
const sub = 2;
const h = dt / sub;
const t = now / 1000;
let busy = false;
for (let k = 0; k < sub; k++) {
for (let i = 0; i < n; i++) {
const L = Math.max(40, Ls[i] ?? 120);
// swing (pendulum around the hook)
if (i !== S.drag) {
const wind = br ? 0.55 * Math.sin(t * 0.9 + i * 1.31) + 0.35 * Math.sin(t * 0.37 + i * 2.07) : 0;
const a = -(GRAVITY / L) * Math.sin(S.th[i]) - SWING_DAMP * S.om[i] + wind;
S.acc[i] = a;
S.om[i] += a * h;
S.th[i] = clamp(S.th[i] + S.om[i] * h, -MAX_ANGLE, MAX_ANGLE);
}
// card hinge at the clip lags behind the strap
const pa = -HINGE_K * S.ph[i] - HINGE_DAMP * S.pv[i] - S.acc[i] * 0.5;
S.pv[i] += pa * h;
S.ph[i] = clamp(S.ph[i] + S.pv[i] * h, -0.7, 0.7);
// strap stretch springs back
if (i !== S.drag) {
const sa = -STRETCH_K * (S.s[i] - 1) - STRETCH_DAMP * S.sv[i];
S.sv[i] += sa * h;
S.s[i] += S.sv[i] * h;
}
// flip
const fa = -FLIP_K * (S.f[i] - S.ft[i]) - FLIP_DAMP * S.fv[i];
S.fv[i] += fa * h;
S.f[i] += S.fv[i] * h;
// entrance drop
if (now - S.t0 > S.delay[i]) {
const da = -DROP_K * S.dy[i] - DROP_DAMP * S.dv[i];
S.dv[i] += da * h;
S.dy[i] += S.dv[i] * h;
}
}
}
for (let i = 0; i < n; i++) {
paint(i);
if (
Math.abs(S.om[i]) > 0.01 || Math.abs(S.th[i]) > 0.002 || Math.abs(S.pv[i]) > 0.01 ||
Math.abs(S.s[i] - 1) > 0.001 || Math.abs(S.f[i] - S.ft[i]) > 0.002 || Math.abs(S.fv[i]) > 0.01 ||
Math.abs(S.dy[i]) > 0.3 || Math.abs(S.dv[i]) > 0.3
)
busy = true;
}
if (S.drag >= 0) busy = true;
if (br && S.visible) busy = true;
if (busy && !red && S.visible) S.raf = requestAnimationFrame(step);
else S.raf = 0;
},
[paint],
);
const kick = React.useCallback(() => {
const S = sim.current;
if (live.current.reduced || S.raf || !S.visible) return;
S.last = 0;
S.raf = requestAnimationFrame(step);
}, [step]);
// (re)size sim arrays when members change
React.useEffect(() => {
const S = sim.current;
for (let i = 0; i < count; i++) {
S.th[i] ??= 0; S.om[i] ??= 0; S.acc[i] ??= 0; S.ph[i] ??= 0; S.pv[i] ??= 0;
S.s[i] ??= 1; S.sv[i] ??= 0; S.f[i] ??= 0; S.fv[i] ??= 0; S.ft[i] ??= 0;
S.dy[i] ??= 0; S.dv[i] ??= 0; S.delay[i] ??= 0;
}
for (const k of ["th", "om", "acc", "ph", "pv", "s", "sv", "f", "fv", "ft", "dy", "dv", "delay"] as const) S[k].length = count;
for (let i = 0; i < count; i++) paint(i);
}, [count, paint]);
// visibility + entrance
React.useEffect(() => {
const el = stageRef.current;
if (!el || !layout.ready) return;
const S = sim.current;
const io = new IntersectionObserver(
([e]) => {
S.visible = !!e?.isIntersecting;
if (!S.visible) return;
if (!S.entered) {
S.entered = true;
const showAll = () => groupEls.current.forEach((g) => g && (g.style.opacity = "1"));
if (entrance && !live.current.reduced) {
S.t0 = performance.now();
for (let i = 0; i < count; i++) {
S.dy[i] = -(RAIL_Y + (live.current.lengths[i] ?? 0) + live.current.cardH + 80);
S.dv[i] = 0;
S.delay[i] = 90 * i + (hashString(String(i)) % 60);
S.om[i] = (i % 2 ? 1 : -1) * (0.6 + (i % 3) * 0.25);
paint(i);
}
}
showAll();
}
kick();
},
{ threshold: 0.15 },
);
io.observe(el);
return () => {
io.disconnect();
cancelAnimationFrame(S.raf);
S.raf = 0;
};
}, [layout.ready, count, entrance, kick, paint]);
// repaint on layout / reduced changes
React.useEffect(() => {
const S = sim.current;
if (reduced) {
for (let i = 0; i < count; i++) {
S.th[i] = 0; S.om[i] = 0; S.ph[i] = 0; S.pv[i] = 0; S.s[i] = 1; S.sv[i] = 0;
S.f[i] = S.ft[i]; S.fv[i] = 0; S.dy[i] = 0; S.dv[i] = 0;
}
}
for (let i = 0; i < count; i++) paint(i);
kick();
}, [layout, reduced, count, paint, kick]);
// hidden face is inert (works in React 18 and 19)
React.useEffect(() => {
faceEls.current.forEach((pair, i) => {
const [front, back] = pair ?? [];
if (front) (front as HTMLElement & { inert: boolean }).inert = !!flipped[i];
if (back) (back as HTMLElement & { inert: boolean }).inert = !flipped[i];
});
}, [flipped]);
const toggleFlip = React.useCallback(
(i: number) => {
setFlipped((prev) => {
const next = [...prev];
next[i] = !prev[i];
const S = sim.current;
S.ft[i] = next[i] ? 1 : 0;
if (live.current.reduced) {
S.f[i] = S.ft[i];
paint(i);
} else {
S.om[i] += (i % 2 ? -1 : 1) * 1.4; // a little twist when it flips
kick();
}
return next;
});
},
[kick, paint],
);
const nudge = React.useCallback(
(i: number, dir: number) => {
sim.current.om[i] += dir * 2.2;
kick();
},
[kick],
);
// ---- pointer: drag, fling, brush ----
const anchorOf = (i: number) => {
const col = colEls.current[i];
if (!col) return null;
const r = col.getBoundingClientRect();
return { x: r.left + r.width / 2, y: r.top + RAIL_Y };
};
const onCardPointerDown = (i: number) => (e: React.PointerEvent<HTMLDivElement>) => {
if (e.button !== 0 || (e.target as HTMLElement).closest("a,button")) return;
const a = anchorOf(i);
if (!a) return;
const p = pointer.current;
p.id = e.pointerId;
p.index = i;
p.x = e.clientX;
p.lastX = e.clientX;
p.lastY = e.clientY;
p.lastT = performance.now();
p.moved = false;
p.grab = Math.max(40, Math.hypot(e.clientX - a.x, e.clientY - a.y));
e.currentTarget.setPointerCapture(e.pointerId);
};
const onCardPointerMove = (i: number) => (e: React.PointerEvent<HTMLDivElement>) => {
const p = pointer.current;
if (p.id !== e.pointerId || p.index !== i || live.current.reduced) return;
const S = sim.current;
if (!p.moved && Math.hypot(e.clientX - p.x, e.clientY - p.y) > 5) {
p.moved = true;
S.drag = i;
}
if (!p.moved) return;
const a = anchorOf(i);
if (!a) return;
const now = performance.now();
const dt = Math.max(8, now - p.lastT) / 1000;
const dx = e.clientX - a.x;
const dy = Math.max(8, e.clientY - a.y);
const th = clamp(Math.atan2(dx, dy), -MAX_ANGLE, MAX_ANGLE);
const prev = S.th[i];
S.th[i] = th;
S.om[i] = S.om[i] * 0.4 + ((th - prev) / dt) * 0.6;
S.s[i] = clamp(Math.hypot(dx, dy) / p.grab, 0.9, 1.22);
S.sv[i] = 0;
p.lastT = now;
p.lastX = e.clientX;
p.lastY = e.clientY;
kick();
};
const onCardPointerUp = (i: number) => (e: React.PointerEvent<HTMLDivElement>) => {
const p = pointer.current;
if (p.id !== e.pointerId) return;
const S = sim.current;
p.id = -1;
if (e.currentTarget.hasPointerCapture(e.pointerId)) e.currentTarget.releasePointerCapture(e.pointerId);
if (S.drag === i) {
S.drag = -1;
S.om[i] = clamp(S.om[i], -9, 9);
kick();
} else if (!p.moved && e.type === "pointerup") {
toggleFlip(i);
}
};
// brushing past a badge with the mouse pushes it
const brush = React.useRef({ x: 0, t: 0 });
const onStagePointerMove = (e: React.PointerEvent<HTMLDivElement>) => {
if (e.pointerType !== "mouse" || pointer.current.id >= 0 || live.current.reduced) return;
const now = performance.now();
const b = brush.current;
const vx = b.t ? (e.clientX - b.x) / Math.max(8, now - b.t) : 0; // px/ms
b.x = e.clientX;
b.t = now;
if (Math.abs(vx) < 0.05) return;
for (let i = 0; i < count; i++) {
const c = cardEls.current[i];
if (!c) continue;
const r = c.getBoundingClientRect();
if (e.clientX >= r.left && e.clientX <= r.right && e.clientY >= r.top && e.clientY <= r.bottom) {
const L = live.current.lengths[i] ?? 120;
sim.current.om[i] = clamp(sim.current.om[i] + vx * 0.9 * (150 / L), -6, 6);
kick();
}
}
};
return (
<section
{...rest}
data-slot="lanyard-team"
className={cx("relative w-full overflow-hidden bg-background text-foreground", className)}
>
{(eyebrow || title || description) && (
<header className="relative z-10 mx-auto flex max-w-2xl flex-col items-center gap-3 px-6 pt-14 text-center">
{eyebrow && (
<p className="text-[11px] font-medium uppercase tracking-[0.24em] text-muted-foreground rtl:tracking-normal">{eyebrow}</p>
)}
{title && <h2 className="text-balance text-3xl font-semibold tracking-tight sm:text-4xl">{title}</h2>}
{description && <p className="text-pretty text-sm leading-relaxed text-muted-foreground sm:text-base">{description}</p>}
</header>
)}
<div
ref={stageRef}
role="list"
aria-label={typeof title === "string" ? title : "Team"}
onPointerMove={onStagePointerMove}
className={cx(
"relative mt-6 w-full",
layout.scroll ? "snap-x snap-mandatory overflow-x-auto overflow-y-hidden [scrollbar-width:none]" : "overflow-visible",
)}
style={{ height: stageH }}
>
<div className="relative flex h-full" style={{ width: layout.scroll ? count * layout.colW : "100%" }}>
{/* ceiling rail */}
<div aria-hidden="true" className="pointer-events-none absolute inset-x-0" style={{ top: RAIL_Y - 4 }}>
<div className="h-[5px] w-full rounded-full bg-gradient-to-b from-foreground/20 via-foreground/10 to-foreground/25 shadow-[0_6px_14px_-6px_rgba(0,0,0,.35)]" />
</div>
{members.map((m, i) => {
const accent = m.accent ?? palette[i % palette.length] ?? DEFAULT_PALETTE[0];
const seed = hashString(m.id ?? m.name);
const number = m.badgeNumber ?? String(seed % 1000).padStart(3, "0");
const L = lengths[i] ?? 100;
const isFlipped = !!flipped[i];
const strapText = `${event} · ${event} · ${event} · ${event} · ${event} · `;
return (
<div
key={m.id ?? `${m.name}-${i}`}
role="listitem"
ref={(el) => {
colEls.current[i] = el;
}}
className="relative h-full shrink-0 snap-center"
style={{ width: layout.colW }}
>
{/* hook */}
<div
aria-hidden="true"
className="absolute left-1/2 size-[11px] -translate-x-1/2 rounded-full border-2 border-foreground/30 bg-background"
style={{ top: RAIL_Y - 7 }}
/>
{/* pendulum: strap + card rotate around the hook */}
<div
ref={(el) => {
groupEls.current[i] = el;
}}
className="absolute left-1/2 top-0 will-change-transform"
style={{
top: RAIL_Y,
width: 0,
height: L,
transformOrigin: "0 0",
opacity: entrance ? 0 : 1,
}}
>
{/* strap */}
<div
ref={(el) => {
strapEls.current[i] = el;
}}
aria-hidden="true"
className="absolute top-0 overflow-hidden rounded-b-[3px] shadow-[inset_1px_0_0_rgba(255,255,255,.18),inset_-1px_0_0_rgba(0,0,0,.18)]"
style={{ left: -strapW / 2, width: strapW, height: L, background: accent, transformOrigin: "50% 0" }}
>
<span
className="absolute left-1/2 top-1 -translate-x-1/2 whitespace-nowrap font-mono font-semibold uppercase text-white/75 [writing-mode:vertical-rl] rtl:font-sans rtl:!tracking-normal"
style={{ fontSize: Math.max(7, strapW * 0.62), letterSpacing: "0.18em" }}
>
{strapText}
</span>
</div>
{/* card, hinged at the clip */}
<div
ref={(el) => {
cardEls.current[i] = el;
}}
onPointerDown={onCardPointerDown(i)}
onPointerMove={onCardPointerMove(i)}
onPointerUp={onCardPointerUp(i)}
onPointerCancel={onCardPointerUp(i)}
className="absolute left-0 cursor-grab touch-pan-y select-none active:cursor-grabbing"
style={{
top: L,
width: layout.cardW,
height: cardH,
transformOrigin: "50% 0",
transform: "translate3d(-50%,0,0)",
fontSize: layout.cardW / 13.5,
}}
>
{/* clip */}
<svg
aria-hidden="true"
viewBox="0 0 40 34"
className="pointer-events-none absolute left-1/2 z-20 -translate-x-1/2 text-foreground/55"
style={{ top: -layout.cardW * 0.1, width: layout.cardW * 0.2 }}
>
<rect x="11" y="0" width="18" height="12" rx="3" fill="currentColor" />
<rect x="14" y="2.5" width="12" height="2" rx="1" fill="white" fillOpacity=".35" />
<path d="M15 11 L15 22 a5 5 0 0 0 10 0 L25 11" fill="none" stroke="currentColor" strokeWidth="2.6" />
</svg>
{/* drop shadow, stays flat */}
<div
aria-hidden="true"
className="pointer-events-none absolute inset-x-[8%] -bottom-3 h-6 rounded-[50%] bg-black/25 blur-md dark:bg-black/60"
/>
<div
ref={(el) => {
innerEls.current[i] = el;
}}
className="relative size-full [transform-style:preserve-3d]"
>
{/* FRONT */}
<div
ref={(el) => {
faceEls.current[i] = [el, faceEls.current[i]?.[1] ?? null];
}}
className="absolute inset-0 flex flex-col overflow-hidden rounded-[1.1em] bg-card text-card-foreground shadow-[0_18px_40px_-18px_rgba(0,0,0,.45)] ring-1 ring-black/5 [backface-visibility:hidden] dark:ring-white/10"
>
<div
className="relative h-[27%] shrink-0 px-[0.9em] pt-[1.5em] text-white"
style={{
background: `linear-gradient(135deg, ${accent}, color-mix(in oklab, ${accent} 72%, black))`,
}}
>
<div
aria-hidden="true"
className="absolute inset-0 opacity-25"
style={{
backgroundImage:
"repeating-linear-gradient(-45deg, rgba(255,255,255,.35) 0 1px, transparent 1px 7px)",
}}
/>
{/* slot punched for the clip */}
<div
aria-hidden="true"
className="absolute left-1/2 top-[0.55em] h-[0.42em] w-[26%] -translate-x-1/2 rounded-full bg-background shadow-[inset_0_1px_2px_rgba(0,0,0,.45)]"
/>
<div className="relative flex items-center justify-between gap-2 font-mono text-[0.55em] font-semibold uppercase tracking-[0.16em] rtl:font-sans rtl:tracking-normal">
<span className="truncate">{event}</span>
<span className="opacity-80">No. {number}</span>
</div>
</div>
<div className="relative -mt-[2.1em] flex flex-1 flex-col items-center px-[0.9em] text-center">
<div
className="grid size-[4.2em] place-items-center overflow-hidden rounded-[1em] text-[1em] font-semibold text-white ring-[0.2em] ring-card"
style={{ background: `linear-gradient(160deg, color-mix(in oklab, ${accent} 70%, white), ${accent})` }}
>
{m.avatar ? (
<img src={m.avatar} alt="" draggable={false} loading="lazy" className="size-full object-cover" />
) : (
<span aria-hidden="true">{initials(m.name)}</span>
)}
</div>
<p className="mt-[0.6em] line-clamp-1 text-[1.08em] font-semibold leading-tight tracking-tight">{m.name}</p>
<p className="mt-[0.2em] line-clamp-1 text-[0.72em] text-muted-foreground">{m.role}</p>
{m.location && (
<p className="mt-[0.5em] rounded-full border border-border px-[0.6em] py-[0.15em] text-[0.58em] text-muted-foreground">
{m.location}
</p>
)}
<div className="mt-auto flex w-full items-end justify-between gap-[0.5em] pb-[0.8em]">
<div className="flex min-w-0 flex-col items-start gap-[0.2em]">
<span className="font-mono text-[0.48em] uppercase tracking-[0.18em] text-muted-foreground rtl:font-sans rtl:tracking-normal">
{labels.access}
</span>
<Barcode seed={seed} className="h-[1.4em] w-[6.5em] text-foreground/80" />
</div>
<button
type="button"
onClick={() => toggleFlip(i)}
onKeyDown={(e) => {
if (e.key === "ArrowLeft") nudge(i, -1);
if (e.key === "ArrowRight") nudge(i, 1);
}}
aria-label={`${labels.flip}: ${m.name}`}
aria-pressed={isFlipped}
className="grid size-[1.9em] shrink-0 place-items-center rounded-full border border-border text-muted-foreground outline-none transition-colors hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring"
>
<FlipIcon className="size-[0.95em]" />
</button>
</div>
</div>
{/* laminate glare */}
<div aria-hidden="true" className="pointer-events-none absolute inset-0 overflow-hidden rounded-[inherit]">
<div
ref={(el) => {
sheenEls.current[i] = el;
}}
className="absolute inset-y-0 -left-1/2 w-[200%] mix-blend-soft-light"
style={{
background:
"linear-gradient(105deg, transparent 38%, rgba(255,255,255,.55) 48%, rgba(255,255,255,.1) 53%, transparent 62%)",
}}
/>
</div>
</div>
{/* BACK */}
<div
ref={(el) => {
faceEls.current[i] = [faceEls.current[i]?.[0] ?? null, el];
}}
className="absolute inset-0 flex flex-col overflow-hidden rounded-[1.1em] bg-card px-[0.9em] pb-[0.8em] pt-[1.5em] text-start text-card-foreground shadow-[0_18px_40px_-18px_rgba(0,0,0,.45)] ring-1 ring-black/5 [backface-visibility:hidden] [transform:rotateY(180deg)] dark:ring-white/10"
>
<div
aria-hidden="true"
className="absolute left-1/2 top-[0.55em] h-[0.42em] w-[26%] -translate-x-1/2 rounded-full bg-background shadow-[inset_0_1px_2px_rgba(0,0,0,.45)]"
/>
<div className="flex items-center justify-between gap-2">
<span className="font-mono text-[0.55em] font-semibold uppercase tracking-[0.16em] rtl:font-sans rtl:tracking-normal" style={{ color: accent }}>
{labels.about}
</span>
<span className="font-mono text-[0.5em] text-muted-foreground">No. {number}</span>
</div>
<p className="mt-[0.5em] text-[0.9em] font-semibold leading-tight">{m.name}</p>
{m.bio && <p className="mt-[0.45em] line-clamp-5 text-[0.64em] leading-relaxed text-muted-foreground">{m.bio}</p>}
{m.skills && m.skills.length > 0 && (
<ul className="mt-[0.6em] flex flex-wrap gap-[0.3em]">
{m.skills.slice(0, 4).map((s) => (
<li key={s} className="rounded-full bg-muted px-[0.55em] py-[0.15em] text-[0.55em] text-muted-foreground">
{s}
</li>
))}
</ul>
)}
<div className="mt-auto flex items-end justify-between gap-[0.5em]">
<div className="flex min-w-0 flex-col gap-[0.25em]">
{(m.links ?? []).slice(0, 3).map((l) => (
<a
key={l.href + l.label}
href={l.href}
target="_blank"
rel="noreferrer"
className="truncate text-[0.62em] font-medium underline-offset-2 outline-none hover:underline focus-visible:ring-2 focus-visible:ring-ring"
>
{l.label}
<svg aria-hidden="true" viewBox="0 0 12 12" className="ms-[0.2em] inline size-[0.8em] align-[-0.05em] rtl:-scale-x-100" fill="none" stroke="currentColor" strokeWidth={1.6} strokeLinecap="round"><path d="M3.5 8.5l5-5M4.5 3.5h4v4" /></svg>
</a>
))}
</div>
<div className="flex flex-col items-end gap-[0.4em]">
<DotCode seed={seed} className="size-[2.6em] text-foreground/80" />
<button
type="button"
onClick={() => toggleFlip(i)}
aria-label={`${labels.flipBack}: ${m.name}`}
className="grid size-[1.9em] place-items-center rounded-full border border-border text-muted-foreground outline-none transition-colors hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring"
>
<FlipIcon className="size-[0.95em]" />
</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
);
})}
</div>
</div>
<span id={`${uid}-hint`} className="sr-only">
Drag a badge to swing it, or use the flip button to read the back.
</span>
</section>
);
}
// ---------- Framer wrapper ----------
const SCOPE = "lanyard-team"
const CSS = "@supports (((-webkit-hyphens: none)) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color: rgb(from red r g b)))) {.lanyard-team *, .lanyard-team :before, .lanyard-team :after, .lanyard-team ::backdrop {--tw-translate-x: 0;--tw-translate-y: 0;--tw-translate-z: 0;--tw-rotate-x: initial;--tw-rotate-y: initial;--tw-rotate-z: initial;--tw-skew-x: initial;--tw-skew-y: initial;--tw-pan-x: initial;--tw-pan-y: initial;--tw-pinch-zoom: initial;--tw-scroll-snap-strictness: proximity;--tw-border-style: solid;--tw-gradient-position: initial;--tw-gradient-from: #0000;--tw-gradient-via: #0000;--tw-gradient-to: #0000;--tw-gradient-stops: initial;--tw-gradient-via-stops: initial;--tw-gradient-from-position: 0%;--tw-gradient-via-position: 50%;--tw-gradient-to-position: 100%;--tw-leading: initial;--tw-font-weight: initial;--tw-tracking: initial;--tw-shadow: 0 0 #0000;--tw-shadow-color: initial;--tw-shadow-alpha: 100%;--tw-inset-shadow: 0 0 #0000;--tw-inset-shadow-color: initial;--tw-inset-shadow-alpha: 100%;--tw-ring-color: initial;--tw-ring-shadow: 0 0 #0000;--tw-inset-ring-color: initial;--tw-inset-ring-shadow: 0 0 #0000;--tw-ring-inset: initial;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-offset-shadow: 0 0 #0000;--tw-blur: initial;--tw-brightness: initial;--tw-contrast: initial;--tw-grayscale: initial;--tw-hue-rotate: initial;--tw-invert: initial;--tw-opacity: initial;--tw-saturate: initial;--tw-sepia: initial;--tw-drop-shadow: initial;--tw-drop-shadow-color: initial;--tw-drop-shadow-alpha: 100%;--tw-drop-shadow-size: initial;--tw-scale-x: 1;--tw-scale-y: 1;--tw-scale-z: 1;}}.lanyard-team, .lanyard-team {--font-sans: ui-sans-serif, system-ui, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\";--font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace;--color-black: #000;--color-white: #fff;--spacing: .25rem;--container-2xl: 42rem;--text-sm: .875rem;--text-sm--line-height: calc(1.25 / .875);--text-base: 1rem;--text-base--line-height: calc(1.5 / 1);--text-3xl: 1.875rem;--text-3xl--line-height: calc(2.25 / 1.875);--text-4xl: 2.25rem;--text-4xl--line-height: calc(2.5 / 2.25);--font-weight-medium: 500;--font-weight-semibold: 600;--tracking-tight: -.025em;--tracking-normal: 0em;--leading-tight: 1.25;--leading-relaxed: 1.625;--blur-md: 12px;--default-transition-duration: .15s;--default-transition-timing-function: cubic-bezier(.4, 0, .2, 1);--default-font-family: var(--font-sans);--default-mono-font-family: var(--font-mono);}.lanyard-team *, .lanyard-team :after, .lanyard-team :before, .lanyard-team ::backdrop {box-sizing: border-box;border: 0 solid;margin: 0;padding: 0;}.lanyard-team ::file-selector-button {box-sizing: border-box;border: 0 solid;margin: 0;padding: 0;}.lanyard-team, .lanyard-team {-webkit-text-size-adjust: 100%;tab-size: 4;line-height: 1.5;font-family: var(--default-font-family, ui-sans-serif, system-ui, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\");font-feature-settings: var(--default-font-feature-settings, normal);font-variation-settings: var(--default-font-variation-settings, normal);-webkit-tap-highlight-color: transparent;}.lanyard-team hr {height: 0;color: inherit;border-top-width: 1px;}.lanyard-team abbr:where([title]) {-webkit-text-decoration: underline dotted;text-decoration: underline dotted;}.lanyard-team h1, .lanyard-team h2, .lanyard-team h3, .lanyard-team h4, .lanyard-team h5, .lanyard-team h6 {font-size: inherit;font-weight: inherit;}.lanyard-team a {color: inherit;-webkit-text-decoration: inherit;-webkit-text-decoration: inherit;text-decoration: inherit;}.lanyard-team b, .lanyard-team strong {font-weight: bolder;}.lanyard-team code, .lanyard-team kbd, .lanyard-team samp, .lanyard-team pre {font-family: var(--default-mono-font-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace);font-feature-settings: var(--default-mono-font-feature-settings, normal);font-variation-settings: var(--default-mono-font-variation-settings, normal);font-size: 1em;}.lanyard-team small {font-size: 80%;}.lanyard-team sub, .lanyard-team sup {vertical-align: baseline;font-size: 75%;line-height: 0;position: relative;}.lanyard-team sub {bottom: -.25em;}.lanyard-team sup {top: -.5em;}.lanyard-team table {text-indent: 0;border-color: inherit;border-collapse: collapse;}.lanyard-team :-moz-focusring {outline: auto;}.lanyard-team progress {vertical-align: baseline;}.lanyard-team summary {display: list-item;}.lanyard-team ol, .lanyard-team ul, .lanyard-team menu {list-style: none;}.lanyard-team img, .lanyard-team svg, .lanyard-team video, .lanyard-team canvas, .lanyard-team audio, .lanyard-team iframe, .lanyard-team embed, .lanyard-team object {vertical-align: middle;display: block;}.lanyard-team img, .lanyard-team video {max-width: 100%;height: auto;}.lanyard-team button, .lanyard-team input, .lanyard-team select, .lanyard-team optgroup, .lanyard-team textarea {font: inherit;font-feature-settings: inherit;font-variation-settings: inherit;letter-spacing: inherit;color: inherit;opacity: 1;background-color: #0000;border-radius: 0;}.lanyard-team ::file-selector-button {font: inherit;font-feature-settings: inherit;font-variation-settings: inherit;letter-spacing: inherit;color: inherit;opacity: 1;background-color: #0000;border-radius: 0;}.lanyard-team :where(select:is([multiple], [size])) optgroup {font-weight: bolder;}.lanyard-team :where(select:is([multiple], [size])) optgroup option {padding-inline-start: 20px;}.lanyard-team ::file-selector-button {margin-inline-end: 4px;}.lanyard-team ::placeholder {opacity: 1;}@supports (not ((-webkit-appearance: -apple-pay-button))) or (contain-intrinsic-size: 1px) {.lanyard-team ::placeholder {color: currentColor;}@supports (color: color-mix(in lab, red, red)) {.lanyard-team ::placeholder {color: color-mix(in oklab, currentcolor 50%, transparent);}}}.lanyard-team textarea {resize: vertical;}.lanyard-team ::-webkit-search-decoration {-webkit-appearance: none;}.lanyard-team ::-webkit-date-and-time-value {min-height: 1lh;text-align: inherit;}.lanyard-team ::-webkit-datetime-edit {display: inline-flex;}.lanyard-team ::-webkit-datetime-edit-fields-wrapper {padding: 0;}.lanyard-team ::-webkit-datetime-edit {padding-block: 0;}.lanyard-team ::-webkit-datetime-edit-year-field {padding-block: 0;}.lanyard-team ::-webkit-datetime-edit-month-field {padding-block: 0;}.lanyard-team ::-webkit-datetime-edit-day-field {padding-block: 0;}.lanyard-team ::-webkit-datetime-edit-hour-field {padding-block: 0;}.lanyard-team ::-webkit-datetime-edit-minute-field {padding-block: 0;}.lanyard-team ::-webkit-datetime-edit-second-field {padding-block: 0;}.lanyard-team ::-webkit-datetime-edit-millisecond-field {padding-block: 0;}.lanyard-team ::-webkit-datetime-edit-meridiem-field {padding-block: 0;}.lanyard-team :-moz-ui-invalid {box-shadow: none;}.lanyard-team button, .lanyard-team input:where([type=\"button\"], [type=\"reset\"], [type=\"submit\"]) {appearance: button;}.lanyard-team ::file-selector-button {appearance: button;}.lanyard-team ::-webkit-inner-spin-button {height: auto;}.lanyard-team ::-webkit-outer-spin-button {height: auto;}.lanyard-team [hidden]:where(:not([hidden=\"until-found\"])) {display: none !important;}.lanyard-team .pointer-events-none {pointer-events: none;}.lanyard-team .visible {visibility: visible;}.lanyard-team .sr-only {clip: rect(0, 0, 0, 0);white-space: nowrap;border-width: 0;width: 1px;height: 1px;margin: -1px;padding: 0;position: absolute;overflow: hidden;}.lanyard-team .absolute {position: absolute;}.lanyard-team .relative {position: relative;}.lanyard-team .inset-0 {inset: calc(var(--spacing) * 0);}.lanyard-team .inset-x-0 {inset-inline: calc(var(--spacing) * 0);}.lanyard-team .inset-x-\\[8\\%\\] {inset-inline: 8%;}.lanyard-team .inset-y-0 {inset-block: calc(var(--spacing) * 0);}.lanyard-team .top-0 {top: calc(var(--spacing) * 0);}.lanyard-team .top-1 {top: calc(var(--spacing) * 1);}.lanyard-team .top-\\[0\\.55em\\] {top: .55em;}.lanyard-team .-bottom-3 {bottom: calc(var(--spacing) * -3);}.lanyard-team .-left-1\\/2 {left: -50%;}.lanyard-team .left-0 {left: calc(var(--spacing) * 0);}.lanyard-team .left-1\\/2 {left: 50%;}.lanyard-team .z-10 {z-index: 10;}.lanyard-team .z-20 {z-index: 20;}.lanyard-team .mx-auto {margin-inline: auto;}.lanyard-team .ms-\\[0\\.2em\\] {margin-inline-start: .2em;}.lanyard-team .-mt-\\[2\\.1em\\] {margin-top: -2.1em;}.lanyard-team .mt-6 {margin-top: calc(var(--spacing) * 6);}.lanyard-team .mt-\\[0\\.2em\\] {margin-top: .2em;}.lanyard-team .mt-\\[0\\.5em\\] {margin-top: .5em;}.lanyard-team .mt-\\[0\\.6em\\] {margin-top: .6em;}.lanyard-team .mt-\\[0\\.45em\\] {margin-top: .45em;}.lanyard-team .mt-auto {margin-top: auto;}.lanyard-team .line-clamp-1 {-webkit-line-clamp: 1;-webkit-box-orient: vertical;display: -webkit-box;overflow: hidden;}.lanyard-team .line-clamp-5 {-webkit-line-clamp: 5;-webkit-box-orient: vertical;display: -webkit-box;overflow: hidden;}.lanyard-team .flex {display: flex;}.lanyard-team .grid {display: grid;}.lanyard-team .hidden {display: none;}.lanyard-team .inline {display: inline;}.lanyard-team .size-\\[0\\.8em\\] {width: .8em;height: .8em;}.lanyard-team .size-\\[0\\.95em\\] {width: .95em;height: .95em;}.lanyard-team .size-\\[1\\.9em\\] {width: 1.9em;height: 1.9em;}.lanyard-team .size-\\[2\\.6em\\] {width: 2.6em;height: 2.6em;}.lanyard-team .size-\\[4\\.2em\\] {width: 4.2em;height: 4.2em;}.lanyard-team .size-\\[11px\\] {width: 11px;height: 11px;}.lanyard-team .size-full {width: 100%;height: 100%;}.lanyard-team .h-6 {height: calc(var(--spacing) * 6);}.lanyard-team .h-\\[0\\.42em\\] {height: .42em;}.lanyard-team .h-\\[1\\.4em\\] {height: 1.4em;}.lanyard-team .h-\\[5px\\] {height: 5px;}.lanyard-team .h-\\[27\\%\\] {height: 27%;}.lanyard-team .h-full {height: 100%;}.lanyard-team .w-\\[6\\.5em\\] {width: 6.5em;}.lanyard-team .w-\\[26\\%\\] {width: 26%;}.lanyard-team .w-\\[200\\%\\] {width: 200%;}.lanyard-team .w-full {width: 100%;}.lanyard-team .max-w-2xl {max-width: var(--container-2xl);}.lanyard-team .min-w-0 {min-width: calc(var(--spacing) * 0);}.lanyard-team .flex-1 {flex: 1;}.lanyard-team .shrink-0 {flex-shrink: 0;}.lanyard-team .-translate-x-1\\/2 {--tw-translate-x: calc(calc(1 / 2 * 100%) * -1);translate: var(--tw-translate-x) var(--tw-translate-y);}.lanyard-team .\\[transform\\:rotateY\\(180deg\\)\\] {transform: rotateY(180deg);}.lanyard-team .transform {transform: var(--tw-rotate-x, ) var(--tw-rotate-y, ) var(--tw-rotate-z, ) var(--tw-skew-x, ) var(--tw-skew-y, );}.lanyard-team .cursor-grab {cursor: grab;}.lanyard-team .touch-pan-y {--tw-pan-y: pan-y;touch-action: var(--tw-pan-x, ) var(--tw-pan-y, ) var(--tw-pinch-zoom, );}.lanyard-team .snap-x {scroll-snap-type: x var(--tw-scroll-snap-strictness);}.lanyard-team .snap-mandatory {--tw-scroll-snap-strictness: mandatory;}.lanyard-team .snap-center {scroll-snap-align: center;}.lanyard-team .flex-col {flex-direction: column;}.lanyard-team .flex-wrap {flex-wrap: wrap;}.lanyard-team .place-items-center {place-items: center;}.lanyard-team .items-center {align-items: center;}.lanyard-team .items-end {align-items: flex-end;}.lanyard-team .items-start {align-items: flex-start;}.lanyard-team .justify-between {justify-content: space-between;}.lanyard-team .gap-2 {gap: calc(var(--spacing) * 2);}.lanyard-team .gap-3 {gap: calc(var(--spacing) * 3);}.lanyard-team .gap-\\[0\\.2em\\] {gap: .2em;}.lanyard-team .gap-\\[0\\.3em\\] {gap: .3em;}.lanyard-team .gap-\\[0\\.4em\\] {gap: .4em;}.lanyard-team .gap-\\[0\\.5em\\] {gap: .5em;}.lanyard-team .gap-\\[0\\.25em\\] {gap: .25em;}.lanyard-team .truncate {text-overflow: ellipsis;white-space: nowrap;overflow: hidden;}.lanyard-team .overflow-hidden {overflow: hidden;}.lanyard-team .overflow-visible {overflow: visible;}.lanyard-team .overflow-x-auto {overflow-x: auto;}.lanyard-team .overflow-y-hidden {overflow-y: hidden;}.lanyard-team .rounded-\\[1\\.1em\\] {border-radius: 1.1em;}.lanyard-team .rounded-\\[1em\\] {border-radius: 1em;}.lanyard-team .rounded-\\[50\\%\\] {border-radius: 50%;}.lanyard-team .rounded-\\[inherit\\] {border-radius: inherit;}.lanyard-team .rounded-full {border-radius: 3.40282e38px;}.lanyard-team .rounded-b-\\[3px\\] {border-bottom-right-radius: 3px;border-bottom-left-radius: 3px;}.lanyard-team .border {border-style: var(--tw-border-style);border-width: 1px;}.lanyard-team .border-2 {border-style: var(--tw-border-style);border-width: 2px;}.lanyard-team .border-border {border-color: var(--border);}.lanyard-team .border-foreground\\/30 {border-color: var(--foreground);}@supports (color: color-mix(in lab, red, red)) {.lanyard-team .border-foreground\\/30 {border-color: color-mix(in oklab, var(--foreground) 30%, transparent);}}.lanyard-team .bg-background {background-color: var(--background);}.lanyard-team .bg-black\\/25 {background-color: #00000040;}@supports (color: color-mix(in lab, red, red)) {.lanyard-team .bg-black\\/25 {background-color: color-mix(in oklab, var(--color-black) 25%, transparent);}}.lanyard-team .bg-card {background-color: var(--card);}.lanyard-team .bg-muted {background-color: var(--muted);}.lanyard-team .bg-gradient-to-b {--tw-gradient-position: to bottom in oklab;background-image: linear-gradient(var(--tw-gradient-stops));}.lanyard-team .from-foreground\\/20 {--tw-gradient-from: var(--foreground);}@supports (color: color-mix(in lab, red, red)) {.lanyard-team .from-foreground\\/20 {--tw-gradient-from: color-mix(in oklab, var(--foreground) 20%, transparent);}}.lanyard-team .from-foreground\\/20 {--tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position));}.lanyard-team .via-foreground\\/10 {--tw-gradient-via: var(--foreground);}@supports (color: color-mix(in lab, red, red)) {.lanyard-team .via-foreground\\/10 {--tw-gradient-via: color-mix(in oklab, var(--foreground) 10%, transparent);}}.lanyard-team .via-foreground\\/10 {--tw-gradient-via-stops: var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-via-stops);}.lanyard-team .to-foreground\\/25 {--tw-gradient-to: var(--foreground);}@supports (color: color-mix(in lab, red, red)) {.lanyard-team .to-foreground\\/25 {--tw-gradient-to: color-mix(in oklab, var(--foreground) 25%, transparent);}}.lanyard-team .to-foreground\\/25 {--tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position));}.lanyard-team .object-cover {object-fit: cover;}.lanyard-team .px-6 {padding-inline: calc(var(--spacing) * 6);}.lanyard-team .px-\\[0\\.6em\\] {padding-inline: .6em;}.lanyard-team .px-\\[0\\.9em\\] {padding-inline: .9em;}.lanyard-team .px-\\[0\\.55em\\] {padding-inline: .55em;}.lanyard-team .py-\\[0\\.15em\\] {padding-block: .15em;}.lanyard-team .pt-14 {padding-top: calc(var(--spacing) * 14);}.lanyard-team .pt-\\[1\\.5em\\] {padding-top: 1.5em;}.lanyard-team .pb-\\[0\\.8em\\] {padding-bottom: .8em;}.lanyard-team .text-center {text-align: center;}.lanyard-team .text-start {text-align: start;}.lanyard-team .align-\\[-0\\.05em\\] {vertical-align: -.05em;}.lanyard-team .font-mono {font-family: var(--font-mono);}.lanyard-team .text-3xl {font-size: var(--text-3xl);line-height: var(--tw-leading, var(--text-3xl--line-height));}.lanyard-team .text-sm {font-size: var(--text-sm);line-height: var(--tw-leading, var(--text-sm--line-height));}.lanyard-team .text-\\[0\\.5em\\] {font-size: .5em;}.lanyard-team .text-\\[0\\.9em\\] {font-size: .9em;}.lanyard-team .text-\\[0\\.48em\\] {font-size: .48em;}.lanyard-team .text-\\[0\\.55em\\] {font-size: .55em;}.lanyard-team .text-\\[0\\.58em\\] {font-size: .58em;}.lanyard-team .text-\\[0\\.62em\\] {font-size: .62em;}.lanyard-team .text-\\[0\\.64em\\] {font-size: .64em;}.lanyard-team .text-\\[0\\.72em\\] {font-size: .72em;}.lanyard-team .text-\\[1\\.08em\\] {font-size: 1.08em;}.lanyard-team .text-\\[1em\\] {font-size: 1em;}.lanyard-team .text-\\[11px\\] {font-size: 11px;}.lanyard-team .leading-relaxed {--tw-leading: var(--leading-relaxed);line-height: var(--leading-relaxed);}.lanyard-team .leading-tight {--tw-leading: var(--leading-tight);line-height: var(--leading-tight);}.lanyard-team .font-medium {--tw-font-weight: var(--font-weight-medium);font-weight: var(--font-weight-medium);}.lanyard-team .font-semibold {--tw-font-weight: var(--font-weight-semibold);font-weight: var(--font-weight-semibold);}.lanyard-team .tracking-\\[0\\.16em\\] {--tw-tracking: .16em;letter-spacing: .16em;}.lanyard-team .tracking-\\[0\\.18em\\] {--tw-tracking: .18em;letter-spacing: .18em;}.lanyard-team .tracking-\\[0\\.24em\\] {--tw-tracking: .24em;letter-spacing: .24em;}.lanyard-team .tracking-tight {--tw-tracking: var(--tracking-tight);letter-spacing: var(--tracking-tight);}.lanyard-team .text-balance {text-wrap: balance;}.lanyard-team .text-pretty {text-wrap: pretty;}.lanyard-team .whitespace-nowrap {white-space: nowrap;}.lanyard-team .text-card-foreground {color: var(--card-foreground);}.lanyard-team .text-foreground {color: var(--foreground);}.lanyard-team .text-foreground\\/55 {color: var(--foreground);}@supports (color: color-mix(in lab, red, red)) {.lanyard-team .text-foreground\\/55 {color: color-mix(in oklab, var(--foreground) 55%, transparent);}}.lanyard-team .text-foreground\\/80 {color: var(--foreground);}@supports (color: color-mix(in lab, red, red)) {.lanyard-team .text-foreground\\/80 {color: color-mix(in oklab, var(--foreground) 80%, transparent);}}.lanyard-team .text-muted-foreground {color: var(--muted-foreground);}.lanyard-team .text-white {color: var(--color-white);}.lanyard-team .text-white\\/75 {color: #ffffffbf;}@supports (color: color-mix(in lab, red, red)) {.lanyard-team .text-white\\/75 {color: color-mix(in oklab, var(--color-white) 75%, transparent);}}.lanyard-team .uppercase {text-transform: uppercase;}.lanyard-team .underline-offset-2 {text-underline-offset: 2px;}.lanyard-team .opacity-25 {opacity: .25;}.lanyard-team .opacity-80 {opacity: .8;}.lanyard-team .mix-blend-soft-light {mix-blend-mode: soft-light;}.lanyard-team .shadow-\\[0_6px_14px_-6px_rgba\\(0\\,0\\,0\\,\\.35\\)\\] {--tw-shadow: 0 6px 14px -6px var(--tw-shadow-color, #00000059);box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);}.lanyard-team .shadow-\\[0_18px_40px_-18px_rgba\\(0\\,0\\,0\\,\\.45\\)\\] {--tw-shadow: 0 18px 40px -18px var(--tw-shadow-color, #00000073);box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);}.lanyard-team .shadow-\\[inset_0_1px_2px_rgba\\(0\\,0\\,0\\,\\.45\\)\\] {--tw-shadow: inset 0 1px 2px var(--tw-shadow-color, #00000073);box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);}.lanyard-team .shadow-\\[inset_1px_0_0_rgba\\(255\\,255\\,255\\,\\.18\\)\\,inset_-1px_0_0_rgba\\(0\\,0\\,0\\,\\.18\\)\\] {--tw-shadow: inset 1px 0 0 var(--tw-shadow-color, #ffffff2e), inset -1px 0 0 var(--tw-shadow-color, #0000002e);box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);}.lanyard-team .ring-1 {--tw-ring-shadow: var(--tw-ring-inset, ) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);}.lanyard-team .ring-\\[0\\.2em\\] {--tw-ring-shadow: var(--tw-ring-inset, ) 0 0 0 calc(.2em + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);}.lanyard-team .ring-black\\/5 {--tw-ring-color: #0000000d;}@supports (color: color-mix(in lab, red, red)) {.lanyard-team .ring-black\\/5 {--tw-ring-color: color-mix(in oklab, var(--color-black) 5%, transparent);}}.lanyard-team .ring-card {--tw-ring-color: var(--card);}.lanyard-team .blur-md {--tw-blur: blur(var(--blur-md));filter: var(--tw-blur, ) var(--tw-brightness, ) var(--tw-contrast, ) var(--tw-grayscale, ) var(--tw-hue-rotate, ) var(--tw-invert, ) var(--tw-saturate, ) var(--tw-sepia, ) var(--tw-drop-shadow, );}.lanyard-team .transition-colors {transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to;transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));transition-duration: var(--tw-duration, var(--default-transition-duration));}.lanyard-team .will-change-transform {will-change: transform;}.lanyard-team .outline-none {--tw-outline-style: none;outline-style: none;}.lanyard-team .select-none {-webkit-user-select: none;user-select: none;}.lanyard-team .\\[backface-visibility\\:hidden\\] {backface-visibility: hidden;}.lanyard-team .\\[scrollbar-width\\:none\\] {scrollbar-width: none;}.lanyard-team .\\[transform-style\\:preserve-3d\\] {transform-style: preserve-3d;}.lanyard-team .\\[writing-mode\\:vertical-rl\\] {writing-mode: vertical-rl;}@media (hover: hover) {.lanyard-team .hover\\:text-foreground:hover {color: var(--foreground);}}@media (hover: hover) {.lanyard-team .hover\\:underline:hover {text-decoration-line: underline;}}.lanyard-team .focus-visible\\:ring-2:focus-visible {--tw-ring-shadow: var(--tw-ring-inset, ) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);}.lanyard-team .focus-visible\\:ring-ring:focus-visible {--tw-ring-color: var(--ring);}.lanyard-team .active\\:cursor-grabbing:active {cursor: grabbing;}@media (min-width: 40rem) {.lanyard-team .sm\\:text-4xl {font-size: var(--text-4xl);line-height: var(--tw-leading, var(--text-4xl--line-height));}}@media (min-width: 40rem) {.lanyard-team .sm\\:text-base {font-size: var(--text-base);line-height: var(--tw-leading, var(--text-base--line-height));}}.lanyard-team .rtl\\:-scale-x-100:where(:is(:lang(ae), :lang(ar), :lang(arc), :lang(bcc), :lang(bqi), :lang(ckb), :lang(dv), :lang(fa), :lang(glk), :lang(he), :lang(ku), :lang(mzn), :lang(nqo), :lang(pnb), :lang(ps), :lang(sd), :lang(ug), :lang(ur), :lang(yi)), [dir=\"rtl\"], [dir=\"rtl\"] *) {--tw-scale-x: calc(100% * -1);scale: var(--tw-scale-x) var(--tw-scale-y);}.lanyard-team .rtl\\:font-sans:where(:is(:lang(ae), :lang(ar), :lang(arc), :lang(bcc), :lang(bqi), :lang(ckb), :lang(dv), :lang(fa), :lang(glk), :lang(he), :lang(ku), :lang(mzn), :lang(nqo), :lang(pnb), :lang(ps), :lang(sd), :lang(ug), :lang(ur), :lang(yi)), [dir=\"rtl\"], [dir=\"rtl\"] *) {font-family: var(--font-sans);}.lanyard-team .rtl\\:\\!tracking-normal:where(:is(:lang(ae), :lang(ar), :lang(arc), :lang(bcc), :lang(bqi), :lang(ckb), :lang(dv), :lang(fa), :lang(glk), :lang(he), :lang(ku), :lang(mzn), :lang(nqo), :lang(pnb), :lang(ps), :lang(sd), :lang(ug), :lang(ur), :lang(yi)), [dir=\"rtl\"], [dir=\"rtl\"] *) {--tw-tracking: var(--tracking-normal) !important;letter-spacing: var(--tracking-normal) !important;}.lanyard-team .rtl\\:tracking-normal:where(:is(:lang(ae), :lang(ar), :lang(arc), :lang(bcc), :lang(bqi), :lang(ckb), :lang(dv), :lang(fa), :lang(glk), :lang(he), :lang(ku), :lang(mzn), :lang(nqo), :lang(pnb), :lang(ps), :lang(sd), :lang(ug), :lang(ur), :lang(yi)), [dir=\"rtl\"], [dir=\"rtl\"] *) {--tw-tracking: var(--tracking-normal);letter-spacing: var(--tracking-normal);}.lanyard-team .dark\\:bg-black\\/60:is(.dark *) {background-color: #0009;}@supports (color: color-mix(in lab, red, red)) {.lanyard-team .dark\\:bg-black\\/60:is(.dark *) {background-color: color-mix(in oklab, var(--color-black) 60%, transparent);}}.lanyard-team .dark\\:ring-white\\/10:is(.dark *) {--tw-ring-color: #ffffff1a;}@supports (color: color-mix(in lab, red, red)) {.lanyard-team .dark\\:ring-white\\/10:is(.dark *) {--tw-ring-color: color-mix(in oklab, var(--color-white) 10%, transparent);}}.lanyard-team {--radius: .625rem;--background: #fafafa;--foreground: #0a0a0a;--card: #fff;--card-foreground: #0a0a0a;--muted: #f5f5f5;--muted-foreground: #737373;--border: #e5e5e5;--ring: #a1a1a1;}@supports (color: lab(0% 0 0)) {.lanyard-team {--background: lab(98.26% 0 0);--foreground: lab(2.75381% 0 0);--card: lab(100% 0 0);--card-foreground: lab(2.75381% 0 0);--muted: lab(96.52% -.0000596046 0);--muted-foreground: lab(48.496% 0 0);--border: lab(90.952% -.0000596046 0);--ring: lab(66.128% -.0000298023 .0000119209);}}.lanyard-team.dark {--background: #0a0a0a;--foreground: #fafafa;--card: #171717;--card-foreground: #fafafa;--muted: #262626;--muted-foreground: #a1a1a1;--border: #ffffff1a;--ring: #737373;}@supports (color: lab(0% 0 0)) {.lanyard-team.dark {--background: lab(2.75381% 0 0);--foreground: lab(98.26% 0 0);--card: lab(7.78201% -.0000149012 0);--card-foreground: lab(98.26% 0 0);--muted: lab(15.204% 0 0);--muted-foreground: lab(66.128% -.0000298023 .0000119209);--border: lab(100% 0 0 / .1);--ring: lab(48.496% 0 0);}}@property --tw-translate-x {syntax: \"*\";inherits: false;initial-value: 0;}@property --tw-translate-y {syntax: \"*\";inherits: false;initial-value: 0;}@property --tw-translate-z {syntax: \"*\";inherits: false;initial-value: 0;}@property --tw-rotate-x {syntax: \"*\";inherits: false}@property --tw-rotate-y {syntax: \"*\";inherits: false}@property --tw-rotate-z {syntax: \"*\";inherits: false}@property --tw-skew-x {syntax: \"*\";inherits: false}@property --tw-skew-y {syntax: \"*\";inherits: false}@property --tw-pan-x {syntax: \"*\";inherits: false}@property --tw-pan-y {syntax: \"*\";inherits: false}@property --tw-pinch-zoom {syntax: \"*\";inherits: false}@property --tw-scroll-snap-strictness {syntax: \"*\";inherits: false;initial-value: proximity;}@property --tw-border-style {syntax: \"*\";inherits: false;initial-value: solid;}@property --tw-gradient-position {syntax: \"*\";inherits: false}@property --tw-gradient-from {syntax: \"<color>\";inherits: false;initial-value: #0000;}@property --tw-gradient-via {syntax: \"<color>\";inherits: false;initial-value: #0000;}@property --tw-gradient-to {syntax: \"<color>\";inherits: false;initial-value: #0000;}@property --tw-gradient-stops {syntax: \"*\";inherits: false}@property --tw-gradient-via-stops {syntax: \"*\";inherits: false}@property --tw-gradient-from-position {syntax: \"<length-percentage>\";inherits: false;initial-value: 0%;}@property --tw-gradient-via-position {syntax: \"<length-percentage>\";inherits: false;initial-value: 50%;}@property --tw-gradient-to-position {syntax: \"<length-percentage>\";inherits: false;initial-value: 100%;}@property --tw-leading {syntax: \"*\";inherits: false}@property --tw-font-weight {syntax: \"*\";inherits: false}@property --tw-tracking {syntax: \"*\";inherits: false}@property --tw-shadow {syntax: \"*\";inherits: false;initial-value: 0 0 #0000;}@property --tw-shadow-color {syntax: \"*\";inherits: false}@property --tw-shadow-alpha {syntax: \"<percentage>\";inherits: false;initial-value: 100%;}@property --tw-inset-shadow {syntax: \"*\";inherits: false;initial-value: 0 0 #0000;}@property --tw-inset-shadow-color {syntax: \"*\";inherits: false}@property --tw-inset-shadow-alpha {syntax: \"<percentage>\";inherits: false;initial-value: 100%;}@property --tw-ring-color {syntax: \"*\";inherits: false}@property --tw-ring-shadow {syntax: \"*\";inherits: false;initial-value: 0 0 #0000;}@property --tw-inset-ring-color {syntax: \"*\";inherits: false}@property --tw-inset-ring-shadow {syntax: \"*\";inherits: false;initial-value: 0 0 #0000;}@property --tw-ring-inset {syntax: \"*\";inherits: false}@property --tw-ring-offset-width {syntax: \"<length>\";inherits: false;initial-value: 0;}@property --tw-ring-offset-color {syntax: \"*\";inherits: false;initial-value: #fff;}@property --tw-ring-offset-shadow {syntax: \"*\";inherits: false;initial-value: 0 0 #0000;}@property --tw-blur {syntax: \"*\";inherits: false}@property --tw-brightness {syntax: \"*\";inherits: false}@property --tw-contrast {syntax: \"*\";inherits: false}@property --tw-grayscale {syntax: \"*\";inherits: false}@property --tw-hue-rotate {syntax: \"*\";inherits: false}@property --tw-invert {syntax: \"*\";inherits: false}@property --tw-opacity {syntax: \"*\";inherits: false}@property --tw-saturate {syntax: \"*\";inherits: false}@property --tw-sepia {syntax: \"*\";inherits: false}@property --tw-drop-shadow {syntax: \"*\";inherits: false}@property --tw-drop-shadow-color {syntax: \"*\";inherits: false}@property --tw-drop-shadow-alpha {syntax: \"<percentage>\";inherits: false;initial-value: 100%;}@property --tw-drop-shadow-size {syntax: \"*\";inherits: false}@property --tw-scale-x {syntax: \"*\";inherits: false;initial-value: 1;}@property --tw-scale-y {syntax: \"*\";inherits: false;initial-value: 1;}@property --tw-scale-z {syntax: \"*\";inherits: false;initial-value: 1;}"
const dicebear = (seed) =>
`https://api.dicebear.com/9.x/notionists/svg?seed=${encodeURIComponent(seed)}&backgroundType=solid&backgroundColor=transparent`
const DEMO_MEMBERS = [
{ name: "Lina Haddad", role: "Product Designer", location: "Casablanca", bio: "Turns messy flows into calm interfaces. Loves type, hates modals.", skills: ["Figma", "Design systems", "Motion"], links: [{ label: "Portfolio", href: "#" }] },
{ name: "Youssef Amrani", role: "Frontend Engineer", location: "Rabat", bio: "React, TypeScript and a soft spot for spring physics.", skills: ["React", "TypeScript", "Tailwind"], links: [{ label: "GitHub", href: "#" }] },
{ name: "Sara Benali", role: "Backend Engineer", location: "Marrakech", bio: "Ships APIs that stay boring at 3 a.m.", skills: ["Laravel", "MySQL", "Redis"], links: [{ label: "GitHub", href: "#" }] },
{ name: "Omar Tazi", role: "Automation Lead", location: "Tangier", bio: "If you do it twice, he builds an n8n workflow for it.", skills: ["n8n", "Webhooks", "APIs"], links: [{ label: "LinkedIn", href: "#" }] },
{ name: "Nadia Kettani", role: "Engineering Manager", location: "Remote", bio: "Keeps the team shipping and the standups short.", skills: ["Leadership", "Hiring", "Scrum"], links: [{ label: "LinkedIn", href: "#" }] },
]
const DEFAULTS = {
members: DEMO_MEMBERS,
eyebrow: "The crew",
title: "Meet the people behind the build",
description: "Grab a badge and give it a swing. Flip it to read the back.",
event: "SHIP WEEK 26",
breeze: true,
entrance: true,
illustratedAvatars: true,
theme: "light",
direction: "ltr",
labels: { flip: "Flip badge", flipBack: "Show front", about: "About", access: "All access" },
}
const imageSrc = (v) => (v && typeof v === "object" ? v.src : v) || undefined
/**
* Lanyard Team — by El Mehdi Sekrare
*
* @framerSupportedLayoutWidth any-prefer-fixed
* @framerSupportedLayoutHeight any
* @framerIntrinsicWidth 1200
* @framerIntrinsicHeight 760
*/
export default function LanyardTeamFramer(rawProps) {
const p = { ...DEFAULTS }
for (const k in rawProps) if (rawProps[k] !== undefined) p[k] = rawProps[k]
const members = React.useMemo(() => {
const list = p.members && p.members.length ? p.members : DEMO_MEMBERS
return list.map((m, i) => ({
id: `m-${i}`,
name: m.name || `Member ${i + 1}`,
role: m.role || "",
avatar: imageSrc(m.avatar) || (p.illustratedAvatars ? dicebear(m.name || String(i)) : undefined),
accent: m.accent || undefined,
location: m.location || undefined,
bio: m.bio || undefined,
skills: (m.skills || []).filter(Boolean),
links: (m.links || []).filter((l) => l && l.label && l.href),
}))
}, [p.members, p.illustratedAvatars])
return (
<>
<style>{CSS}</style>
<div
className={p.theme === "dark" ? `${SCOPE} dark` : SCOPE}
dir={p.direction}
style={{
...p.style,
width: "100%",
height: "100%",
display: "flex",
alignItems: "center",
background: p.background || "var(--background)",
color: "var(--foreground)",
overflow: "hidden",
}}
>
<LanyardTeam
key={members.length}
members={members}
eyebrow={p.eyebrow || undefined}
title={p.title || undefined}
description={p.description || undefined}
event={p.event}
breeze={p.breeze}
entrance={p.entrance}
labels={p.labels}
style={{ background: "transparent" }}
/>
</div>
</>
)
}
LanyardTeamFramer.defaultProps = DEFAULTS
addPropertyControls(LanyardTeamFramer, {
eyebrow: { type: ControlType.String, title: "Eyebrow", defaultValue: DEFAULTS.eyebrow },
title: { type: ControlType.String, title: "Title", displayTextArea: true, defaultValue: DEFAULTS.title },
description: { type: ControlType.String, title: "Description", displayTextArea: true, defaultValue: DEFAULTS.description },
event: { type: ControlType.String, title: "Strap text", defaultValue: DEFAULTS.event },
breeze: { type: ControlType.Boolean, title: "Idle sway", defaultValue: true },
entrance: { type: ControlType.Boolean, title: "Drop in", defaultValue: true },
theme: { type: ControlType.Enum, title: "Theme", options: ["light", "dark"], optionTitles: ["Light", "Dark"], displaySegmentedControl: true, defaultValue: "light" },
direction: { type: ControlType.Enum, title: "Direction", options: ["ltr", "rtl"], optionTitles: ["LTR", "RTL"], displaySegmentedControl: true, defaultValue: "ltr" },
background: { type: ControlType.Color, title: "Background", optional: true },
illustratedAvatars: { type: ControlType.Boolean, title: "Fallback avatars", enabledTitle: "Illustrated", disabledTitle: "Initials", defaultValue: true },
members: {
type: ControlType.Array,
title: "Members",
maxCount: 12,
defaultValue: DEMO_MEMBERS,
control: {
type: ControlType.Object,
controls: {
name: { type: ControlType.String, title: "Name" },
role: { type: ControlType.String, title: "Role" },
avatar: { type: ControlType.ResponsiveImage, title: "Photo" },
accent: { type: ControlType.Color, title: "Color", optional: true },
location: { type: ControlType.String, title: "Location" },
bio: { type: ControlType.String, title: "Bio", displayTextArea: true },
skills: { type: ControlType.Array, title: "Skills", maxCount: 4, control: { type: ControlType.String } },
links: {
type: ControlType.Array,
title: "Links",
maxCount: 3,
control: {
type: ControlType.Object,
controls: {
label: { type: ControlType.String, title: "Label", defaultValue: "LinkedIn" },
href: { type: ControlType.Link, title: "URL" },
},
},
},
},
},
},
labels: {
type: ControlType.Object,
title: "Labels",
controls: {
flip: { type: ControlType.String, title: "Flip", defaultValue: "Flip badge" },
flipBack: { type: ControlType.String, title: "Flip back", defaultValue: "Show front" },
about: { type: ControlType.String, title: "About", defaultValue: "About" },
access: { type: ControlType.String, title: "Access", defaultValue: "All access" },
},
},
})