Skip to content

Short vertical cut-paper explainer reels, made by your coding agent. Nine Agent Skills plus a Remotion library. Works with Claude Code, OpenCode, Codex, Gemini CLI, Cursor, Copilot and more.

kit: document Slab/Card (top-left) vs Disc/Pill (center) anchoring

José Navesfeddf6f528fe
diff --git a/library/papercut/CATALOG.md b/library/papercut/CATALOG.md
index 8bb5737..36c2f4f 100644
--- a/library/papercut/CATALOG.md
+++ b/library/papercut/CATALOG.md
@@ -67,10 +67,10 @@ If a scene needs something the kit lacks, build it in your scene file. The lead
- `const GRAIN = staticFile('bg/grain.png');`
- `const PaperDefs: React.FC = () => (`: ---------- filters, mounted once at the root ----------
- `<Paper children: React.ReactNode; lift?: number; torn?: boolean; style?: React.CSSProperties>`: Paper wrapper for a whole prop: rough edge + drop shadow (light from the top-left).
-- `<Slab x: number; y: number; w: number; h: number; color: string; r?: number | string; shade?: string; shadeH?: number; hi?: string; hiH?: number; rot?: number; grain?: number; children?: React.ReactNode; style?: React.CSSProperties;>`: One cut piece of paper. `shade` adds a darker underside strip, `hi` a lighter top strip.
-- `<Disc x: number; y: number; d: number; color: string; shade?: string; children?: React.ReactNode; style?: React.CSSProperties>`
-- `<Pill x: number; y: number; text: string; bg?: string; color?: string; size?: number; rot?: number; center?: boolean>`: Pill label: bold sans caps.
-- `<Card x: number; y: number; w: number; h: number; lines?: number; rot?: number; color?: string; children?: React.ReactNode; seed?: string>`: Cream paper card with grey "text" bars.
+- `<Slab x: number; y: number; w: number; h: number; color: string; r?: number | string; shade?: string; shadeH?: number; hi?: string; hiH?: number; rot?: number; grain?: number; children?: React.ReactNode; style?: React.CSSProperties;>`: One cut piece of paper. (x, y) is the top-left corner. `shade` adds a darker underside strip, `hi` a lighter top strip.
+- `<Disc x: number; y: number; d: number; color: string; shade?: string; children?: React.ReactNode; style?: React.CSSProperties>`: Paper disc (circle). (x, y) is the center.
+- `<Pill x: number; y: number; text: string; bg?: string; color?: string; size?: number; rot?: number; center?: boolean>`: Pill label: bold sans caps. (x, y) is the center (unless center={false}).
+- `<Card x: number; y: number; w: number; h: number; lines?: number; rot?: number; color?: string; children?: React.ReactNode; seed?: string>`: Cream paper card with grey "text" bars. (x, y) is the top-left corner, like Slab.
- `<PopIn at: number; seed?: string; children: React.ReactNode; origin?: string; style?: React.CSSProperties>`: ---------- motion ----------
- `<SlideIn at: number; dx?: number; dy?: number; dur?: number; children: React.ReactNode>`
- `<Boil amp?: number; rot?: number; seed?: string; children: React.ReactNode>`: Stop-motion boil for screen-space paper overlays: hold 2 frames, then jump.
diff --git a/library/papercut/kit/paper/kit.tsx b/library/papercut/kit/paper/kit.tsx
index 62f26fc..ebe7ccc 100644
--- a/library/papercut/kit/paper/kit.tsx
+++ b/library/papercut/kit/paper/kit.tsx
@@ -32,7 +32,7 @@ export const Paper: React.FC<{children: React.ReactNode; lift?: number; torn?: b
</div>
);
-// One cut piece of paper. `shade` adds a darker underside strip, `hi` a lighter top strip.
+// One cut piece of paper. (x, y) is the top-left corner. `shade` adds a darker underside strip, `hi` a lighter top strip.
export const Slab: React.FC<{
x: number; y: number; w: number; h: number; color: string; r?: number | string;
shade?: string; shadeH?: number; hi?: string; hiH?: number; rot?: number; grain?: number;
@@ -49,11 +49,12 @@ export const Slab: React.FC<{
</div>
);
+// Paper disc (circle). (x, y) is the center.
export const Disc: React.FC<{x: number; y: number; d: number; color: string; shade?: string; children?: React.ReactNode; style?: React.CSSProperties}> = ({x, y, d, color, shade, children, style}) => (
<Slab x={x - d / 2} y={y - d / 2} w={d} h={d} r="50%" color={color} shade={shade} shadeH={0.28} style={style}>{children}</Slab>
);
-// Pill label: bold sans caps.
+// Pill label: bold sans caps. (x, y) is the center (unless center={false}).
export const Pill: React.FC<{x: number; y: number; text: string; bg?: string; color?: string; size?: number; rot?: number; center?: boolean}> = ({x, y, text, bg = C.ink, color = '#F3EEE6', size = 30, rot = 0, center = true}) => (
<div style={{
position: 'absolute', left: x, top: y, translate: center ? '-50% -50%' : undefined, rotate: `${rot}deg`, whiteSpace: 'nowrap',
@@ -64,7 +65,7 @@ export const Pill: React.FC<{x: number; y: number; text: string; bg?: string; co
}}>{text}</div>
);
-// Cream paper card with grey "text" bars.
+// Cream paper card with grey "text" bars. (x, y) is the top-left corner, like Slab.
export const Card: React.FC<{x: number; y: number; w: number; h: number; lines?: number; rot?: number; color?: string; children?: React.ReactNode; seed?: string}> = ({x, y, w, h, lines = 3, rot = 0, color = C.cream, children, seed = 'card'}) => (
<Slab x={x} y={y} w={w} h={h} color={color} r={3} rot={rot} shade={C.creamLo} shadeH={0.06}>
{Array.from({length: lines}).map((_, i) => (