跳转到内容

GlobalStyles API

API documentation for the React GlobalStyles component. Learn about the available props, and the CSS API.

Import

import GlobalStyles from '@mui/material/GlobalStyles';
// 或
import { GlobalStyles } from '@mui/material';
You can learn about the difference by reading this guide on minimizing bundle size.

属性

Props of the 原生(Native) component are also available.

名称类型默认值描述
stylesfunc
| number
| object
| { __emotion_styles: any }
| string
| bool
The styles you want to apply globally.

The component cannot hold a ref.

Demos