responsive-design
Skill501 starsChanged 16 days agoApache-2.0View on GitHub
Responsive (mobile + desktop) layout workflow. Use whenever a UI change must work on both phones and desktops, when implementing Figma frames that have separate mobile and desktop variants, or when reviewing a change for mobile parity.
31 other projects use a version of this.
Adopted by
Most recently taken up by
- Above-the-Fold-Studio/designmd-skillstheir own version, first seen Nov 1, 2026
- smiling66652/workbuddy-skill-toolkitstheir own version, first seen Nov 1, 2026
- ryanschue/automated-product-engineertheir own version, first seen Nov 1, 2026
- eumateusalex/Template-OStheir own version, first seen Oct 20, 2026
- davidanthonyn/claude-skillstheir own version, first seen Oct 20, 2026
- itsyasirkhandev/skillstheir own version, first seen Oct 17, 2026
Used with
Projects with it also use visual-hierarchy, web-component-design and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
launchapp-devSkillvisual-hierarchy
Establish clear visual hierarchy through size, weight, color, spacing, and positioning.
Also in 3 projects that use this
Aver005Skillweb-component-design
Master React, Vue, and Svelte component patterns including CSS-in-JS, composition strategies, and reusable component architecture. Use when building UI component libraries, designing component APIs, or implementing frontend design systems.
Also in 3 projects that use this
CodeWithBehnamSkillaccessibility-compliance
Implement WCAG 2.2 compliant interfaces with mobile accessibility, inclusive design patterns, and assistive technology support. Use when auditing accessibility, implementing ARIA patterns, building for screen readers, or ensuring inclusive user experiences.
Also in 3 projects that use this
CodeWithBehnamSkillvisual-design-foundations
Apply typography, color theory, spacing systems, and iconography principles to create cohesive visual designs. Use when establishing design tokens, building style guides, or improving visual hierarchy and consistency.
Also in 3 projects that use this
wpankSkilldesign-system-patterns
Foundational design system architecture — token hierarchies, theming infrastructure, token pipelines, and governance. Use when creating design tokens, implementing theme switching, setting up Style Dictionary, or establishing multi-brand theming. Triggers on design tokens, theme provider, Style Dictionary, token pipeline, multi-brand theming, CSS custom properties architecture.
Also in 3 projects that use this
rastianSkillinteraction-design
Apply interaction design (IxD) principles and frameworks to product and service design work. Use this skill when designing or evaluating interaction flows, micro-interactions, feedback mechanisms, affordances, mental models, component states, response time, animation and transitions, error recovery, input validation, task flows, or navigation patterns. Core audiences: product designers, UX designers, UI designers, service designers, and interaction designers working on digital products and services. Trigger on: interaction flow, micro-interaction, affordance, feedback design, state design (hover/focus/error/loading/empty), response time, transition, animation, mental model, task flow, user flow, navigation design, interaction spec, handoff annotation, gesture, input validation, error state, loading state, empty state, system feedback, signifier, design review, interaction audit, IxD principles.
Also in 3 projects that use this
Other versions31 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 31
- Mindrally/skills★ 275same name
- sunflowermm/XRK-AGT★ 140same name
- nahid-sparktales/agent-dispatcher★ 59same name
- launchapp-dev/animus-cli★ 39same name
- MiladJoodi/skills★ 24same name
- DigitalExplorers/agent-skills★ 12same name
- wpank/ai★ 11same name
- lotfb86/web-design-skills★ 9same name
- itsyasirkhandev/skills★ 4same name
- HamzaSheikh768/Agents-Skills-Lap★ 3same name
21 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository59 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .cursor/rules/a11y.mdcCursor rule
- nx-generateSkill
- nx-importSkill
- nx-pluginsSkill
- nx-run-tasksSkill
- nx-workspaceSkill
- openspec-apply-changeSkill
- openspec-archive-changeSkill
- openspec-exploreSkill
- openspec-proposeSkill
- openspec-sync-specsSkill
- address-current-branch-reviewSkill
- api-designSkill
- celebration-scene-ideasSkill
- code-review-and-qualitySkill
- create-ticketSkill
- dep-scanSkill
- dep-triageSkill
- dial-docsSkill
- extract-to-libSkill
- figmaSkill
- fix-cve-backportSkill
- git-shipSkill
- i18n-stringsSkill
- lean-verificationSkill
- lib-themingSkill
- monitor-ciSkill
- openspec-apply-changeSkill
- openspec-archive-changeSkill
- openspec-exploreSkill
- openspec-proposeSkill
- openspec-sync-specsSkill
- proactive-security-monitorSkill
- refactoring-auditSkill
- chat-release-notesSkill
- security-monitor-triagerSkill
- snyk-jira-ingestSkill
- snyk-scan-stubSkill
- snyk-triageSkill
- ui-kit-reviewSkill
- nx-generateSkill
- nx-pluginsSkill
- nx-run-tasksSkill
- nx-workspaceSkill
- openspec-apply-changeSkill
- openspec-archive-changeSkill
- openspec-exploreSkill
- openspec-proposeSkill
- nx-generateSkill
- nx-importSkill
- nx-pluginsSkill
- nx-run-tasksSkill
- nx-workspaceSkill
- openspec-apply-changeSkill
- openspec-archive-changeSkill
- openspec-exploreSkill
- openspec-proposeSkill
The file
We split this skill into the rules it gives an agent
6 rules. 0 are common, 4 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 29 edited versions we read keep these.
4
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 53
Never call window.matchMedia directly inside components — go through the hook so the SSR fallback, listener cleanup, and breakpoint names …
- Distinctive: line 80
When implementing or modifying a component:
- Distinctive: line 94
When a Figma file has separate mobile and desktop frames:
- Distinctive: line 97
If the design provides only desktop, ask before deriving a mobile version.
- Distinctive: line 115
Scope = what the user specifies: If the user names a page or feature, check only that.
- Very specific: line 131
Run mcp__playwright__browser_evaluate to detect horizontal overflow:
“Common” is measured: kept by at least 6 in 10 of the 29 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Responsive design
Overview
The chat app must render correctly on mobile/tablet (≤1279px) and desktop (≥1280px). Desktop is the historical baseline — most existing code is desktop-only. Treat mobile-first as the authoring default for new and changed UI: write the base classes for the smallest supported viewport and add desktop overrides via desktop:.
Project breakpoints
Defined once in tools/tailwind/theme.css as Tailwind v4 custom variants, which every Tailwind build in the workspace (the app, every lib's published utilities, the overlay sandbox, Storybook) imports:
/* tools/tailwind/theme.css */
@custom-variant mobile (@media (max-width: 1279px)); /* ≤1279 px — phones and tablets */
@custom-variant desktop (@media (min-width: 1280px)); /* ≥1280 px — laptops and monitors */| Prefix | Range | When to use |
| (no prefix) | always | mobile-first base — smallest layout |
mobile: | ≤1279 px | overrides that apply only mobile/tablet |
desktop: | ≥1280 px | overrides that kick in on desktop |
desktop: is a min-width prefix — styles cascade upward to all wider viewports.
Do not use
small_tablet:,large_tablet:,large_desktop:— these prefixes are not in the config and Tailwind will silently ignore any class that uses them.Do not use
sm:/md:/lg:/xl:— Tailwind's default breakpoints still exist (they come with its default theme) but are out of scope for this project and should not be used.
Scoped menu and right-panel breakpoints
The existing layout boundary stays at 1280px. phone: (<768px), tablet: (768px <= width <1280px), and tablet-up: (>=768px) are approved only for menu presentation and bounded right overlays. Use useIsPhone for sheet versus anchored-menu decisions and useIsTablet for bounded overlays. Do not migrate navigation, conversation panels, forms, editors or page layout to these scoped hooks. Verify 767, 768, 1024, 1279 and 1280px, including an open surface crossing both boundaries.
When to use Tailwind prefixes vs. a JS hook
Default: Tailwind utility prefixes. They are SSR-safe, avoid first-paint flicker, and keep layout decisions in markup.
<aside className="hidden desktop:block">…</aside>
<button className="h-12 mobile:h-14">…</button>Escape hatch: useIsMobile from @epam/ai-dial-chat-shared. Reach for these only when:
- A component must mount entirely different subtrees per breakpoint (e.g. drawer vs. persistent sidebar) and a CSS-only
hidden/blockswap would still mount both - An effect or imperative handler needs to branch on viewport size (focus, autoplay, virtualisation row count)
- A third-party component accepts a prop that toggles its mobile layout
Never call window.matchMedia directly inside components — go through the hook so the SSR fallback, listener cleanup, and breakpoint names stay consistent.
Library Tailwind builds
No lib carries a Tailwind or PostCSS config. Each publishable lib's vite.config.mts lists createLibTailwindUtilities from tools/vite-lib-tailwind-utilities.mjs, which compiles the classes the lib's own src/** uses against tools/tailwind/theme.css and appends them to dist/index.css. apps/chat scans libs/*/src from its own entry (apps/chat/src/tailwind.css), so a lib class works in the app with no per-lib setup. A new lib that ships Tailwind classes only needs the plugin in its Vite config.
Why one shared theme matters
Libs build their CSS in isolation, and that CSS is what consumers may ultimately ship. A build that did not read the shared theme would:
- compile
mobile:/desktop:as unknown variants and silently drop them — responsive utilities authored in the lib disappear from the emitted CSS; - lose every project token (
bg-layer-base,text-primary, thecontrol-*family, shadows), so classes referencing them would emit nothing in any context that does not also run the host app's Tailwind pass over the lib's source.
Re-declaring the theme per lib would duplicate ~150 lines of tokens and drift the next time someone adds a colour. The shared file keeps a single source of truth.
Why this is allowed by @nx/enforce-module-boundaries
The Vite configs import tools/vite-lib-tailwind-utilities.mjs, and the theme is read from tools/tailwind/, outside any Nx project. The @nx/enforce-module-boundaries rule is scoped in eslint.config.mjs to source files only (**/src/**/*.{ts,tsx,js,jsx,…}). Project-root build configs (vite.config.mts, eslint.config.mjs) are workspace-level tooling, not application source code, so the boundary rule does not police them — which matches what that rule was designed to enforce.
This tooling exception does not weaken source-code isolation. Hand-authored files under libs/*/src
must still avoid host-owned integration knowledge (API/server-api/generated-client/auth/session/env/
feature flags/routing/storage/analytics/telemetry/SDKs/platform bridges/etc.) and receive app
behavior through props, callbacks, or resolved values. libs/chat-api-client/src/generated is the
generated OpenAPI-client exception.
Mobile-first authoring checklist
When implementing or modifying a component:
- Base classes describe the mobile layout — overrides target larger breakpoints
- Touch targets are at least 44×44 CSS px on mobile (use
mobile:to bump a desktop-sized control when needed) - No horizontal scroll at 360px width (test in DevTools device emulation)
- Long text wraps (
break-words/min-w-0on flex children) rather than overflowing - Modals, popovers, and dropdowns are reachable and dismissable on touch (no
:hover-only affordances) - Inputs use the correct
inputmode/typeso mobile keyboards show the right layout - Sticky and fixed elements account for mobile browser chrome (
dvh/svhovervhwhen relevant) - Conditional layouts that swap components use
useIsMobile, notwindow.innerWidthreads - If the change adds new strings, they fit at 360px without truncation in the supported locales
Figma alignment
When a Figma file has separate mobile and desktop frames:
- Fetch both frames in the design context call — never implement one without inspecting the other
- If the design provides only desktop, ask before deriving a mobile version; do not guess
- Map Figma's responsive frame sizes to the closest named breakpoint (375/390/768/820/900 →
mobile≤1279px, 1280+ →desktop) - Capture the divergences (drawer vs. sidebar, vertical vs. horizontal toolbar, hidden sections) before writing code; these drive whether you need the hook
Verification
For any responsive change:
- DevTools — exercise the feature at 360 and 900 (mobile/tablet) and 1280, 1920 (desktop)
- Touch — verify interactive elements work without hover (use the DevTools touch simulator)
- Unit tests — when a component branches on
useIsMobile, add a test per branch by mocking the hook - Lint / typecheck —
npm exec nx lint chat,npm exec nx test chatfor the projects you touched - Note in the PR which breakpoints were exercised; a "verified desktop only" change is incomplete
Running a responsiveness check with MCP Playwright
Only run this when the user explicitly asks ("check responsiveness", "verify mobile", "go over screens", etc.). Do not run it proactively after every UI change.
Scope = what the user specifies. If the user names a page or feature, check only that. If they say "current feature", limit scope to the components touched by the current branch. Do not audit the whole app unprompted.
The app at http://localhost:4207 requires Keycloak auth — the MCP browser must log in before screenshots are useful.
Setup
Playwright MCP is pre-configured in .mcp.json — no manual setup needed. It starts automatically with the project.
Audit workflow
- Navigate to
http://localhost:4207— the browser window opens visibly (Chrome, headed by default) - If redirected to Keycloak login, tell the user: "A Chrome window opened — please log in so I can proceed", then wait with
mcp__playwright__browser_wait_for(textGone: "Sign in to dial", time: 120) - Navigate to the specific page/feature the user asked about (or the one touched by the current branch)
- For each relevant viewport — 360 and 900 for mobile/tablet, 1280 and 1920 for desktop:
mcp__playwright__browser_resizeto set width × height- Screenshot the specific screen/component under review
- Run
mcp__playwright__browser_evaluateto detect horizontal overflow:[...document.querySelectorAll('*')] .filter( (el) => el.getBoundingClientRect().width > document.documentElement.clientWidth + 2, ) .map((el) => ({ tag: el.tagName, cls: el.className?.toString().slice(0, 60), w: Math.round(el.getBoundingClientRect().width), })) .slice(0, 10); - On mobile/tablet widths (≤1279), also check touch targets:
[...document.querySelectorAll('button,a,[role="button"]')] .filter((el) => { const r = el.getBoundingClientRect(); return r.width > 0 && (r.width < 44 || r.height < 44); }) .map((el) => ({ tag: el.tagName, text: el.textContent?.trim().slice(0, 30), w: Math.round(el.getBoundingClientRect().width), h: Math.round(el.getBoundingClientRect().height), })) .slice(0, 15);
- Check each screenshot visually using the Read tool (it renders images inline)
- Report findings grouped by viewport with screenshot paths
Key things to look for
- Horizontal scroll at 360px
- Text overflow / clipping
- Touch targets < 44×44px on mobile
- Sidebar visible on desktop but missing toggle on mobile
- Fixed/sticky elements obscuring content on small screens
- Modals fitting within the viewport
Anti-patterns
className={isMobile ? 'flex-col' : 'flex-row'}— useflex-col desktop:flex-rowinstead- Reading
window.innerWidthin render or effects — useuseIsMobile - Hiding mobile UI with
display:nonewhile still mounting heavy subtrees — branch with the hook - Authoring desktop-first and then trying to reset on
mobile:— invert it - Using
sm:/md:/lg:/xl:— they are not configured here - Using
small_tablet:,large_tablet:, orlarge_desktop:— these prefixes do not exist and are silently ignored by Tailwind - Adding
min-[820px]:arbitrary queries — use the named breakpoints in the root config instead - Implementing a Figma desktop frame without checking whether a mobile variant exists
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

