MengTo / Skills
corner-diagonals
Apply diagonal-cut corners and chamfered edges to buttons, cards, panels, and container shells. Use when a design needs precise geometric framing, sci-fi UI surfaces, clipped-corner controls, or engineered sharp containers instead of rounded pills or plain rectangles.
Install
npx skills add https://github.com/MengTo/Skills --skill corner-diagonalsCorner Diagonals
Scope
- Apply only to buttons, cards, panels, and container shells.
- Use when surfaces need diagonal-cut corners or chamfered edges.
- Keep the hit area readable and usable even when the visual shape is clipped.
- Reuse the same corner logic across surfaces so it feels like a system.
Visual Target
- Diagonal cuts should feel engineered, sharp, and intentional.
- Cuts stay subtle and proportional to the component size.
- One or more corners can be chamfered, but the silhouette should still read quickly.
- Use diagonal corners as a repeated structural motif, not a one-off trick.
Cut Tokens
Core Shapes
Use clip-path: polygon(...) for true diagonal silhouettes.
Bordered Shell
For bordered surfaces, use an outer wrapper and inner surface with the same polygon.
Button Pattern
Secondary Button
Use a darker shell with diagonal outline treatment.
Recommended Patterns
- Primary buttons: clipped hex-like or chamfered rectangles with one consistent cut amount.
- Secondary buttons: dark shells with diagonal outline treatment and restrained hover fill.
- Cards and panels: thin framed containers with one or two diagonal corners.
- Large sections: diagonal-corner inner blocks nested inside straight outer frames for hierarchy.
- Mirrored pairings: top-left plus bottom-right, or top-right plus bottom-left.
Tuning Knobs
- Cut size:
6px-10pxfor small controls,12px-18pxfor cards,20px-32pxfor large panels. - Border treatment: use a thin stroke, gradient shell, or inset line to make the silhouette legible.
- Consistency: reuse the same polygon family across buttons and containers.
- Accent: reserve bright color for primary controls, hover borders, or focal states.
- Motion: brighten fills, reveal borders, or slide overlays; keep the shape stable.
Avoid
- Random cut sizes across similar components.
- Aggressive clipping that harms readability or makes the component feel broken.
- Mixing rounded pills and chamfered geometry without clear hierarchy.
- Clipping only the background while borders and hit areas stay rectangular.
- Flooding every diagonal surface with a bright accent color.
Quick Checks
- Border, background, and hit area follow the same diagonal geometry.
- Text still has comfortable horizontal padding after the cut.
- Buttons keep at least
44pxheight for touch targets. - Repeated components use the same
--cutscale. - Focus states remain visible around the clipped shape.