Skip to main content
skill CX Codex

real-world-metaphors — Claude Code skill: UI patterns

Helps you pick between a card, carousel, drawer and accordion when designing components and navigation.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add dembrandt/dembrandt-skills --skill real-world-metaphors -a claude-code
Open on GitHub

What real-world-metaphors does

The skill walks through UI patterns borrowed from physical objects and says when each one fits. A card is a bounded piece of content you can pick up. A carousel is flipping through a stack. A drawer slides in from an edge without replacing the current view. Cards, carousels, drawers, accordions, tabs and tooltips each get their own section with usage conditions and warnings.

There are principles and a review checklist too. A card that does nothing on click is a false affordance, so a list is the better call. Mixing metaphors — a carousel inside a card inside a drawer — adds noise. Mobile-native gestures like swipe-to-dismiss feel wrong on desktop.

The skill activates on paths components/**, src/components/**, **/*.tsx, **/*.jsx, design-system/**, ui/** and on the words card, carousel, drawer, metaphor, gesture, swipe. Nothing extra to install.

What it helps with

  • choose between a card and a list for a set of similar items
  • build mobile navigation with a side drawer
  • decide whether a carousel suits a promo block
  • check whether one component mixes metaphors
  • separate tabs from hierarchical section navigation

Example prompts for the agent

  • Should this be a card or a plain list? Check the real-world-metaphors skill.
  • Design a settings drawer that keeps the main list visible
  • Review my carousel component for false affordances

How to install real-world-metaphors

1Skills CLI (Vercel)

npx skills add dembrandt/dembrandt-skills --skill real-world-metaphors -a claude-code

2Manually: put the files in place

~/.claude/skills/real-world-metaphors/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/real-world-metaphors/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about real-world-metaphors

How do I install real-world-metaphors in Claude?

Run npx skills add dembrandt/dembrandt-skills --skill real-world-metaphors -a claude-code. The skill lands at ~/.claude/skills/real-world-metaphors/SKILL.md.

What does real-world-metaphors do?

It covers UI patterns taken from the physical world: cards, carousels, drawers, accordions, tabs, tooltips. Each one comes with usage conditions and common mistakes.

What triggers the skill?

Paths components/**, src/components/**, **/*.tsx, **/*.jsx, design-system/**, ui/**, plus the words card, carousel, drawer, metaphor, gesture, swipe.

Source text

SKILL.md · MIT
---
name: real-world-metaphors
description: Cards, drawers, carousels and other patterns borrowed from the physical world. Use when designing layout patterns, gestures or navigation paradigms.
metadata:
  priority: 6
  pathPatterns:
    - "components/**"
    - "src/components/**"
    - "**/*.tsx"
    - "**/*.jsx"
    - "design-system/**"
    - "ui/**"
  promptSignals:
    phrases:
      - "card"
      - "carousel"
      - "drawer"
      - "metaphor"
      - "physical"
      - "skeuomorphic"
      - "gesture"
      - "swipe"
retrieval:
  aliases:
    - real world metaphors
    - skeuomorphism
    - physical ui patterns
    - card pattern
    - carousel
    - drawer navigation
  intents:
    - make ui feel intuitive
    - choose a layout pattern
    - design a card component
    - use familiar patterns
  examples:
    - should I use a card or a list here
    - make this feel more natural to interact with
    - which pattern fits this content best
---

# Real-World Metaphors in UI

UI patterns borrowed from the physical world reduce the learning curve because users already know how they work. A card feels like something you can pick up. A carousel feels like flipping through a stack. A drawer feels like it slides out from the side. These metaphors carry affordance — the user knows what to do before reading any instructions.

Use them deliberately, not decoratively.

## Common Metaphors and When to Use Them

### Card
A card is a bounded, self-contained unit of content — like a physical index card or a product on a shelf.

**Use when:**
- Content items are discrete and comparable (products, people, articles, tasks)
- Each item needs to be scanned quickly and potentially acted on
- Items benefit from a visual thumbnail, image, or icon

**Key properties:**
- Cards should be graspable: elevation (`--shadow-sm`), border-radius, and clear boundary
- All cards in a set should be the same width; height can vary with content
- One primary action per card — secondary actions appear on hover or inside a detail view
- Cards imply "I can pick this up and do something with it" — if nothing happens on click, use a list instead

### Carousel / Horizontal Scroll
A carousel borrows from the physical act of flipping through a stack or sliding items along a rail.

**Use when:**
- There are more items than fit the viewport and browsing is the primary mode
- Items have a natural visual order (steps, featured content, media)
- The user is expected to explore, not to find a specific item

**Caution:**
- Carousels hide content — important items should not live only inside a carousel
- Auto-advancing carousels reduce user control; prefer user-driven navigation
- On mobile, a horizontal scroll without explicit navigation dots feels more natural than arrows

### Drawer / Side Panel
A drawer slides in from an edge, like a physical desk drawer — it brings additional context without replacing the current view.

**Use when:**
- Secondary detail is needed without losing context of the main view
- Editing or configuring an item while keeping the list visible behind
- Mobile navigation patterns (hamburger menu opens a side drawer)

**Key properties:**
- The drawer should feel anchored to an edge — left for navigation, right for detail/settings
- Always provide a clear close action (× button and clicking outside)
- The content behind should dim slightly (overlay) to signal the drawer is a layer above

### Accordion
Like a physical folder that expands to reveal contents — collapses to save space, expands to show detail.

**Use when:**
- Content has a clear parent–child hierarchy
- Most users need only a few sections at a time
- Vertical space is constrained

### Tabs
Like physical divider tabs in a binder — select a tab to see its section.

**Use when:**
- Content is divided into mutually exclusive, peer-level sections
- The user switches between sections frequently
- All tabs are equally relevant to the same context

**Caution:** Tabs imply peer-level, equal-importance sections. Do not use tabs for hierarchical navigation (use breadcrumbs or sidebar instead).

### Tooltip
Like a sticky note attached to an object — appears on hover, provides brief additional context.

**Use when:**
- An icon or control needs a short label that would clutter the layout if always visible
- A term or value needs brief explanation in context

**Not a replacement for:** clear labels, inline help text, or documentation for complex features.

## Principles for Using Metaphors Well

1. **The metaphor should match the interaction** — a card that does nothing on click creates a false affordance
2. **Don't mix metaphors** — a carousel inside a card inside a drawer creates cognitive noise
3. **Mobile borrows different metaphors than desktop** — swipe-to-dismiss, bottom sheets, and pull-to-refresh are mobile-native; forcing them onto desktop feels wrong in both directions
4. **Elevation reinforces the metaphor** — a card without shadow doesn't feel graspable; a drawer without an overlay doesn't feel layered

## Review Checklist

- [ ] Does the chosen pattern match the physical metaphor users will intuit?
- [ ] Do cards have a clear primary action — not just decoration?
- [ ] Does the carousel or horizontal scroll have navigation affordance (dots, arrows, or partial next item visible)?
- [ ] Do drawers dim the background content to signal layering?
- [ ] Are physical metaphors consistent — the same pattern used for the same type of content throughout the product?

© dembrandt · MIT · dembrandt/dembrandt-skills

Similar skills

Everything for Design →

From the same set34

sticky-and-fixed-elements Decides what stays on screen while the user scrolls: sticky headers, bottom toolbars, floating action buttons, pinned table headers. CX Codex +1 855installs data-display-and-selection Guides the agent through data collections: view modes, row selection, mass actions, sorting, filters and search patterns. CX Codex +1 855installs notifications-and-recovery A skill for designing notifications and error states: toasts, inline errors, banners and recovery paths. Useful when you need feedback after an action. CX Codex +1 854installs ui-context-and-scope Defines rules for user orientation in deep navigation layouts: breadcrumbs, visual section borders, and persistent impersonation banners. CX Codex +1 842installs global-toolbar-controls Guides the layout and styling of language, currency, and unit selectors. It helps keep global controls accessible in the header or footer without cluttering primary navigation. CX Codex +1 834installs dembrandt Runs a UI/UX task through six ordered stages: brand, tokens, layout, components, polish, accessibility. Useful for a design review or a build from scratch. CX Codex +1 822installs layout-paradigms-and-consistency Selects screen paradigms like feeds, boards, tables, and split views to maintain layout consistency across app pages and marketing funnels. CX Codex +1 734installs operational-expert-tool-ui Sets interface rules for dispatch, warehouse and logistics tools: data density over breathing room, status visible at a glance. CX Codex +1 689installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor