Templates

Brand Guidelines

An independent 17.9-second identity film with a geometric mark, sliding palette, kinetic type specimens, and original object photography.

Brand Guidelines preview, rendered with Remotion.

Source

components/kuchi/templates/brand-guidelines/assets.ts
// Original still-life photographs, hosted on the Kuchi media CDN.
// Original AI-generated still-life photographs; no source-video assets.
export const brandGuidelinesMedia = {
ceramics:
"https://kuchi-media.kalarislabs.com/components/templates/brand-guidelines-ceramics.jpg",
materials:
"https://kuchi-media.kalarislabs.com/components/templates/brand-guidelines-materials.jpg",
chair:
"https://kuchi-media.kalarislabs.com/components/templates/brand-guidelines-chair.jpg",
};
components/kuchi/templates/brand-guidelines/content.ts
import { brandGuidelinesMedia } from "./assets";
export const brandGuidelinesTheme = {
ink: "#242321",
accent: "#A64B38",
stone: "#D6CFC4",
paper: "#F5F1E9",
};
export const brandGuidelinesContent = {
brandName: "Form Study",
openingTagline: "Made with purpose.",
guidelinesLabel: "Brand guidelines",
collageTitle: "Objects for everyday living.",
collectionLabel: "Material studies / No. 01",
footer: "A fictional identity. Made to be yours.",
};
export const brandGuidelinesPhrases = [
"Material matters.",
"Keep it simple.",
"Find your form.",
"Quiet by design.",
"Make space.",
"Feel the texture.",
"Shape the everyday.",
"Made with purpose.",
];
export const brandGuidelinesClosingWords = ["Make", "Ideas", "Real."];
export type BrandGuidelinesContent = typeof brandGuidelinesContent;
export type BrandGuidelinesTheme = typeof brandGuidelinesTheme;
export type BrandGuidelinesPhotos = typeof brandGuidelinesMedia;
export type BrandGuidelinesProps = {
brandName?: string;
accentColor?: string;
content?: Partial<BrandGuidelinesContent>;
theme?: Partial<BrandGuidelinesTheme>;
/** Eight slots: two typed specimens, followed by six quick style cuts. */
phrases?: string[];
/** Three individually animated closing words. */
closingWords?: string[];
photos?: Partial<BrandGuidelinesPhotos>;
/** A transparent mark suitable for both light and dark backgrounds. */
logoSrc?: string;
audioSrc?: string;
volume?: number;
reducedMotion?: boolean;
};
function withDefaults<T extends Record<string, string>>(
defaults: T,
overrides?: Partial<T>,
): T {
return Object.fromEntries(
Object.entries(defaults).map(([key, value]) => [
key,
overrides?.[key]?.trim() || value,
]),
) as T;
}
export function resolveBrandGuidelinesProps(props: BrandGuidelinesProps) {
const content = withDefaults(brandGuidelinesContent, props.content);
const theme = withDefaults(brandGuidelinesTheme, props.theme);
if (props.brandName?.trim()) content.brandName = props.brandName.trim();
if (props.accentColor?.trim()) theme.accent = props.accentColor.trim();
return {
content,
theme,
phrases: brandGuidelinesPhrases.map(
(text, i) => props.phrases?.[i]?.trim() || text,
),
closingWords: brandGuidelinesClosingWords.map(
(text, i) => props.closingWords?.[i]?.trim() || text,
),
photos: withDefaults(brandGuidelinesMedia, props.photos),
logoSrc: props.logoSrc?.trim() || undefined,
reducedMotion: props.reducedMotion ?? false,
};
}
export type BrandGuidelinesScene = ReturnType<
typeof resolveBrandGuidelinesProps
>;
export type SceneProps = { scene: BrandGuidelinesScene; frame: number };
components/kuchi/templates/brand-guidelines/motion.ts
import { Easing, interpolate } from "remotion";
export const BRAND_GUIDELINES_FPS = 60;
export const BRAND_GUIDELINES_FRAMES = 1072;
export const BRAND_GUIDELINES_WIDTH = 1920;
export const BRAND_GUIDELINES_HEIGHT = 1080;
// Half-open intervals on the 60 fps picture clock. Overlap preserves the pushes.
export const brandGuidelinesTimeline = [
{ name: "Identity", from: 0, to: 118 },
{ name: "Palette", from: 118, to: 326 },
{ name: "Typography", from: 294, to: 806 },
{ name: "Object collage", from: 614, to: 806 },
{ name: "Closing identity", from: 806, to: 1072 },
] as const;
export const atFps = (referenceFrame: number, fps: number) =>
Math.round((referenceFrame / BRAND_GUIDELINES_FPS) * fps);
export const progress = (frame: number, from: number, to: number) =>
Math.max(0, Math.min(1, (frame - from) / (to - from)));
export function slide(frame: number, from: number, to: number) {
return interpolate(frame, [from, to], [0, 1], {
easing: Easing.bezier(0.65, 0, 0.25, 1),
extrapolateLeft: "clamp",
extrapolateRight: "clamp",
});
}
const segmenter = new Intl.Segmenter("en", { granularity: "grapheme" });
export const graphemes = (text: string) =>
Array.from(segmenter.segment(text), (part) => part.segment);
/** Reserve width against the complete phrase, not its currently typed prefix. */
export function fitSize(text: string, max: number, width: number) {
const units = graphemes(text).reduce((sum, char) => {
if (/\s/.test(char)) return sum + 0.29;
if (/[ilI.,'!|]/.test(char)) return sum + 0.29;
if (/[MW@%]/.test(char)) return sum + 0.96;
if ((char.codePointAt(0) ?? 0) > 0x024f) return sum + 1;
return sum + 0.62;
}, 0);
return Math.min(max, width / Math.max(1, units));
}
const quickCuts = [512, 538, 550, 562, 578, 594] as const;
/** Stateless typing and deletion: seeking directly to any frame is identical. */
export function specimenState(
frame: number,
phrases: string[],
reduced = false,
) {
let index = 0;
let visible = 0;
if (frame < 434) {
const text = graphemes(phrases[0]);
const reveal = progress(frame, 324, 380);
const erase = progress(frame, 395, 430);
visible = reduced
? frame < 422
? text.length
: 0
: Math.floor(text.length * (frame < 395 ? reveal : 1 - erase));
} else if (frame < 512) {
index = 1;
visible = reduced
? graphemes(phrases[1]).length
: Math.floor(graphemes(phrases[1]).length * progress(frame, 443, 493));
} else {
index = 2;
for (let i = 0; i < quickCuts.length; i++) {
if (frame >= quickCuts[i]) index = i + 2;
}
if (reduced) index = 7;
visible = graphemes(phrases[index]).length;
}
const chars = graphemes(phrases[index]);
return {
index,
fullText: phrases[index],
text: chars.slice(0, visible).join(""),
settledText: chars.slice(0, Math.max(0, visible - 3)).join(""),
activeText: chars.slice(Math.max(0, visible - 3), visible).join(""),
caret: !reduced && frame < 594,
};
}
components/kuchi/templates/brand-guidelines/ui.tsx
import type { CSSProperties } from "react";
import { Img, Interactive, useRemotionEnvironment } from "remotion";
import type { BrandGuidelinesScene } from "./content";
export function BrandImage({
src,
style,
}: {
src: string;
style: CSSProperties;
}) {
// Studio 4.0.513 can loop while registering nested, moving Img layers.
// Keep the preview static; exports and embedded Players retain Img's load gate.
const { isStudio, isRendering } = useRemotionEnvironment();
if (isStudio && !isRendering) {
// biome-ignore lint/performance/noImgElement: Studio-only workaround for nested media registration; exports use Remotion Img below.
return <img src={src} alt="" style={style} />;
}
return <Img src={src} style={style} />;
}
/** An original architectural monogram: a slab and two quarter-circle modules. */
export function FormStudyMark({
scene,
color,
size = 100,
}: {
scene: BrandGuidelinesScene;
color: string;
size?: number;
}) {
if (scene.logoSrc)
return (
<BrandImage
src={scene.logoSrc}
style={{ width: size, height: size, objectFit: "contain" }}
/>
);
return (
<svg
viewBox="0 0 100 100"
width={size}
height={size}
fill={color}
role="img"
aria-label={`${scene.content.brandName} mark`}
>
<rect x="9" y="7" width="25" height="86" />
<path d="M42 7h49v9c0 18-14 32-32 32H42Z" />
<path d="M42 56h36v5c0 17-13 30-30 30h-6Z" />
</svg>
);
}
export function Label({
children,
style,
}: {
children: React.ReactNode;
style?: CSSProperties;
}) {
return (
<Interactive.Div
name="Identity label"
style={{
fontFamily: '"Inter", sans-serif',
fontSize: 13,
fontWeight: 400,
lineHeight: 1.25,
...style,
}}
>
{children}
</Interactive.Div>
);
}
components/kuchi/templates/brand-guidelines/index.tsx
"use client";
import "@fontsource/manrope/400.css";
import "@fontsource/manrope/500.css";
import "@fontsource/manrope/800.css";
import "@fontsource/inter/400.css";
import "@fontsource/inter/300-italic.css";
import "@fontsource/inter/500-italic.css";
import { useMemo } from "react";
import {
AbsoluteFill,
Audio,
Sequence,
useCurrentFrame,
useVideoConfig,
} from "remotion";
import {
type BrandGuidelinesProps,
resolveBrandGuidelinesProps,
} from "./content";
import {
atFps,
BRAND_GUIDELINES_FPS,
BRAND_GUIDELINES_FRAMES,
BRAND_GUIDELINES_HEIGHT,
BRAND_GUIDELINES_WIDTH,
} from "./motion";
import { ClosingIdentity } from "./scenes/closing";
import { ObjectCollage } from "./scenes/collage";
import { Identity } from "./scenes/identity";
import { Palette } from "./scenes/palette";
import { Typography } from "./scenes/typography";
export type {
BrandGuidelinesContent,
BrandGuidelinesPhotos,
BrandGuidelinesProps,
BrandGuidelinesTheme,
} from "./content";
export {
brandGuidelinesContent,
brandGuidelinesPhrases,
brandGuidelinesTheme,
} from "./content";
export {
BRAND_GUIDELINES_FPS,
BRAND_GUIDELINES_FRAMES,
BRAND_GUIDELINES_HEIGHT,
BRAND_GUIDELINES_WIDTH,
brandGuidelinesTimeline,
} from "./motion";
export function BrandGuidelines(props: BrandGuidelinesProps) {
const currentFrame = useCurrentFrame();
const { fps, width, height } = useVideoConfig();
const frame = (currentFrame / fps) * BRAND_GUIDELINES_FPS;
const {
brandName,
accentColor,
content,
theme,
phrases,
closingWords,
photos,
logoSrc,
reducedMotion,
} = props;
const scene = useMemo(
() =>
resolveBrandGuidelinesProps({
brandName,
accentColor,
content,
theme,
phrases,
closingWords,
photos,
logoSrc,
reducedMotion,
}),
[
brandName,
accentColor,
content,
theme,
phrases,
closingWords,
photos,
logoSrc,
reducedMotion,
],
);
const scale = Math.min(width / 960, height / 540);
const at = (f: number) => atFps(f, fps);
return (
<AbsoluteFill
style={{
background: scene.theme.paper,
color: scene.theme.ink,
overflow: "hidden",
fontFamily: '"Manrope", sans-serif',
WebkitFontSmoothing: "antialiased",
}}
>
<div
style={{
position: "absolute",
width: 960,
height: 540,
left: (width - 960 * scale) / 2,
top: (height - 540 * scale) / 2,
scale,
transformOrigin: "0 0",
overflow: "hidden",
}}
>
<Sequence
name="Identity"
from={0}
durationInFrames={at(118)}
layout="none"
>
<Identity scene={scene} frame={frame} />
</Sequence>
<Sequence
name="Palette"
from={at(118)}
durationInFrames={at(326) - at(118)}
layout="none"
>
<Palette scene={scene} frame={frame} />
</Sequence>
<Sequence
name="Typography"
from={at(294)}
durationInFrames={at(806) - at(294)}
layout="none"
>
<Typography scene={scene} frame={frame} />
</Sequence>
<Sequence
name="Object collage"
from={at(614)}
durationInFrames={at(806) - at(614)}
layout="none"
>
<ObjectCollage scene={scene} frame={frame} />
</Sequence>
<Sequence
name="Closing identity"
from={at(806)}
durationInFrames={at(1072) - at(806)}
layout="none"
>
<ClosingIdentity scene={scene} frame={frame} />
</Sequence>
</div>
{props.audioSrc?.trim() ? (
<Audio
src={props.audioSrc}
volume={
Number.isFinite(props.volume)
? Math.max(0, Math.min(1, props.volume ?? 1))
: 1
}
/>
) : null}
</AbsoluteFill>
);
}
export const brandGuidelinesConfig = {
componentName: "BrandGuidelines",
importPath: "@/components/kuchi/templates/brand-guidelines",
controls: {
brandName: {
type: "text-content" as const,
default: "Form Study",
description: "Brand name across the identity posters and closing lockup",
},
accentColor: {
type: "color" as const,
default: "#A64B38",
description: "Mark, palette panel and active typography",
},
reducedMotion: {
type: "boolean" as const,
default: false,
description:
"Static layouts without typing, collage travel or tile flips",
},
},
durationInFrames: BRAND_GUIDELINES_FRAMES,
fps: BRAND_GUIDELINES_FPS,
compositionWidth: BRAND_GUIDELINES_WIDTH,
compositionHeight: BRAND_GUIDELINES_HEIGHT,
};
components/kuchi/templates/brand-guidelines/scenes/identity.tsx
import { AbsoluteFill, Interactive } from "remotion";
import type { SceneProps } from "../content";
import { fitSize, slide } from "../motion";
import { FormStudyMark } from "../ui";
export function Identity({ scene, frame }: SceneProps) {
const reveal = scene.reducedMotion ? 1 : slide(frame, 18, 33);
return (
<AbsoluteFill style={{ background: scene.theme.paper }}>
<Interactive.Div
name="Opening mark"
style={{ position: "absolute", left: 428, top: 185 }}
>
<FormStudyMark scene={scene} color={scene.theme.accent} size={104} />
</Interactive.Div>
<Interactive.Div
name="Opening tagline"
style={{
position: "absolute",
top: 321,
left: 100,
width: 760,
textAlign: "center",
fontSize: fitSize(scene.content.openingTagline, 32, 760),
fontWeight: 800,
letterSpacing: "-0.04em",
opacity: reveal,
translate: `0 ${10 * (1 - reveal)}px`,
}}
>
{scene.content.openingTagline}
</Interactive.Div>
</AbsoluteFill>
);
}
components/kuchi/templates/brand-guidelines/scenes/palette.tsx
import { AbsoluteFill } from "remotion";
import type { SceneProps } from "../content";
import { slide } from "../motion";
import { Label } from "../ui";
export function Palette({ scene, frame }: SceneProps) {
const { theme, reducedMotion } = scene;
const x = (start: number, end: number, to: number) =>
reducedMotion ? to : 960 + (to - 960) * slide(frame, start, end);
const accentX = x(166, 201, 422);
const panels = [
{ color: theme.accent, left: accentX, text: theme.paper },
{ color: theme.stone, left: x(211, 241, 566), text: theme.ink },
{ color: theme.paper, left: x(249, 279, 744), text: theme.ink },
];
return (
<AbsoluteFill
style={{
background: theme.ink,
translate: reducedMotion
? undefined
: `${-960 * slide(frame, 294, 326)}px 0`,
}}
>
<Label
style={{
position: "absolute",
left: accentX / 2,
top: 258,
translate: "-50% 0",
color: theme.paper,
fontSize: 16,
}}
>
{theme.ink.toUpperCase()}
</Label>
{panels.map((panel, i) => (
<div
key={i === 0 ? "accent" : i === 1 ? "stone" : "paper"}
style={{
position: "absolute",
top: 0,
bottom: 0,
left: panel.left,
width: 960,
background: panel.color,
color: panel.text,
}}
>
<Label
style={{ position: "absolute", left: 16, top: 258, fontSize: 16 }}
>
{panel.color.toUpperCase()}
</Label>
</div>
))}
</AbsoluteFill>
);
}
components/kuchi/templates/brand-guidelines/scenes/typography.tsx
import { AbsoluteFill, Interactive } from "remotion";
import { Caret } from "@/components/kuchi/type-caret";
import type { SceneProps } from "../content";
import { fitSize, progress, slide, specimenState } from "../motion";
import { Label } from "../ui";
const styles = [
{ fontFamily: "Manrope", fontWeight: 800, label: "Manrope / ExtraBold" },
{ fontFamily: "Manrope", fontWeight: 400, label: "Manrope / Regular" },
{
fontFamily: "Inter",
fontWeight: 500,
fontStyle: "italic",
label: "Inter / Medium Italic",
},
{
fontFamily: "Inter",
fontWeight: 300,
fontStyle: "italic",
label: "Inter / Light Italic",
},
{ fontFamily: "Manrope", fontWeight: 800, label: "Manrope / ExtraBold" },
{ fontFamily: "Manrope", fontWeight: 500, label: "Manrope / Medium" },
{
fontFamily: "Inter",
fontWeight: 500,
fontStyle: "italic",
label: "Inter / Medium Italic",
},
{ fontFamily: "Manrope", fontWeight: 800, label: "Manrope / ExtraBold" },
] as const;
export function Typography({ scene, frame }: SceneProps) {
const state = specimenState(frame, scene.phrases, scene.reducedMotion);
const spec = styles[state.index];
const fontSize = fitSize(state.fullText, 80, 850);
const guides = 1 - progress(frame, 600, 620);
return (
<AbsoluteFill
style={{
background: scene.theme.paper,
translate: scene.reducedMotion
? undefined
: `${960 * (1 - slide(frame, 294, 326))}px 0`,
}}
>
<div style={{ opacity: guides }}>
<Label
style={{
position: "absolute",
top: 195,
width: "100%",
textAlign: "center",
}}
>
{scene.content.guidelinesLabel}
</Label>
{[226, 268, 310].map((y) => (
<div
key={y}
style={{
position: "absolute",
left: 48,
right: 48,
top: y,
height: 1,
background: scene.theme.stone,
}}
/>
))}
<Label
style={{
position: "absolute",
top: 335,
width: "100%",
textAlign: "center",
}}
>
{spec.label}
</Label>
</div>
<Interactive.Div
name="Editable type specimen"
style={{
position: "absolute",
left: 48,
top: 216,
height: 104,
display: "flex",
alignItems: "center",
fontFamily: spec.fontFamily,
fontWeight: spec.fontWeight,
fontStyle: "fontStyle" in spec ? spec.fontStyle : "normal",
fontSize,
letterSpacing: "-0.055em",
lineHeight: 1.1,
whiteSpace: "nowrap",
filter:
!scene.reducedMotion && frame > 636
? `blur(${progress(frame, 636, 660) * 2}px)`
: undefined,
}}
>
<span>
{state.caret ? state.settledText : state.text}
{state.caret ? (
<span style={{ color: scene.theme.accent }}>
{state.activeText}
</span>
) : null}
</span>
{state.caret ? (
<Caret
height={88}
width={3}
radius={0}
marginLeft={5}
color={scene.theme.accent}
opacity={1}
/>
) : null}
</Interactive.Div>
</AbsoluteFill>
);
}
components/kuchi/templates/brand-guidelines/scenes/collage.tsx
import { useMemo } from "react";
import { AbsoluteFill } from "remotion";
import type { BrandGuidelinesScene, SceneProps } from "../content";
import { fitSize, slide } from "../motion";
import { BrandImage, FormStudyMark, Label } from "../ui";
type Plate = {
id: string;
kind: "ceramics" | "materials" | "chair" | "poster" | "mark" | "specimen";
x: number;
y: number;
width: number;
height: number;
velocity: number;
delay: number;
direction: number;
depth?: number;
};
// Coordinates at frame 710. Independent tracks continue beyond the cut.
const plates: Plate[] = [
{
id: "back-materials",
kind: "materials",
x: 35,
y: -135,
width: 245,
height: 190,
velocity: 1.15,
delay: 0,
direction: -1,
depth: 0.7,
},
{
id: "back-type",
kind: "specimen",
x: 645,
y: -145,
width: 260,
height: 205,
velocity: -1.1,
delay: 2,
direction: -1,
},
{
id: "back-chair",
kind: "chair",
x: 695,
y: 330,
width: 210,
height: 280,
velocity: -1.6,
delay: 6,
direction: 1,
},
{
id: "left-poster",
kind: "poster",
x: 23,
y: 88,
width: 252,
height: 178,
velocity: 1.15,
delay: 2,
direction: -1,
},
{
id: "right-materials",
kind: "materials",
x: 666,
y: 72,
width: 265,
height: 195,
velocity: -1.6,
delay: 3,
direction: 1,
},
{
id: "left-ceramics",
kind: "ceramics",
x: 62,
y: 280,
width: 266,
height: 340,
velocity: 1.15,
delay: 5,
direction: 1,
},
{
id: "upper-mark",
kind: "mark",
x: 317,
y: -118,
width: 260,
height: 193,
velocity: -1.05,
delay: 10,
direction: -1,
depth: 0.5,
},
{
id: "lower-type",
kind: "specimen",
x: 403,
y: 452,
width: 285,
height: 225,
velocity: -1.05,
delay: 7,
direction: 1,
},
{
id: "foreground-chair",
kind: "chair",
x: 290,
y: 86,
width: 276,
height: 362,
velocity: -1.05,
delay: 4,
direction: -1,
},
{
id: "foreground-mark",
kind: "mark",
x: 554,
y: 268,
width: 260,
height: 204,
velocity: -1.6,
delay: 9,
direction: 1,
},
];
function Poster({
scene,
kind,
}: {
scene: BrandGuidelinesScene;
kind: Plate["kind"];
}) {
const { theme, content } = scene;
if (kind === "mark")
return (
<AbsoluteFill
style={{
background: theme.ink,
color: theme.paper,
alignItems: "center",
justifyContent: "center",
}}
>
<FormStudyMark scene={scene} color={theme.paper} size={74} />
<Label
style={{ position: "absolute", bottom: 17, left: 18, fontSize: 10 }}
>
{content.brandName}
</Label>
</AbsoluteFill>
);
if (kind === "poster")
return (
<AbsoluteFill
style={{
background: theme.accent,
color: theme.paper,
padding: 19,
boxSizing: "border-box",
}}
>
<Label style={{ fontSize: 9 }}>{content.collectionLabel}</Label>
<div
style={{
marginTop: 17,
fontSize: fitSize(content.collageTitle, 32, 490),
lineHeight: 1.02,
letterSpacing: "-0.045em",
fontWeight: 500,
maxWidth: 200,
}}
>
{content.collageTitle}
</div>
<div style={{ position: "absolute", right: 16, bottom: 13 }}>
<FormStudyMark scene={scene} color={theme.paper} size={27} />
</div>
</AbsoluteFill>
);
return (
<AbsoluteFill
style={{
background: scene.theme.stone,
color: scene.theme.ink,
padding: 21,
boxSizing: "border-box",
}}
>
<div
style={{
fontSize: fitSize(content.brandName, 44, 238),
lineHeight: 1,
letterSpacing: "-0.06em",
fontWeight: 800,
}}
>
{content.brandName}
</div>
<div style={{ display: "flex", gap: 6, marginTop: 26 }}>
{Object.values(theme).map((color, i) => (
<div
key={["ink", "accent", "stone", "paper"][i]}
style={{
width: 45,
height: 45,
borderRadius: i === 1 ? "50%" : 0,
background: color,
}}
/>
))}
</div>
<Label style={{ position: "absolute", bottom: 20, fontSize: 10 }}>
{content.openingTagline}
</Label>
</AbsoluteFill>
);
}
export function ObjectCollage({ scene, frame }: SceneProps) {
// Photo/poster content changes with props, not with the camera or track positions.
const contents = useMemo(
() =>
plates.map((plate) => {
const kind = plate.kind;
return kind === "ceramics" ||
kind === "materials" ||
kind === "chair" ? (
<BrandImage
key={plate.id}
src={scene.photos[kind]}
style={{ width: "100%", height: "100%", objectFit: "cover" }}
/>
) : (
<Poster key={plate.id} scene={scene} kind={kind} />
);
}),
[scene],
);
return (
<AbsoluteFill
style={{
scale: scene.reducedMotion ? 1 : 1 + 0.045 * slide(frame, 640, 806),
}}
>
{plates.map((plate, index) => {
const enter = slide(frame, 614 + plate.delay, 642 + plate.delay);
const y = scene.reducedMotion
? plate.y
: plate.y +
(frame - 710) * plate.velocity +
(1 - enter) * 730 * plate.direction;
return (
<div
key={plate.id}
style={{
position: "absolute",
left: plate.x,
top: 0,
width: plate.width,
height: plate.height,
translate: `0 ${y}px`,
overflow: "hidden",
boxShadow: "0 8px 24px rgb(0 0 0 / 0.07)",
filter:
!scene.reducedMotion && plate.depth
? `blur(${plate.depth}px)`
: undefined,
}}
>
{contents[index]}
</div>
);
})}
</AbsoluteFill>
);
}
components/kuchi/templates/brand-guidelines/scenes/closing.tsx
import { AbsoluteFill, Interactive } from "remotion";
import type { SceneProps } from "../content";
import { fitSize, progress, slide } from "../motion";
import { FormStudyMark, Label } from "../ui";
export function ClosingIdentity({ scene, frame }: SceneProps) {
const { theme, reducedMotion, content } = scene;
const wordsOut = reducedMotion
? Number(frame >= 942)
: slide(frame, 930, 944);
const markIn = reducedMotion ? Number(frame >= 944) : slide(frame, 944, 959);
const nameOut = reducedMotion
? Number(frame >= 1000)
: slide(frame, 988, 1008);
return (
<AbsoluteFill style={{ background: theme.ink, color: theme.paper }}>
{frame < 944
? scene.closingWords.map((word, index) => {
const turn = slide(frame, 860 + index * 3, 883 + index * 3);
const bounce = reducedMotion
? 0
: Math.sin(
progress(frame, 806, 860) * Math.PI * 2 + index * 1.1,
) *
(1 - turn) *
17;
const blockWidth = index === 0 ? 94 : 50;
return (
<Interactive.Div
key={
index === 0
? "first-word"
: index === 1
? "second-word"
: "third-word"
}
name="Closing word tile"
style={{
position: "absolute",
top: 241,
left: 88 + index * 292,
width: 200,
height: 65,
textAlign: "center",
perspective: 600,
opacity: 1 - wordsOut,
translate: `0 ${bounce - 20 * wordsOut}px`,
}}
>
{!reducedMotion && turn < 0.5 ? (
<div
style={{
margin: "9px auto",
width: blockWidth,
height: 39,
background: theme.paper,
transform: `rotateX(${180 * turn}deg)`,
}}
/>
) : (
<div
style={{
fontSize: fitSize(word, 42, 196),
fontWeight: 800,
letterSpacing: "-0.05em",
lineHeight: 1.2,
transform: reducedMotion
? undefined
: `rotateX(${-180 * (1 - turn)}deg)`,
}}
>
{word}
</div>
)}
</Interactive.Div>
);
})
: null}
{frame >= 944 ? (
<Interactive.Div
name="Closing brand lockup"
style={{
position: "absolute",
left: 100,
width: 760,
top: 175,
height: 190,
opacity: markIn,
scale: reducedMotion ? 1 : 0.88 + 0.12 * markIn,
}}
>
<div style={{ position: "absolute", left: 333, top: 44 * nameOut }}>
<FormStudyMark scene={scene} color={theme.paper} size={94} />
</div>
<div
style={{
position: "absolute",
top: 113,
width: "100%",
textAlign: "center",
fontSize: fitSize(content.brandName, 40, 660),
fontWeight: 800,
letterSpacing: "-0.05em",
opacity: 1 - nameOut,
translate: `0 ${-12 * nameOut}px`,
}}
>
{content.brandName}
</div>
</Interactive.Div>
) : null}
<Label
style={{
position: "absolute",
bottom: 26,
left: 70,
right: 70,
textAlign: "center",
fontSize: 11,
color: theme.stone,
opacity: reducedMotion
? Number(frame >= 1008)
: slide(frame, 1006, 1024),
}}
>
{content.footer}
</Label>
</AbsoluteFill>
);
}