algorithmic-color-pale…
Derive a full UI palette from one or two brand colours — state variants, brand-tinted greys, semantic colours. Use when building…
Shadows and layering that lift elements above the surface. Use when designing cards, dropdowns, modals, tooltips or any floating element.
Claude Code
$ npx -y skills add dembrandt/dembrandt-skills --skill elevation-and-depth --agent claude-code
Codex
$ npx skills add dembrandt/dembrandt-skills --skill elevation-and-depth -a codex -y
Cursor
$ npx skills add dembrandt/dembrandt-skills --skill elevation-and-depth -a cursor -y
Gemini CLI
$ npx skills add dembrandt/dembrandt-skills --skill elevation-and-depth -a gemini-cli -y
GitHub Copilot
$ npx skills add dembrandt/dembrandt-skills --skill elevation-and-depth -a github-copilot -y
OpenCode
$ npx skills add dembrandt/dembrandt-skills --skill elevation-and-depth -a opencode -y
Windsurf
$ npx skills add dembrandt/dembrandt-skills --skill elevation-and-depth -a windsurf -y
name: elevation-and-depth
description: Shadows and layering that lift elements above the surface. Use when designing cards, dropdowns, modals, tooltips or any floating element.
metadata:
priority: 6
pathPatterns:
- "**/*.css"
- "**/*.scss"
- "**/tokens/**"
- "**/theme/**"
- "tailwind.config.*"
- "design-system/**"
- "components/**"
promptSignals:
phrases:
- "shadow"
- "elevation"
- "card"
- "border radius"
- "depth"
- "floating"
- "modal"
- "dropdown"
retrieval:
aliases:
- elevation
- box shadow
- card design
- depth hierarchy
- border radius
- floating elements
intents:
- make a card stand out
- design elevation system
- set up shadow tokens
- make hierarchy feel physical
- style a modal or dropdown
examples:
- make this card feel elevated
- set up a shadow scale for the design system
- what border radius should cards useElevation uses shadow and layering to communicate that an element sits above the base surface — giving UI a sense of physical depth. Combined with border-radius, it creates the tactile quality that makes cards graspable, modals clearly floating, and dropdowns feel like they've appeared on top of content.
Define a small set of elevation levels as tokens. Each level maps to a specific UI role.
| Level | Token | Shadow | Role | |---|---|---|---| | 0 | `--shadow-none` | none | Flat surface, inline elements | | 1 | `--shadow-xs` | `0 1px 2px rgba(0,0,0,0.06)` | Subtle card, table row hover | | 2 | `--shadow-sm` | `0 1px 3px rgba(0,0,0,0.10), 0 1px 2px rgba(0,0,0,0.06)` | Card, input focus ring area | | 3 | `--shadow-md` | `0 4px 6px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.06)` | Dropdown, popover | | 4 | `--shadow-lg` | `0 10px 15px rgba(0,0,0,0.08), 0 4px 6px rgba(0,0,0,0.05)` | Modal, dialog, side drawer | | 5 | `--shadow-xl` | `0 20px 25px rgba(0,0,0,0.08), 0 8px 10px rgba(0,0,0,0.04)` | Command palette, full-screen overlay |
Keep shadows subtle. Dark, heavy shadows feel dated and visually aggressive. Light, diffuse shadows feel modern and material.
A subtle shadow on a white surface can sometimes "wash out," making the edge of a card feel fuzzy or indistinct.
A card that shifts **background colour on hover** must have a defined edge — a border, shadow, or clear radius boundary. Without one, the shift has no shape and reads as a stray fill, not a highlighted card. **On a borderless, flat card, a background-change hover is forbidden** — use a border or a shadow (elevation) on hover instead.
Gradients can be used to bring "liveliness" to an interface and reinforce the sense of elevation.
Border-radius and shadow work together to define the character of a surface. The combination signals the element's role and the product's visual tone.
| Surface | Shadow | Border-Radius | Tone | |---|---|---|---| | Inline chip / tag | none | `--radius-full` (pill) | Flat, lightweight | | Card | `--shadow-sm` | `--radius-md` (8–12px) | Graspable, contained | | Dropdown / popover | `--shadow-md` | `--radius-md` (8px) | Floating, contextual | | Modal / dialog | `--shadow-lg` | `--radius-lg` (12–16px) | Prominent, focused | | Toast / notification | `--shadow-md` | `--radius-md` | Ephemeral, above content | | Button | none or `--shadow-xs` | **consistent across all buttons** — see below |
Do not run a heavy coloured border along one side of a rounded box. Borders miter: where the accent meets its neighbours the renderer cuts a diagonal seam, and the radius bends that seam into a curve, so the accent visibly narrows and peels away before the corner ends. A 4px edge on an 8px radius spends most of its length tapering. Give the accent its own filled element instead, a bar or a wash that the container's radius clips cleanly, or keep the box square where the accent runs. A fill has no miter and no taper.
**Button border-radius must not vary within a product.** All buttons — primary, secondary, destructive, ghost — use the same radius token. Varying radius between button types breaks visual consistency and implies a semantic difference that does not exist.
/* Correct: one radius for all buttons */
.btn { border-radius: var(--radius-button); }
/* Wrong: different radii for different button variants */
.btn-primary { border-radius: 8px; }
.btn-secondary { border-radius: 4px; } /* ← breaks consistency */The button radius token is a brand decision — set it once, apply it everywhere.
`text-shadow` can lift text off a background without changing colours — useful when contrast is marginal or text sits on a photograph, gradient, or complex background.
The effect must be impe
Enterprise UX secrets, now built into your AI agent. Your agent writes the component in seconds. It does not know the modal should be a drawer, or that the grey it picked fails contrast. These skills carry that judgment: what to do, and what breaks otherwise.
Derive a full UI palette from one or two brand colours — state variants, brand-tinted greys, semantic colours. Use when building…
Top bar, sidebar rail, app launcher, tenant and environment cue, status bar. Use when designing the persistent shell, a…
Product visuals must show the real product with real data. Use when building landing pages, hero sections, screenshots or demo…
Shape language across type, radius and icons carries brand personality. Use when starting a design system, picking icons or…
Rest, hover, active, focus, disabled and loading states, derived from the base colour. Use when designing buttons, links, inputs…
Rebuild a live web page 1:1 from measurement into Figma, Penpot or code, then verify it. Use when reproducing a page or checking…
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
Ask which skill or flow fits your situation. A router over the skills in this repo.