
Mui
Apply Material-UI v7 component, sx, theme, and responsive layout patterns correctly while building React UIs.
Overview
mui is an agent skill for the Build phase that teaches Material-UI v7 React patterns for sx styling, components, themes, and responsive layouts.
Install
npx skills add https://github.com/davila7/claude-code-templates --skill muiWhat is this skill?
- Covers MUI v7 breaking changes versus v6 for migration work
- Documents sx prop styling, theme customization, and type-safe patterns
- Guides Box, Grid, Paper, Typography, Button, Card, Dialog, and related components
- Mobile-first responsive layouts via breakpoints, useTheme, and useMediaQuery
- Trigger-aligned help for sx prop, theme customization, and MUI Grid layout
- Material-UI v7 released March 2025
Adoption & trust: 808 installs on skills.sh; 27.8k GitHub stars; 3/3 security scanners passed (skills.sh audits).
What problem does it solve?
You are building or migrating a React UI with MUI v7 and need consistent, type-safe patterns instead of guessing sx, Grid, and theme APIs.
Who is it for?
React SaaS or admin UIs on MUI v7 where agents must style and lay out screens with library-native patterns.
Skip if: Non-React frontends, Tailwind-only stacks, or backend-only work with no MUI components.
When should I use this skill?
Styling with sx, working with MUI components, theme customization, responsive MUI layouts, or migrating from MUI v6.
What do I get? / Deliverables
Components and layouts follow MUI v7 best practices with correct sx, theme, breakpoint, and component usage for the task at hand.
- MUI v7-aligned component and layout code
- Theme and responsive breakpoint configuration guidance
Recommended Skills
Journey fit
How it compares
UI framework pattern guide for MUI v7—not a component generator or Figma-to-code pipeline.
Common Questions / FAQ
Who is mui for?
Solo builders and small teams shipping React apps with Material-UI v7 who want agent guidance on components, sx, and themes.
When should I use mui?
During Build frontend work when styling with sx, customizing themes, laying out Grid, migrating from v6, or using MUI hooks for responsive design.
Is mui safe to install?
Check the Security Audits panel on this Prism page; the skill is documentation-only patterns and does not by itself execute network or shell actions.
SKILL.md
READMESKILL.md - Mui
# MUI v7 Patterns Skill A comprehensive skill for working with Material-UI v7 components, styling, and best practices in React applications. ## Purpose This skill provides guidance and patterns for building React applications with Material-UI v7 (released March 2025). It covers component usage, the sx prop styling system, theme integration, responsive design, and MUI-specific utilities. MUI is one of the most popular React UI libraries, and v7 introduced several breaking changes from v6. This skill helps developers navigate these changes while following consistent, type-safe patterns. ## When to Use Use this skill when you are: - **Styling components with the sx prop** - Need guidance on MUI's styling approach - **Working with MUI components** - Using Box, Grid, Paper, Typography, Button, Card, Dialog, and other MUI components - **Customizing themes** - Setting up or modifying MUI themes - **Building responsive layouts** - Using MUI's breakpoint system for mobile-first design - **Using MUI utilities and hooks** - Working with useTheme, useMediaQuery, or custom MUI hooks - **Migrating from MUI v6** - Understanding v7 breaking changes **Trigger phrases:** - "style with sx prop" - "MUI component" - "Material-UI" - "theme customization" - "MUI responsive design" - "MUI Grid layout" ## How It Works 1. **Identify the MUI task** - Recognize when MUI patterns are relevant to the current work 2. **Apply appropriate patterns** - Use the correct styling approach based on component complexity 3. **Leverage theme tokens** - Use MUI's built-in theme values instead of hardcoded styles 4. **Ensure type safety** - Apply proper TypeScript types for sx props 5. **Build responsively** - Use MUI's breakpoint system for adaptive layouts ## Key Features ### MUI v7 Breaking Changes Awareness The skill includes guidance on v7-specific changes: - Deep imports no longer work (use package exports) - `onBackdropClick` removed from Modal (use `onClose` instead) - Standardized `slots` and `slotProps` pattern for all components - CSS layers support via `enableCssLayer` config (Tailwind v4 compatible) ### Styling Patterns Two approaches based on component complexity: - **Inline styles (< 100 lines)** - Define styles at component top - **Separate styles file (>= 100 lines)** - Create `ComponentName.styles.ts` ### Complete Component Coverage - Layout: Box, Paper, Container, Stack - Grid system: 12-column responsive grid - Typography: All variants with custom styling - Forms: TextField, validation, error states - Feedback: Dialog, Snackbar, Loading states - Navigation: Cards, Buttons, Icons ### Theme Integration - Direct theme value access in sx prop - useTheme hook for programmatic access - Callback syntax for complex theme-dependent styles ### Responsive Design - Mobile-first breakpoint system (xs, sm, md, lg, xl) - Responsive prop values for any CSS property - Conditional display based on screen size ## Usage Examples ### Basic Component with sx Prop ```typescript import { Box, Typography, Button, Paper } from '@mui/material'; import type { SxProps, Theme } from '@mui/material'; const styles: Record<string, SxProps<Theme>> = { container: { p: 2, display: 'flex', flexDirection: 'column', gap: 2, }, header: { mb: 3, fontSize: '1.5rem', fontWeight: 600, }, }; function MyComponent() { return ( <Paper sx={styles.container}> <Typography sx={styles.header}>Title</Typography> <Button variant="contained">Action</Button> </Paper> ); } ``` ### Responsive Layout ```typescript <Box sx={{ width: { xs: '100%', // 0-600px sm: '80%', // 600-900px md: '60%', // 900-1200px lg: '40%', // 1200px+ }, display: { xs: 'none', // Hidden on mobile md: 'block', // Visible on desktop }, }} > Responsive content </Box> ``` ### Grid System ```typescript import { Grid } from '@mui/material'; <Grid container spacing={3}> <Grid item xs={