index
int64
0
0
repo_id
stringlengths
16
181
file_path
stringlengths
28
270
content
stringlengths
1
11.6M
__index_level_0__
int64
0
10k
0
petrpan-code/mui/material-ui/docs/data/system
petrpan-code/mui/material-ui/docs/data/system/display/Inline.tsx
import * as React from 'react'; import Box from '@mui/material/Box'; export default function Inline() { return ( <div style={{ width: '100%' }}> <Box component="div" sx={{ display: 'inline', p: 1, m: 1, bgcolor: (theme) => (theme.palette.mode === 'dar...
3,800
0
petrpan-code/mui/material-ui/docs/data/system
petrpan-code/mui/material-ui/docs/data/system/display/Overflow.js
import * as React from 'react'; import Box from '@mui/material/Box'; export default function Overflow() { return ( <div style={{ width: 200, whiteSpace: 'nowrap' }}> <Box component="div" sx={{ overflow: 'hidden', my: 2, p: 1, bgcolor: (theme) => ...
3,801
0
petrpan-code/mui/material-ui/docs/data/system
petrpan-code/mui/material-ui/docs/data/system/display/Overflow.tsx
import * as React from 'react'; import Box from '@mui/material/Box'; export default function Overflow() { return ( <div style={{ width: 200, whiteSpace: 'nowrap' }}> <Box component="div" sx={{ overflow: 'hidden', my: 2, p: 1, bgcolor: (theme) => ...
3,802
0
petrpan-code/mui/material-ui/docs/data/system
petrpan-code/mui/material-ui/docs/data/system/display/Print.js
import * as React from 'react'; import Box from '@mui/material/Box'; export default function Print() { return ( <div style={{ width: '100%' }}> <Box sx={{ display: 'block', displayPrint: 'none', m: 1, fontSize: '0.875rem', fontWeight: '700', ...
3,803
0
petrpan-code/mui/material-ui/docs/data/system
petrpan-code/mui/material-ui/docs/data/system/display/Print.tsx
import * as React from 'react'; import Box from '@mui/material/Box'; export default function Print() { return ( <div style={{ width: '100%' }}> <Box sx={{ display: 'block', displayPrint: 'none', m: 1, fontSize: '0.875rem', fontWeight: '700', ...
3,804
0
petrpan-code/mui/material-ui/docs/data/system
petrpan-code/mui/material-ui/docs/data/system/display/TextOverflow.js
import * as React from 'react'; import Box from '@mui/material/Box'; export default function TextOverflow() { return ( <div style={{ width: 200, whiteSpace: 'nowrap' }}> <Box component="div" sx={{ textOverflow: 'clip', overflow: 'hidden', my: 2, p: 1,...
3,805
0
petrpan-code/mui/material-ui/docs/data/system
petrpan-code/mui/material-ui/docs/data/system/display/TextOverflow.tsx
import * as React from 'react'; import Box from '@mui/material/Box'; export default function TextOverflow() { return ( <div style={{ width: 200, whiteSpace: 'nowrap' }}> <Box component="div" sx={{ textOverflow: 'clip', overflow: 'hidden', my: 2, p: 1,...
3,806
0
petrpan-code/mui/material-ui/docs/data/system
petrpan-code/mui/material-ui/docs/data/system/display/Visibility.js
import * as React from 'react'; import Box from '@mui/material/Box'; export default function Visibility() { return ( <div style={{ width: '100%' }}> <Box component="span" sx={{ visibility: 'visible', my: 2, p: 1, bgcolor: (theme) => theme....
3,807
0
petrpan-code/mui/material-ui/docs/data/system
petrpan-code/mui/material-ui/docs/data/system/display/Visibility.tsx
import * as React from 'react'; import Box from '@mui/material/Box'; export default function Visibility() { return ( <div style={{ width: '100%' }}> <Box component="span" sx={{ visibility: 'visible', my: 2, p: 1, bgcolor: (theme) => theme....
3,808
0
petrpan-code/mui/material-ui/docs/data/system
petrpan-code/mui/material-ui/docs/data/system/display/WhiteSpace.js
import * as React from 'react'; import Box from '@mui/material/Box'; export default function WhiteSpace() { return ( <div style={{ width: 200 }}> <Box component="div" sx={{ whiteSpace: 'nowrap', overflowX: 'auto', my: 2, p: 1, bgcolor: (them...
3,809
0
petrpan-code/mui/material-ui/docs/data/system
petrpan-code/mui/material-ui/docs/data/system/display/WhiteSpace.tsx
import * as React from 'react'; import Box from '@mui/material/Box'; export default function WhiteSpace() { return ( <div style={{ width: 200 }}> <Box component="div" sx={{ whiteSpace: 'nowrap', overflowX: 'auto', my: 2, p: 1, bgcolor: (them...
3,810
0
petrpan-code/mui/material-ui/docs/data/system
petrpan-code/mui/material-ui/docs/data/system/display/display.md
# Display <p class="description">Quickly and responsively toggle the display, overflow, visibility, and more with the display utilities.</p> ## Examples ### Inline {{"demo": "Inline.js", "defaultCodeOpen": false, "bg": true}} ```jsx <Box component="div" sx={{ display: 'inline' }}>inline</Box> <Box component="div" ...
3,811
0
petrpan-code/mui/material-ui/docs/data/system/experimental-api
petrpan-code/mui/material-ui/docs/data/system/experimental-api/configure-the-sx-prop/ChangeTheBehaviorSxProp.js
import * as React from 'react'; import { Box, Stack } from '@mui/system'; import { createTheme, ThemeProvider } from '@mui/material/styles'; // Retain type safety. const theme = createTheme({ unstable_sxConfig: { // You can now use the borderRadius key in sx // by providing direct values from the palette ...
3,812
0
petrpan-code/mui/material-ui/docs/data/system/experimental-api
petrpan-code/mui/material-ui/docs/data/system/experimental-api/configure-the-sx-prop/ChangeTheBehaviorSxProp.tsx
import * as React from 'react'; import { Box, Stack } from '@mui/system'; import { createTheme, ThemeProvider } from '@mui/material/styles'; // Retain type safety. declare module '@mui/system' { interface Shape { sm: number; md: number; lg: number; } } const theme = createTheme({ unstable_sxConfig: ...
3,813
0
petrpan-code/mui/material-ui/docs/data/system/experimental-api
petrpan-code/mui/material-ui/docs/data/system/experimental-api/configure-the-sx-prop/ChangeTheBehaviorSxProp.tsx.preview
<ThemeProvider theme={theme}> <Box sx={{ borderRadius: 'sm', border: 1, p: 4 }} /> <Box sx={{ borderRadius: 'md', border: 1, p: 4 }} /> <Box sx={{ borderRadius: 'lg', border: 1, p: 4 }} /> </ThemeProvider>
3,814
0
petrpan-code/mui/material-ui/docs/data/system/experimental-api
petrpan-code/mui/material-ui/docs/data/system/experimental-api/configure-the-sx-prop/ExtendTheSxProp.js
import * as React from 'react'; import { Box, handleBreakpoints } from '@mui/system'; import { createTheme, ThemeProvider } from '@mui/material/styles'; const customTheme = createTheme({ unstable_sxConfig: { size: { style: (props) => { const { size, theme } = props; const styleFromPropValu...
3,815
0
petrpan-code/mui/material-ui/docs/data/system/experimental-api
petrpan-code/mui/material-ui/docs/data/system/experimental-api/configure-the-sx-prop/ExtendTheSxProp.tsx
import * as React from 'react'; import { Box, handleBreakpoints } from '@mui/system'; import { createTheme, ThemeProvider } from '@mui/material/styles'; const customTheme = createTheme({ unstable_sxConfig: { size: { style: (props) => { const { size, theme } = props; const styleFromPropValu...
3,816
0
petrpan-code/mui/material-ui/docs/data/system/experimental-api
petrpan-code/mui/material-ui/docs/data/system/experimental-api/configure-the-sx-prop/ExtendTheSxProp.tsx.preview
<ThemeProvider theme={customTheme}> <Box sx={{ size: 10, border: 1, }} /> </ThemeProvider>
3,817
0
petrpan-code/mui/material-ui/docs/data/system/experimental-api
petrpan-code/mui/material-ui/docs/data/system/experimental-api/configure-the-sx-prop/configure-the-sx-prop.md
# Configure the sx prop <p class="description">Learn about the experimental API for extending or changing the behavior of the sx prop.</p> ## Extend the sx prop You can add new keys to be processed by the `sx` prop by extending the `unstable_sxConfig` option inside the theme, as shown below: {{"demo": "ExtendTheSxP...
3,818
0
petrpan-code/mui/material-ui/docs/data/system/experimental-api
petrpan-code/mui/material-ui/docs/data/system/experimental-api/css-theme-variables/CreateCssVarsProvider.js
import * as React from 'react'; import { unstable_createCssVarsProvider as createCssVarsProvider, unstable_prepareCssVars as prepareCssVars, styled, } from '@mui/system'; const lightColorScheme = { palette: { mode: 'light', primary: { default: '#3990FF', dark: '#02367D', }, text: { ...
3,819
0
petrpan-code/mui/material-ui/docs/data/system/experimental-api
petrpan-code/mui/material-ui/docs/data/system/experimental-api/css-theme-variables/CreateCssVarsProvider.tsx
import * as React from 'react'; import { unstable_createCssVarsProvider as createCssVarsProvider, unstable_prepareCssVars as prepareCssVars, styled, } from '@mui/system'; type Theme = { colorSchemes: { light: typeof lightColorScheme; dark: typeof lightColorScheme; }; palette: { colorScheme: 'li...
3,820
0
petrpan-code/mui/material-ui/docs/data/system/experimental-api
petrpan-code/mui/material-ui/docs/data/system/experimental-api/css-theme-variables/CreateCssVarsProvider.tsx.preview
<CssVarsProvider> <App /> </CssVarsProvider>
3,821
0
petrpan-code/mui/material-ui/docs/data/system/experimental-api
petrpan-code/mui/material-ui/docs/data/system/experimental-api/css-theme-variables/css-theme-variables.md
# CSS theme variables <p class="description">An overview of adopting CSS theme variables in Material UI or Joy UI.</p> [CSS variables](https://www.w3.org/TR/css-variables-1/) are a modern cross-browser feature that let you declare variables in CSS and reuse them in other properties. :::info If this is your first tim...
3,822
0
petrpan-code/mui/material-ui/docs/data/system
petrpan-code/mui/material-ui/docs/data/system/flexbox/AlignContent.js
import * as React from 'react'; import PropTypes from 'prop-types'; import Box from '@mui/material/Box'; function Item(props) { const { sx, ...other } = props; return ( <Box sx={{ p: 1, m: 1, bgcolor: (theme) => (theme.palette.mode === 'dark' ? '#101010' : 'grey.100'), col...
3,823
0
petrpan-code/mui/material-ui/docs/data/system
petrpan-code/mui/material-ui/docs/data/system/flexbox/AlignContent.tsx
import * as React from 'react'; import Box, { BoxProps } from '@mui/material/Box'; function Item(props: BoxProps) { const { sx, ...other } = props; return ( <Box sx={{ p: 1, m: 1, bgcolor: (theme) => (theme.palette.mode === 'dark' ? '#101010' : 'grey.100'), color: (theme) ...
3,824
0
petrpan-code/mui/material-ui/docs/data/system
petrpan-code/mui/material-ui/docs/data/system/flexbox/AlignItems.js
import * as React from 'react'; import PropTypes from 'prop-types'; import Box from '@mui/material/Box'; function Item(props) { const { sx, ...other } = props; return ( <Box sx={{ p: 1, m: 1, bgcolor: (theme) => (theme.palette.mode === 'dark' ? '#101010' : 'grey.100'), col...
3,825
0
petrpan-code/mui/material-ui/docs/data/system
petrpan-code/mui/material-ui/docs/data/system/flexbox/AlignItems.tsx
import * as React from 'react'; import Box, { BoxProps } from '@mui/material/Box'; function Item(props: BoxProps) { const { sx, ...other } = props; return ( <Box sx={{ p: 1, m: 1, bgcolor: (theme) => (theme.palette.mode === 'dark' ? '#101010' : 'grey.100'), color: (theme) ...
3,826
0
petrpan-code/mui/material-ui/docs/data/system
petrpan-code/mui/material-ui/docs/data/system/flexbox/AlignSelf.js
import * as React from 'react'; import PropTypes from 'prop-types'; import Box from '@mui/material/Box'; function Item(props) { const { sx, ...other } = props; return ( <Box sx={{ p: 1, m: 1, bgcolor: (theme) => (theme.palette.mode === 'dark' ? '#101010' : 'grey.100'), col...
3,827
0
petrpan-code/mui/material-ui/docs/data/system
petrpan-code/mui/material-ui/docs/data/system/flexbox/AlignSelf.tsx
import * as React from 'react'; import Box, { BoxProps } from '@mui/material/Box'; function Item(props: BoxProps) { const { sx, ...other } = props; return ( <Box sx={{ p: 1, m: 1, bgcolor: (theme) => (theme.palette.mode === 'dark' ? '#101010' : 'grey.100'), color: (theme) ...
3,828
0
petrpan-code/mui/material-ui/docs/data/system
petrpan-code/mui/material-ui/docs/data/system/flexbox/AlignSelf.tsx.preview
<Box sx={{ display: 'flex', alignItems: 'flex-start', p: 1, m: 1, bgcolor: 'background.paper', height: 124, borderRadius: 1, }} > <Item>Item 1</Item> <Item sx={{ alignSelf: 'flex-end' }}>Item 2</Item> <Item>Item 3</Item> </Box>
3,829
0
petrpan-code/mui/material-ui/docs/data/system
petrpan-code/mui/material-ui/docs/data/system/flexbox/Display.js
import * as React from 'react'; import Box from '@mui/material/Box'; export default function Display() { return ( <div style={{ width: '100%' }}> <Box sx={{ display: 'flex', m: 1, p: 1, bgcolor: (theme) => (theme.palette.mode === 'dark' ? '#101010' : '#fff'),...
3,830
0
petrpan-code/mui/material-ui/docs/data/system
petrpan-code/mui/material-ui/docs/data/system/flexbox/Display.tsx
import * as React from 'react'; import Box from '@mui/material/Box'; export default function Display() { return ( <div style={{ width: '100%' }}> <Box sx={{ display: 'flex', m: 1, p: 1, bgcolor: (theme) => (theme.palette.mode === 'dark' ? '#101010' : '#fff'),...
3,831
0
petrpan-code/mui/material-ui/docs/data/system
petrpan-code/mui/material-ui/docs/data/system/flexbox/FlexDirection.js
import * as React from 'react'; import PropTypes from 'prop-types'; import Box from '@mui/material/Box'; function Item(props) { const { sx, ...other } = props; return ( <Box sx={{ p: 1, m: 1, bgcolor: (theme) => (theme.palette.mode === 'dark' ? '#101010' : 'grey.100'), col...
3,832
0
petrpan-code/mui/material-ui/docs/data/system
petrpan-code/mui/material-ui/docs/data/system/flexbox/FlexDirection.tsx
import * as React from 'react'; import Box, { BoxProps } from '@mui/material/Box'; function Item(props: BoxProps) { const { sx, ...other } = props; return ( <Box sx={{ p: 1, m: 1, bgcolor: (theme) => (theme.palette.mode === 'dark' ? '#101010' : 'grey.100'), color: (theme) ...
3,833
0
petrpan-code/mui/material-ui/docs/data/system
petrpan-code/mui/material-ui/docs/data/system/flexbox/FlexGrow.js
import * as React from 'react'; import PropTypes from 'prop-types'; import Box from '@mui/material/Box'; function Item(props) { const { sx, ...other } = props; return ( <Box sx={{ p: 1, m: 1, bgcolor: (theme) => (theme.palette.mode === 'dark' ? '#101010' : 'grey.100'), col...
3,834
0
petrpan-code/mui/material-ui/docs/data/system
petrpan-code/mui/material-ui/docs/data/system/flexbox/FlexGrow.tsx
import * as React from 'react'; import Box, { BoxProps } from '@mui/material/Box'; function Item(props: BoxProps) { const { sx, ...other } = props; return ( <Box sx={{ p: 1, m: 1, bgcolor: (theme) => (theme.palette.mode === 'dark' ? '#101010' : 'grey.100'), color: (theme) ...
3,835
0
petrpan-code/mui/material-ui/docs/data/system
petrpan-code/mui/material-ui/docs/data/system/flexbox/FlexGrow.tsx.preview
<Box sx={{ display: 'flex', p: 1, bgcolor: 'background.paper', borderRadius: 1 }} > <Item sx={{ flexGrow: 1 }}>Item 1</Item> <Item>Item 2</Item> <Item>Item 3</Item> </Box>
3,836
0
petrpan-code/mui/material-ui/docs/data/system
petrpan-code/mui/material-ui/docs/data/system/flexbox/FlexShrink.js
import * as React from 'react'; import PropTypes from 'prop-types'; import Box from '@mui/material/Box'; function Item(props) { const { sx, ...other } = props; return ( <Box sx={{ p: 1, m: 1, bgcolor: (theme) => (theme.palette.mode === 'dark' ? '#101010' : 'grey.100'), col...
3,837
0
petrpan-code/mui/material-ui/docs/data/system
petrpan-code/mui/material-ui/docs/data/system/flexbox/FlexShrink.tsx
import * as React from 'react'; import Box, { BoxProps } from '@mui/material/Box'; function Item(props: BoxProps) { const { sx, ...other } = props; return ( <Box sx={{ p: 1, m: 1, bgcolor: (theme) => (theme.palette.mode === 'dark' ? '#101010' : 'grey.100'), color: (theme) ...
3,838
0
petrpan-code/mui/material-ui/docs/data/system
petrpan-code/mui/material-ui/docs/data/system/flexbox/FlexShrink.tsx.preview
<Box sx={{ display: 'flex', p: 1, bgcolor: 'background.paper', borderRadius: 1 }} > <Item sx={{ width: '100%' }}>Item 1</Item> <Item sx={{ flexShrink: 1 }}>Item 2</Item> <Item sx={{ flexShrink: 0 }}>Item 3</Item> </Box>
3,839
0
petrpan-code/mui/material-ui/docs/data/system
petrpan-code/mui/material-ui/docs/data/system/flexbox/FlexWrap.js
import * as React from 'react'; import PropTypes from 'prop-types'; import Box from '@mui/material/Box'; function Item(props) { const { sx, ...other } = props; return ( <Box sx={{ p: 1, m: 1, bgcolor: (theme) => (theme.palette.mode === 'dark' ? '#101010' : 'grey.100'), col...
3,840
0
petrpan-code/mui/material-ui/docs/data/system
petrpan-code/mui/material-ui/docs/data/system/flexbox/FlexWrap.tsx
import * as React from 'react'; import Box, { BoxProps } from '@mui/material/Box'; function Item(props: BoxProps) { const { sx, ...other } = props; return ( <Box sx={{ p: 1, m: 1, bgcolor: (theme) => (theme.palette.mode === 'dark' ? '#101010' : 'grey.100'), color: (theme) ...
3,841
0
petrpan-code/mui/material-ui/docs/data/system
petrpan-code/mui/material-ui/docs/data/system/flexbox/JustifyContent.js
import * as React from 'react'; import PropTypes from 'prop-types'; import Box from '@mui/material/Box'; function Item(props) { const { sx, ...other } = props; return ( <Box sx={{ p: 1, m: 1, bgcolor: (theme) => (theme.palette.mode === 'dark' ? '#101010' : 'grey.100'), col...
3,842
0
petrpan-code/mui/material-ui/docs/data/system
petrpan-code/mui/material-ui/docs/data/system/flexbox/JustifyContent.tsx
import * as React from 'react'; import Box, { BoxProps } from '@mui/material/Box'; function Item(props: BoxProps) { const { sx, ...other } = props; return ( <Box sx={{ p: 1, m: 1, bgcolor: (theme) => (theme.palette.mode === 'dark' ? '#101010' : 'grey.100'), color: (theme) ...
3,843
0
petrpan-code/mui/material-ui/docs/data/system
petrpan-code/mui/material-ui/docs/data/system/flexbox/Order.js
import * as React from 'react'; import PropTypes from 'prop-types'; import Box from '@mui/material/Box'; function Item(props) { const { sx, ...other } = props; return ( <Box sx={{ p: 1, m: 1, bgcolor: (theme) => (theme.palette.mode === 'dark' ? '#101010' : 'grey.100'), col...
3,844
0
petrpan-code/mui/material-ui/docs/data/system
petrpan-code/mui/material-ui/docs/data/system/flexbox/Order.tsx
import * as React from 'react'; import Box, { BoxProps } from '@mui/material/Box'; function Item(props: BoxProps) { const { sx, ...other } = props; return ( <Box sx={{ p: 1, m: 1, bgcolor: (theme) => (theme.palette.mode === 'dark' ? '#101010' : 'grey.100'), color: (theme) ...
3,845
0
petrpan-code/mui/material-ui/docs/data/system
petrpan-code/mui/material-ui/docs/data/system/flexbox/Order.tsx.preview
<Box sx={{ display: 'flex', p: 1, bgcolor: 'background.paper', borderRadius: 1 }} > <Item sx={{ order: 2 }}>Item 1</Item> <Item sx={{ order: 3 }}>Item 2</Item> <Item sx={{ order: 1 }}>Item 3</Item> </Box>
3,846
0
petrpan-code/mui/material-ui/docs/data/system
petrpan-code/mui/material-ui/docs/data/system/flexbox/flexbox.md
# Flexbox <p class="description">Quickly manage the layout, alignment, and sizing of grid columns, navigation, components, and more with a full suite of responsive flexbox utilities.</p> If you are **new to or unfamiliar with flexbox**, we encourage you to read this [CSS-Tricks flexbox](https://css-tricks.com/snippet...
3,847
0
petrpan-code/mui/material-ui/docs/data/system/getting-started
petrpan-code/mui/material-ui/docs/data/system/getting-started/custom-components/CombiningStyleFunctionsDemo.js
import * as React from 'react'; import styled from 'styled-components'; import { palette, spacing } from '@mui/system'; const Div = styled.div` ${palette} ${spacing} `; export default function CombiningStyleFunctionsDemo() { return ( <Div color="white" bgcolor="palevioletred" p={1}> Styled components ...
3,848
0
petrpan-code/mui/material-ui/docs/data/system/getting-started
petrpan-code/mui/material-ui/docs/data/system/getting-started/custom-components/CombiningStyleFunctionsDemo.tsx
import * as React from 'react'; import styled from 'styled-components'; import { palette, PaletteProps, spacing, SpacingProps } from '@mui/system'; const Div = styled.div<PaletteProps & SpacingProps>` ${palette} ${spacing} `; export default function CombiningStyleFunctionsDemo() { return ( <Div color="white...
3,849
0
petrpan-code/mui/material-ui/docs/data/system/getting-started
petrpan-code/mui/material-ui/docs/data/system/getting-started/custom-components/CombiningStyleFunctionsDemo.tsx.preview
<Div color="white" bgcolor="palevioletred" p={1}> Styled components </Div>
3,850
0
petrpan-code/mui/material-ui/docs/data/system/getting-started
petrpan-code/mui/material-ui/docs/data/system/getting-started/custom-components/StyleFunctionSxDemo.js
import * as React from 'react'; import styled, { ThemeProvider } from 'styled-components'; import { unstable_styleFunctionSx } from '@mui/system'; import { createTheme } from '@mui/material/styles'; const theme = createTheme(); const Div = styled('div')(unstable_styleFunctionSx); export default function StyleFunctio...
3,851
0
petrpan-code/mui/material-ui/docs/data/system/getting-started
petrpan-code/mui/material-ui/docs/data/system/getting-started/custom-components/StyleFunctionSxDemo.tsx
import * as React from 'react'; import styled, { ThemeProvider, StyleFunction } from 'styled-components'; import { unstable_styleFunctionSx, SxProps } from '@mui/system'; import { createTheme } from '@mui/material/styles'; interface DivProps { sx?: SxProps; } const theme = createTheme(); const Div = styled('div')<...
3,852
0
petrpan-code/mui/material-ui/docs/data/system/getting-started
petrpan-code/mui/material-ui/docs/data/system/getting-started/custom-components/StyleFunctionSxDemo.tsx.preview
<ThemeProvider theme={theme}> <Div sx={{ m: 1, p: 1, border: 1 }}>Custom component with the sx prop</Div> </ThemeProvider>
3,853
0
petrpan-code/mui/material-ui/docs/data/system/getting-started
petrpan-code/mui/material-ui/docs/data/system/getting-started/custom-components/custom-components.md
# Custom components <p class="description">Learn how to use MUI System with custom components.</p> ## Using sx with custom components Normally you would use the [`Box`](/system/react-box/) component at the root of your component tree in order to work with [the `sx` prop](/system/getting-started/the-sx-prop/). If you...
3,854
0
petrpan-code/mui/material-ui/docs/data/system/getting-started
petrpan-code/mui/material-ui/docs/data/system/getting-started/installation/installation.md
# Installation <p class="description">Install MUI System, a collection of CSS utilities for rapidly laying out custom designs.</p> ## Default installation Run one of the following commands to add MUI System to your project: <codeblock storageKey="package-manager"> ```bash npm npm install @mui/system @emotion/react...
3,855
0
petrpan-code/mui/material-ui/docs/data/system/getting-started
petrpan-code/mui/material-ui/docs/data/system/getting-started/overview/overview.md
--- title: Overview --- # MUI System - Overview <p class="description">MUI System is a collection of CSS utilities for rapidly laying out custom designs with MUI component libraries.</p> ## Introduction MUI System is a set of CSS utilities to help you build custom designs more efficiently when working with MUI comp...
3,856
0
petrpan-code/mui/material-ui/docs/data/system/getting-started
petrpan-code/mui/material-ui/docs/data/system/getting-started/the-sx-prop/Example.js
import * as React from 'react'; import { Box, ThemeProvider, createTheme } from '@mui/system'; const theme = createTheme({ palette: { background: { paper: '#fff', }, text: { primary: '#173A5E', secondary: '#46505A', }, action: { active: '#001E3C', }, success: { ...
3,857
0
petrpan-code/mui/material-ui/docs/data/system/getting-started
petrpan-code/mui/material-ui/docs/data/system/getting-started/the-sx-prop/Example.tsx
import * as React from 'react'; import { Box, ThemeProvider, createTheme } from '@mui/system'; const theme = createTheme({ palette: { background: { paper: '#fff', }, text: { primary: '#173A5E', secondary: '#46505A', }, action: { active: '#001E3C', }, success: { ...
3,858
0
petrpan-code/mui/material-ui/docs/data/system/getting-started
petrpan-code/mui/material-ui/docs/data/system/getting-started/the-sx-prop/PassingSxProp.js
import * as React from 'react'; import PropTypes from 'prop-types'; import ListItem from '@mui/material/ListItem'; import FormLabel from '@mui/material/FormLabel'; function ListHeader({ sx = [], children }) { return ( <ListItem sx={[ { width: 'auto', textDecoration: 'underline',...
3,859
0
petrpan-code/mui/material-ui/docs/data/system/getting-started
petrpan-code/mui/material-ui/docs/data/system/getting-started/the-sx-prop/PassingSxProp.tsx
import * as React from 'react'; import ListItem from '@mui/material/ListItem'; import FormLabel from '@mui/material/FormLabel'; import { SxProps, Theme } from '@mui/material/styles'; interface ListHeaderProps { children: React.ReactNode; sx?: SxProps<Theme>; } function ListHeader({ sx = [], children }: ListHeader...
3,860
0
petrpan-code/mui/material-ui/docs/data/system/getting-started
petrpan-code/mui/material-ui/docs/data/system/getting-started/the-sx-prop/PassingSxProp.tsx.preview
<ListHeader sx={(theme) => ({ color: 'info.main', ...theme.typography.overline, })} > Header </ListHeader>
3,861
0
petrpan-code/mui/material-ui/docs/data/system/getting-started
petrpan-code/mui/material-ui/docs/data/system/getting-started/the-sx-prop/the-sx-prop.md
# The sx prop <p class="description">The sx prop is a shortcut for defining custom styles that has access to the theme.</p> The `sx` prop lets you work with a superset of CSS that packages all of the style functions exposed in `@mui/system`. You can specify any valid CSS using this prop, as well as many _theme-aware_...
3,862
0
petrpan-code/mui/material-ui/docs/data/system/getting-started
petrpan-code/mui/material-ui/docs/data/system/getting-started/usage/BreakpointsAsArray.js
import * as React from 'react'; import Box from '@mui/material/Box'; export default function BreakpointsAsArray() { return ( <div> <Box sx={{ width: [100, 200, 300] }}>This box has a responsive width.</Box> </div> ); }
3,863
0
petrpan-code/mui/material-ui/docs/data/system/getting-started
petrpan-code/mui/material-ui/docs/data/system/getting-started/usage/BreakpointsAsArray.tsx
import * as React from 'react'; import Box from '@mui/material/Box'; export default function BreakpointsAsArray() { return ( <div> <Box sx={{ width: [100, 200, 300] }}>This box has a responsive width.</Box> </div> ); }
3,864
0
petrpan-code/mui/material-ui/docs/data/system/getting-started
petrpan-code/mui/material-ui/docs/data/system/getting-started/usage/BreakpointsAsArray.tsx.preview
<Box sx={{ width: [100, 200, 300] }}>This box has a responsive width.</Box>
3,865
0
petrpan-code/mui/material-ui/docs/data/system/getting-started
petrpan-code/mui/material-ui/docs/data/system/getting-started/usage/BreakpointsAsObject.js
import * as React from 'react'; import Box from '@mui/material/Box'; export default function BreakpointsAsObject() { return ( <div> <Box sx={{ width: { xs: 100, // theme.breakpoints.up('xs') sm: 200, // theme.breakpoints.up('sm') md: 300, // theme.break...
3,866
0
petrpan-code/mui/material-ui/docs/data/system/getting-started
petrpan-code/mui/material-ui/docs/data/system/getting-started/usage/BreakpointsAsObject.tsx
import * as React from 'react'; import Box from '@mui/material/Box'; export default function BreakpointsAsObject() { return ( <div> <Box sx={{ width: { xs: 100, // theme.breakpoints.up('xs') sm: 200, // theme.breakpoints.up('sm') md: 300, // theme.break...
3,867
0
petrpan-code/mui/material-ui/docs/data/system/getting-started
petrpan-code/mui/material-ui/docs/data/system/getting-started/usage/BreakpointsAsObject.tsx.preview
<Box sx={{ width: { xs: 100, // theme.breakpoints.up('xs') sm: 200, // theme.breakpoints.up('sm') md: 300, // theme.breakpoints.up('md') lg: 400, // theme.breakpoints.up('lg') xl: 500, // theme.breakpoints.up('xl') }, }} > This box has a responsive width. </Box>
3,868
0
petrpan-code/mui/material-ui/docs/data/system/getting-started
petrpan-code/mui/material-ui/docs/data/system/getting-started/usage/Demo.js
import * as React from 'react'; import Box from '@mui/material/Box'; import { alpha } from '@mui/material/styles'; import ErrorOutlineIcon from '@mui/icons-material/ErrorOutline'; export default function Demo() { return ( <Box sx={{ display: 'flex', flexDirection: { xs: 'column', md: 'row' ...
3,869
0
petrpan-code/mui/material-ui/docs/data/system/getting-started
petrpan-code/mui/material-ui/docs/data/system/getting-started/usage/Demo.tsx
import * as React from 'react'; import Box from '@mui/material/Box'; import { alpha } from '@mui/material/styles'; import ErrorOutlineIcon from '@mui/icons-material/ErrorOutline'; export default function Demo() { return ( <Box sx={{ display: 'flex', flexDirection: { xs: 'column', md: 'row' ...
3,870
0
petrpan-code/mui/material-ui/docs/data/system/getting-started
petrpan-code/mui/material-ui/docs/data/system/getting-started/usage/SxProp.tsx.preview
<NoSsr> <ThemeProvider theme={theme}> <Box color="white" sx={{ bgcolor: 'palevioletred', p: 1, textTransform: 'uppercase' }}> CssProp </Box> </ThemeProvider> </NoSsr>
3,871
0
petrpan-code/mui/material-ui/docs/data/system/getting-started
petrpan-code/mui/material-ui/docs/data/system/getting-started/usage/ValueAsFunction.js
import * as React from 'react'; import Box from '@mui/material/Box'; export default function ValueAsFunction() { return ( <div> <Box sx={{ p: 1, border: 1, borderColor: (theme) => theme.palette.primary.main, }} > Border color with theme value. ...
3,872
0
petrpan-code/mui/material-ui/docs/data/system/getting-started
petrpan-code/mui/material-ui/docs/data/system/getting-started/usage/ValueAsFunction.tsx
import * as React from 'react'; import Box from '@mui/material/Box'; import { Theme } from '@mui/material/styles'; export default function ValueAsFunction() { return ( <div> <Box sx={{ p: 1, border: 1, borderColor: (theme: Theme) => theme.palette.primary.main, ...
3,873
0
petrpan-code/mui/material-ui/docs/data/system/getting-started
petrpan-code/mui/material-ui/docs/data/system/getting-started/usage/ValueAsFunction.tsx.preview
<Box sx={{ p: 1, border: 1, borderColor: (theme: Theme) => theme.palette.primary.main, }} > Border color with theme value. </Box>
3,874
0
petrpan-code/mui/material-ui/docs/data/system/getting-started
petrpan-code/mui/material-ui/docs/data/system/getting-started/usage/Why.js
import * as React from 'react'; import TrendingUpIcon from '@mui/icons-material/TrendingUp'; import Box from '@mui/material/Box'; export default function Why() { return ( <Box sx={{ bgcolor: 'background.paper', boxShadow: 1, borderRadius: 1, p: 2, minWidth: 300, ...
3,875
0
petrpan-code/mui/material-ui/docs/data/system/getting-started
petrpan-code/mui/material-ui/docs/data/system/getting-started/usage/Why.tsx
import * as React from 'react'; import TrendingUpIcon from '@mui/icons-material/TrendingUp'; import Box from '@mui/material/Box'; export default function Why() { return ( <Box sx={{ bgcolor: 'background.paper', boxShadow: 1, borderRadius: 1, p: 2, minWidth: 300, ...
3,876
0
petrpan-code/mui/material-ui/docs/data/system/getting-started
petrpan-code/mui/material-ui/docs/data/system/getting-started/usage/usage.md
# Usage <p class="description">Learn the basics of working with MUI System and its utilities.</p> ## Why use MUI System? MUI System's `sx` prop lets you avoid writing unnecessary styled-component code, and instead define styles directly within the component itself. This is especially useful for one-off components wi...
3,877
0
petrpan-code/mui/material-ui/docs/data/system
petrpan-code/mui/material-ui/docs/data/system/grid/Display.js
import * as React from 'react'; import Box from '@mui/material/Box'; export default function Display() { return ( <div style={{ width: '100%' }}> <Box sx={{ display: 'grid', bgcolor: (theme) => theme.palette.mode === 'dark' ? '#101010' : 'grey.100', color: ...
3,878
0
petrpan-code/mui/material-ui/docs/data/system
petrpan-code/mui/material-ui/docs/data/system/grid/Display.tsx
import * as React from 'react'; import Box from '@mui/material/Box'; export default function Display() { return ( <div style={{ width: '100%' }}> <Box sx={{ display: 'grid', bgcolor: (theme) => theme.palette.mode === 'dark' ? '#101010' : 'grey.100', color: ...
3,879
0
petrpan-code/mui/material-ui/docs/data/system
petrpan-code/mui/material-ui/docs/data/system/grid/Gap.js
import * as React from 'react'; import PropTypes from 'prop-types'; import Box from '@mui/material/Box'; function Item(props) { const { sx, ...other } = props; return ( <Box sx={{ bgcolor: (theme) => (theme.palette.mode === 'dark' ? '#101010' : '#fff'), color: (theme) => (theme.palette.mo...
3,880
0
petrpan-code/mui/material-ui/docs/data/system
petrpan-code/mui/material-ui/docs/data/system/grid/Gap.tsx
import * as React from 'react'; import Box, { BoxProps } from '@mui/material/Box'; function Item(props: BoxProps) { const { sx, ...other } = props; return ( <Box sx={{ bgcolor: (theme) => (theme.palette.mode === 'dark' ? '#101010' : '#fff'), color: (theme) => (theme.palette.mode === 'dark...
3,881
0
petrpan-code/mui/material-ui/docs/data/system
petrpan-code/mui/material-ui/docs/data/system/grid/Gap.tsx.preview
<Box sx={{ display: 'grid', gap: 1, gridTemplateColumns: 'repeat(2, 1fr)', }} > <Item>1</Item> <Item>2</Item> <Item>3</Item> <Item>4</Item> </Box>
3,882
0
petrpan-code/mui/material-ui/docs/data/system
petrpan-code/mui/material-ui/docs/data/system/grid/GridAutoColumns.js
import * as React from 'react'; import PropTypes from 'prop-types'; import Box from '@mui/material/Box'; function Item(props) { const { sx, ...other } = props; return ( <Box sx={{ bgcolor: (theme) => (theme.palette.mode === 'dark' ? '#101010' : '#fff'), color: (theme) => (theme.palette.mo...
3,883
0
petrpan-code/mui/material-ui/docs/data/system
petrpan-code/mui/material-ui/docs/data/system/grid/GridAutoColumns.tsx
import * as React from 'react'; import Box, { BoxProps } from '@mui/material/Box'; function Item(props: BoxProps) { const { sx, ...other } = props; return ( <Box sx={{ bgcolor: (theme) => (theme.palette.mode === 'dark' ? '#101010' : '#fff'), color: (theme) => (theme.palette.mode === 'dark...
3,884
0
petrpan-code/mui/material-ui/docs/data/system
petrpan-code/mui/material-ui/docs/data/system/grid/GridAutoColumns.tsx.preview
<Box sx={{ display: 'grid', gridAutoColumns: '1fr', gap: 1, }} > <Item sx={{ gridRow: '1', gridColumn: 'span 2' }}>span 2</Item> {/* The second non-visible column has width of 1/4 */} <Item sx={{ gridRow: '1', gridColumn: '4 / 5' }}>4 / 5</Item> </Box>
3,885
0
petrpan-code/mui/material-ui/docs/data/system
petrpan-code/mui/material-ui/docs/data/system/grid/GridAutoFlow.js
import * as React from 'react'; import PropTypes from 'prop-types'; import Box from '@mui/material/Box'; function Item(props) { const { sx, ...other } = props; return ( <Box sx={{ bgcolor: (theme) => (theme.palette.mode === 'dark' ? '#101010' : '#fff'), color: (theme) => (theme.palette.mo...
3,886
0
petrpan-code/mui/material-ui/docs/data/system
petrpan-code/mui/material-ui/docs/data/system/grid/GridAutoFlow.tsx
import * as React from 'react'; import Box, { BoxProps } from '@mui/material/Box'; function Item(props: BoxProps) { const { sx, ...other } = props; return ( <Box sx={{ bgcolor: (theme) => (theme.palette.mode === 'dark' ? '#101010' : '#fff'), color: (theme) => (theme.palette.mode === 'dark...
3,887
0
petrpan-code/mui/material-ui/docs/data/system
petrpan-code/mui/material-ui/docs/data/system/grid/GridAutoFlow.tsx.preview
<Box sx={{ display: 'grid', gridAutoFlow: 'row', gridTemplateColumns: 'repeat(5, 1fr)', gridTemplateRows: 'repeat(2, 50px)', gap: 1, }} > <Item sx={{ gridColumn: '1', gridRow: '1 / 3' }}>1</Item> <Item>2</Item> <Item>3</Item> <Item>4</Item> <Item sx={{ gridColumn: '5', gridRow: '1 / 3'...
3,888
0
petrpan-code/mui/material-ui/docs/data/system
petrpan-code/mui/material-ui/docs/data/system/grid/GridAutoRows.js
import * as React from 'react'; import PropTypes from 'prop-types'; import Box from '@mui/material/Box'; function Item(props) { const { sx, ...other } = props; return ( <Box sx={{ bgcolor: (theme) => (theme.palette.mode === 'dark' ? '#101010' : '#fff'), color: (theme) => (theme.palette.mo...
3,889
0
petrpan-code/mui/material-ui/docs/data/system
petrpan-code/mui/material-ui/docs/data/system/grid/GridAutoRows.tsx
import * as React from 'react'; import Box, { BoxProps } from '@mui/material/Box'; function Item(props: BoxProps) { const { sx, ...other } = props; return ( <Box sx={{ bgcolor: (theme) => (theme.palette.mode === 'dark' ? '#101010' : '#fff'), color: (theme) => (theme.palette.mode === 'dark...
3,890
0
petrpan-code/mui/material-ui/docs/data/system
petrpan-code/mui/material-ui/docs/data/system/grid/GridAutoRows.tsx.preview
<Box sx={{ display: 'grid', gridAutoRows: '40px', gap: 1, }} > <Item sx={{ gridColumn: '1', gridRow: 'span 2' }}>span 2</Item> {/* The second non-visible row has height of 40px */} <Item sx={{ gridColumn: '1', gridRow: '4 / 5' }}>4 / 5</Item> </Box>
3,891
0
petrpan-code/mui/material-ui/docs/data/system
petrpan-code/mui/material-ui/docs/data/system/grid/GridTemplateAreas.js
import * as React from 'react'; import Box from '@mui/material/Box'; export default function GridTemplateAreas() { return ( <Box sx={{ width: '100%', height: '140px', color: '#fff', '& > .MuiBox-root > .MuiBox-root': { p: 1, borderRadius: 2, fon...
3,892
0
petrpan-code/mui/material-ui/docs/data/system
petrpan-code/mui/material-ui/docs/data/system/grid/GridTemplateAreas.tsx
import * as React from 'react'; import Box from '@mui/material/Box'; export default function GridTemplateAreas() { return ( <Box sx={{ width: '100%', height: '140px', color: '#fff', '& > .MuiBox-root > .MuiBox-root': { p: 1, borderRadius: 2, fon...
3,893
0
petrpan-code/mui/material-ui/docs/data/system
petrpan-code/mui/material-ui/docs/data/system/grid/GridTemplateAreas.tsx.preview
<Box sx={{ display: 'grid', gridTemplateColumns: 'repeat(4, 1fr)', gap: 1, gridTemplateRows: 'auto', gridTemplateAreas: `"header header header header" "main main . sidebar" "footer footer footer footer"`, }} > <Box sx={{ gridArea: 'header', bgcolor: 'primary.main' }}>Header</Box> <Box sx...
3,894
0
petrpan-code/mui/material-ui/docs/data/system
petrpan-code/mui/material-ui/docs/data/system/grid/GridTemplateColumns.js
import * as React from 'react'; import PropTypes from 'prop-types'; import Box from '@mui/material/Box'; function Item(props) { const { sx, ...other } = props; return ( <Box sx={{ bgcolor: (theme) => (theme.palette.mode === 'dark' ? '#101010' : '#fff'), color: (theme) => (theme.palette.mo...
3,895
0
petrpan-code/mui/material-ui/docs/data/system
petrpan-code/mui/material-ui/docs/data/system/grid/GridTemplateColumns.tsx
import * as React from 'react'; import Box, { BoxProps } from '@mui/material/Box'; function Item(props: BoxProps) { const { sx, ...other } = props; return ( <Box sx={{ bgcolor: (theme) => (theme.palette.mode === 'dark' ? '#101010' : '#fff'), color: (theme) => (theme.palette.mode === 'dark...
3,896
0
petrpan-code/mui/material-ui/docs/data/system
petrpan-code/mui/material-ui/docs/data/system/grid/GridTemplateColumns.tsx.preview
<Box sx={{ display: 'grid', gridTemplateColumns: 'repeat(3, 1fr)' }}> <Item>1</Item> <Item>2</Item> <Item>3</Item> </Box>
3,897
0
petrpan-code/mui/material-ui/docs/data/system
petrpan-code/mui/material-ui/docs/data/system/grid/GridTemplateRows.js
import * as React from 'react'; import PropTypes from 'prop-types'; import Box from '@mui/material/Box'; function Item(props) { const { sx, ...other } = props; return ( <Box sx={{ bgcolor: (theme) => (theme.palette.mode === 'dark' ? '#101010' : '#fff'), color: (theme) => (theme.palette.mo...
3,898
0
petrpan-code/mui/material-ui/docs/data/system
petrpan-code/mui/material-ui/docs/data/system/grid/GridTemplateRows.tsx
import * as React from 'react'; import Box, { BoxProps } from '@mui/material/Box'; function Item(props: BoxProps) { const { sx, ...other } = props; return ( <Box sx={{ bgcolor: (theme) => (theme.palette.mode === 'dark' ? '#101010' : '#fff'), color: (theme) => (theme.palette.mode === 'dark...
3,899