Loading source
Pulling the file list, source metadata, and syntax-aware rendering for this listing.
Source from repo
Living wiki of UI design patterns and best practices built with Fumadocs, Next.js, and Base UI components.
Files
Skill
Size
Entrypoint
Format
Open file
Syntax-highlighted preview of this file as included in the skill package.
rules/morphing-group-variants.md
1---2title: Shared Group for Rotational Variants3impact: HIGH4tags: morphing, group, rotation5---67## Shared Group for Rotational Variants89Icons that are rotational variants MUST share the same group and base lines.1011**Incorrect (different line definitions):**1213```ts14const arrowRight = { lines: [{ x1: 2, y1: 7, x2: 12, y2: 7 }, ...] };15const arrowDown = { lines: [{ x1: 7, y1: 2, x2: 7, y2: 12 }, ...] };16```1718**Correct (shared base lines):**1920```ts21const arrowLines: [IconLine, IconLine, IconLine] = [22{ x1: 2, y1: 7, x2: 12, y2: 7 },23{ x1: 7.5, y1: 2.5, x2: 12, y2: 7 },24{ x1: 7.5, y1: 11.5, x2: 12, y2: 7 },25];2627const icons = {28"arrow-right": { lines: arrowLines, rotation: 0, group: "arrow" },29"arrow-down": { lines: arrowLines, rotation: 90, group: "arrow" },30"arrow-left": { lines: arrowLines, rotation: 180, group: "arrow" },31"arrow-up": { lines: arrowLines, rotation: -90, group: "arrow" },32};33```34