360 Secure SkillHub
360 安全技能中心

material-ui-styling

该 Skill 是 Material UI v9 的样式选择参考,按 sx、styled、主题 components 覆盖、GlobalStyles/CssBaseline 的顺序给出适用场景与决策表,并附带完整指南和参考表;主要面向维护或生成 MUI 代码的开发者,不包含自动执行或代码修改能力。

分类:开发
mui
热度 0.00
最近更新 2026-10-21 12:43:57

安装

发给 Agent
帮我安装这个技能:npx secure-skills-cli add mui/material-ui/material-ui-styling
兼容性
通用兼容
联网要求
不联网
数据出网
数据不出本机
Metadata
name
material-ui-styling
description
Chooses the right Material UI styling approach (sx, styled, theme overrides, global CSS) from official MUI guidance. Use when styling @mui/material components, customizing themes, overriding slots, or comparing sx vs styled.
license
MIT
metadata
{"author":"mui","version":"1.0.0"}

Material UI styling

Agent skill for picking the correct styling layer in Material UI (narrowest scope first). SKILL.md is the entry and index; AGENTS.md is the full guide.

When to apply

  • Choosing among sx, styled(), theme components, or global CSS for a change
  • Overriding component slots or state safely
  • Comparing sx vs styled() semantics (spacing, theme shortcuts)

Sections in AGENTS.md (by priority)

Order Topic Scope
1 Quick decision Pick sx → styled → theme → global
2 sx prop One-off / local
3 styled() Reusable wrapper
4 createTheme({ components }) All instances
5 GlobalStyles / CssBaseline HTML baseline / globals
6 sx vs styled() table Foot-gun prevention

Full guide

Read AGENTS.md for the complete instructions, examples, and doc links.

Supplementary tables: reference.md.