Claude Skills
CollectionsCompareWorkflowsNominate
Sign inSign up
© 2026 Curated Agent Skills·Learn more about Agent Skills
Back to repository

mui-styling

verified

Material-UI styling approaches

View on GitHub

Marketplace

alphaagent-team

the-answerai/alphaagent-team

Plugin

aai-stack-material-ui

stack

Repository

the-answerai/alphaagent-team

plugins/aai-stack-material-ui/skills/mui-styling/SKILL.md

Last Verified

February 1, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/the-answerai/alphaagent-team/blob/main/plugins/aai-stack-material-ui/skills/mui-styling/SKILL.md -a claude-code --skill mui-styling

Installation paths:

Claude
.claude/skills/mui-styling/
Powered by add-skill CLI

Instructions

# Material-UI Styling Skill

Patterns for styling Material-UI components.

## sx Prop

### Basic Usage

```tsx
import { Box, Button, Typography } from '@mui/material'

// Shorthand properties
<Box
  sx={{
    m: 2,           // margin: theme.spacing(2)
    p: 1,           // padding: theme.spacing(1)
    px: 3,          // paddingX
    py: 2,          // paddingY
    mt: 4,          // marginTop
    bgcolor: 'primary.main',
    color: 'white',
  }}
>
  Content
</Box>

// Sizing
<Box
  sx={{
    width: 1/2,     // 50%
    width: 1,       // 100%
    width: 300,     // 300px
    height: '100vh',
    minWidth: 100,
    maxWidth: 500,
  }}
/>

// Display & Flexbox
<Box
  sx={{
    display: 'flex',
    flexDirection: 'column',
    alignItems: 'center',
    justifyContent: 'space-between',
    gap: 2,
  }}
/>
```

### Responsive Values

```tsx
<Box
  sx={{
    width: {
      xs: '100%',   // 0-600px
      sm: '50%',    // 600-900px
      md: '33%',    // 900-1200px
      lg: '25%',    // 1200-1536px
      xl: '20%',    // 1536px+
    },
    p: {
      xs: 1,
      sm: 2,
      md: 3,
    },
    display: {
      xs: 'none',
      md: 'block',
    },
  }}
/>
```

### Pseudo Selectors

```tsx
<Box
  sx={{
    '&:hover': {
      bgcolor: 'primary.light',
      cursor: 'pointer',
    },
    '&:active': {
      bgcolor: 'primary.dark',
    },
    '&:focus': {
      outline: '2px solid',
      outlineColor: 'primary.main',
    },
    '&::before': {
      content: '""',
      display: 'block',
    },
  }}
/>
```

### Nested Selectors

```tsx
<Box
  sx={{
    // Direct children
    '& > *': {
      mb: 2,
    },
    // Specific child elements
    '& .title': {
      fontWeight: 'bold',
    },
    // First/last child
    '& > *:first-of-type': {
      mt: 0,
    },
    '& > *:last-child': {
      mb: 0,
    },
  }}
/>
```

### Theme Access in sx

```tsx
<Box
  sx={(theme) => ({
    color: theme.palette.primary.main,
    [theme.breakpoints.up('md')]: {
      padding: theme.spacing(3

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
5922 chars