material-ui
БесплатноБез исполняемых скриптовНе проверенMaterial UI (@mui/material) is a React component library that implements Google's Material Design, with ready-made buttons, forms, dialogs, tables, layout…
от TerminalSkills★ 221 звезда на GitHubОб этом скилле
Material UI — React components that implement Material Design
Overview
Material UI is MUI's open-source (MIT) React component library. It ships a large set of accessible components (Button, TextField, Autocomplete, Dialog, Table, Tabs, Drawer, Snackbar and more), layout helpers (Box, Stack, Grid, Container) and a theme object that controls palette, typography, spacing, breakpoints and per-component defaults. Styling runs through Emotion by default. The current major is v9 (released April 2026); v9 removed many props that older tutorials and AI models still suggest, so code must follow the v9 API.
Complex data components (Data Grid, Date Pickers, Charts) live in the separate MUI X packages, for example @mui/x-data-grid.
Instructions
Installation
npm install @mui/material @emotion/react @emotion/styled
npm install @mui/icons-material # optional: 2,100+ SVG Material Icons
npm install @fontsource/roboto # optional: default Roboto font
react and react-dom are peer dependencies. On React 18 or older, pin react-is to the same version as React (npm install [email protected] plus an overrides entry in package.json), otherwise prop-type checks can throw at runtime.
Add the viewport meta tag to the page head (MUI is mobile-first):
<meta name="viewport" content="initial-scale=1, width=device-width" />
For a Vite or other client-rendered app, wrap the root once:
// src/main.tsx
import { createRoot } from 'react-dom/client';
import { ThemeProvider, createTheme } from '@mui/material/styles';
import CssBaseline from '@mui/material/CssBaseline';
import '@fontsource/roboto/400.css';
import '@fontsource/roboto/500.css';
import App from './App';
const theme = createTheme({ palette: { primary: { main: '#0f766e' } } });
createRoot(document.getElementById('root')!).render(
<ThemeProvider theme={theme}>
<CssBaseline />
<App />
</ThemeProvider>,
);
Next.js App Router
npm install @mui/material-nextjs @emotion/cache
AppRouterCacheProvider collects Emotion styles on the server so they land in <head>. Import the entry that matches your Next.js major: v13-appRouter, v14-appRouter, v15-appRouter or v16-appRouter. The theme file needs 'use client' because createTheme output contains functions.
// src/theme.ts
'use client';
import { createTheme } from '@mui/material/styles';
// Lets <Button variant="dashed"> type-check (see the Theme section below)
declare module '@mui/material/Button' {
interface ButtonPropsVariantOverrides {
dashed: true;
}
}
const theme = createTheme({
cssVariables: { colorSchemeSelector: 'class' },
colorSchemes: {
light: { palette: { primary: { main: '#0f766e' }, secondary: { main: '#c2410c' } } },
dark: { palette: { primary: { main: '#2dd4bf' }, secondary: { main: '#fb923c' } } },
},
typography: { fontFamily: 'var(--font-inter)', button: { textTransform: 'none' } },
shape: { borderRadius: 10 },
components: {
MuiButton: {
defaultProps: { disableElevation: true },
styleOverrides: {
root: {
variants: [
{ props: { variant: 'dashed' }, style: { border: '2px dashed currentColor' } },
],
},
},
},
MuiTextField: { defaultProps: { size: 'small' } },
},
});
export default theme;
// src/app/layout.tsx
import type { ReactNode } from 'react';
import { Inter } from 'next/font/google';
import { AppRouterCacheProvider } from '@mui/material-nextjs/v16-appRouter';
import { ThemeProvider } from '@mui/material/styles';
import CssBaseline from '@mui/material/CssBaseline';
import InitColorSchemeScript from '@mui/material/InitColorSchemeScript';
import theme from '../theme';
const inter = Inter({ subsets: ['latin'], display: 'swap', variable: '--font-inter' });
export default function RootLayout({ children }: { children: ReactNode }) {
return (
<html lang="en" className={inter.variable} suppressHydrationWarning>
<body>
<InitColorSchemeScript attribute="class" />
<AppRouterCacheProvider>
<ThemeProvider theme={theme}>
<CssBaseline />
{children}
</ThemeProvider>
</AppRouterCacheProvider>
</body>
</html>
);
}
InitColorSchemeScript sets the saved mode class on <html> before paint, which prevents the light-to-dark flash; its attribute must match colorSchemeSelector, and suppressHydrationWarning silences the expected attribute mismatch. If Tailwind or CSS Modules must override MUI, pass options={{ enableCssLayer: true }} to AppRouterCacheProvider so MUI styles go into @layer mui.
Theme: palette, defaults and custom variants
Keep one createTheme call per app; the theme.ts above is the complete file. colorSchemes holds the light and dark palettes, typography and shape set global tokens, and the components key sets default props (defaultProps) and style o
Установить material-ui в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл material-ui?
Material UI (@mui/material) is a React component library that implements Google's Material Design, with ready-made buttons, forms, dialogs, tables, layout grids and a theming system. Use this skill to add MUI to a React or Next.js App Router project, build a brand theme with createTheme and ThemeProvider, style components with the sx prop, set up dark mode with CSS theme variables, or upgrade v5-v7 code to the current v9 API with the official codemods. Trigger phrases: "use Material UI", "set up MUI in Next.js", "MUI theme with our brand colors", "add dark mode toggle to MUI", "fix MUI InputProps error after upgrade".
Как установить скилл material-ui?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл material-ui запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic