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/styles | petrpan-code/mui/material-ui/docs/data/styles/basics/Hook.js | import * as React from 'react';
import { makeStyles } from '@mui/styles';
import Button from '@mui/material/Button';
const useStyles = makeStyles({
root: {
background: 'linear-gradient(45deg, #FE6B8B 30%, #FF8E53 90%)',
border: 0,
borderRadius: 3,
boxShadow: '0 3px 5px 2px rgba(255, 105, 135, .3)',
... | 3,700 |
0 | petrpan-code/mui/material-ui/docs/data/styles | petrpan-code/mui/material-ui/docs/data/styles/basics/Hook.tsx | import * as React from 'react';
import { makeStyles } from '@mui/styles';
import Button from '@mui/material/Button';
const useStyles = makeStyles({
root: {
background: 'linear-gradient(45deg, #FE6B8B 30%, #FF8E53 90%)',
border: 0,
borderRadius: 3,
boxShadow: '0 3px 5px 2px rgba(255, 105, 135, .3)',
... | 3,701 |
0 | petrpan-code/mui/material-ui/docs/data/styles | petrpan-code/mui/material-ui/docs/data/styles/basics/Hook.tsx.preview | <Button className={classes.root}>Styled with Hook API</Button> | 3,702 |
0 | petrpan-code/mui/material-ui/docs/data/styles | petrpan-code/mui/material-ui/docs/data/styles/basics/NestedStylesHook.js | import * as React from 'react';
import { makeStyles } from '@mui/styles';
const useStyles = makeStyles({
root: {
color: 'red',
'& p': {
margin: 0,
color: 'green',
'& span': {
color: 'blue',
},
},
},
});
export default function NestedStylesHook() {
const classes = useS... | 3,703 |
0 | petrpan-code/mui/material-ui/docs/data/styles | petrpan-code/mui/material-ui/docs/data/styles/basics/NestedStylesHook.tsx | import * as React from 'react';
import { makeStyles } from '@mui/styles';
const useStyles = makeStyles({
root: {
color: 'red',
'& p': {
margin: 0,
color: 'green',
'& span': {
color: 'blue',
},
},
},
});
export default function NestedStylesHook() {
const classes = useS... | 3,704 |
0 | petrpan-code/mui/material-ui/docs/data/styles | petrpan-code/mui/material-ui/docs/data/styles/basics/NestedStylesHook.tsx.preview |
This is red since it is inside the root.
<p>
This is green since it is inside the paragraph{' '}
<span>and this is blue since it is inside the span</span>
</p> | 3,705 |
0 | petrpan-code/mui/material-ui/docs/data/styles | petrpan-code/mui/material-ui/docs/data/styles/basics/StressTest.js | import * as React from 'react';
import PropTypes from 'prop-types';
import { ThemeProvider, useTheme, makeStyles } from '@mui/styles';
const useStyles = makeStyles((theme) => ({
root: (props) => ({
backgroundColor: props.backgroundColor,
color: theme.color,
}),
}));
const Component = React.memo((props) =>... | 3,706 |
0 | petrpan-code/mui/material-ui/docs/data/styles | petrpan-code/mui/material-ui/docs/data/styles/basics/StressTest.tsx | import * as React from 'react';
import { ThemeProvider, useTheme, makeStyles } from '@mui/styles';
interface MyTheme {
color: string;
}
interface ComponentProps {
backgroundColor: string;
}
const useStyles = makeStyles((theme: MyTheme) => ({
root: (props: ComponentProps) => ({
backgroundColor: props.backgr... | 3,707 |
0 | petrpan-code/mui/material-ui/docs/data/styles | petrpan-code/mui/material-ui/docs/data/styles/basics/StyledComponents.js | import * as React from 'react';
import { styled } from '@mui/styles';
import Button from '@mui/material/Button';
const MyButton = styled(Button)({
background: 'linear-gradient(45deg, #FE6B8B 30%, #FF8E53 90%)',
border: 0,
borderRadius: 3,
boxShadow: '0 3px 5px 2px rgba(255, 105, 135, .3)',
color: 'white',
... | 3,708 |
0 | petrpan-code/mui/material-ui/docs/data/styles | petrpan-code/mui/material-ui/docs/data/styles/basics/StyledComponents.tsx | import * as React from 'react';
import { styled } from '@mui/styles';
import Button from '@mui/material/Button';
const MyButton = styled(Button)({
background: 'linear-gradient(45deg, #FE6B8B 30%, #FF8E53 90%)',
border: 0,
borderRadius: 3,
boxShadow: '0 3px 5px 2px rgba(255, 105, 135, .3)',
color: 'white',
... | 3,709 |
0 | petrpan-code/mui/material-ui/docs/data/styles | petrpan-code/mui/material-ui/docs/data/styles/basics/StyledComponents.tsx.preview | <MyButton>Styled with styled-components API</MyButton> | 3,710 |
0 | petrpan-code/mui/material-ui/docs/data/styles | petrpan-code/mui/material-ui/docs/data/styles/basics/basics.md | # @mui/styles (LEGACY)
<p class="description">The legacy styling solution for Material UI, now deprecated and not recommended for use.</p>
:::error
`@mui/styles` was deprecated with the release of MUI Core v5 in late 2021.
It depended on [JSS](https://cssinjs.org/) as a styling solution, which is no longer used in `@... | 3,711 |
0 | petrpan-code/mui/material-ui/docs/data/styles | petrpan-code/mui/material-ui/docs/data/styles/typescript/typescript.md | # TypeScript
## Customization of `Theme`
You can augment the default theme type to avoid having to set the theme type every time you use `makeStyles`, `useTheme`, or `styled`.
```ts
declare module '@mui/material/styles' {
interface DefaultTheme {
myProperty: string;
}
}
```
| 3,712 |
0 | petrpan-code/mui/material-ui/docs/data | petrpan-code/mui/material-ui/docs/data/system/pages.ts | import type { MuiPage } from 'docs/src/MuiPage';
import pagesApi from 'docs/data/system/pagesApi';
const pages: readonly MuiPage[] = [
{
pathname: '/system/getting-started-group',
title: 'Getting started',
children: [
{ pathname: '/system/getting-started', title: 'Overview' },
{ pathname: '/s... | 3,713 |
0 | petrpan-code/mui/material-ui/docs/data | petrpan-code/mui/material-ui/docs/data/system/pagesApi.js | module.exports = [
{ pathname: '/system/api/box' },
{ pathname: '/system/api/container' },
{ pathname: '/system/api/grid' },
{ pathname: '/system/api/stack' },
];
| 3,714 |
0 | petrpan-code/mui/material-ui/docs/data/system | petrpan-code/mui/material-ui/docs/data/system/borders/BorderAdditive.js | import * as React from 'react';
import Box from '@mui/material/Box';
const commonStyles = {
bgcolor: 'background.paper',
m: 1,
borderColor: 'text.primary',
width: '5rem',
height: '5rem',
};
export default function BorderAdditive() {
return (
<Box sx={{ display: 'flex', justifyContent: 'center' }}>
... | 3,715 |
0 | petrpan-code/mui/material-ui/docs/data/system | petrpan-code/mui/material-ui/docs/data/system/borders/BorderAdditive.tsx | import * as React from 'react';
import Box from '@mui/material/Box';
const commonStyles = {
bgcolor: 'background.paper',
m: 1,
borderColor: 'text.primary',
width: '5rem',
height: '5rem',
};
export default function BorderAdditive() {
return (
<Box sx={{ display: 'flex', justifyContent: 'center' }}>
... | 3,716 |
0 | petrpan-code/mui/material-ui/docs/data/system | petrpan-code/mui/material-ui/docs/data/system/borders/BorderAdditive.tsx.preview | <Box sx={{ ...commonStyles, border: 1 }} />
<Box sx={{ ...commonStyles, borderTop: 1 }} />
<Box sx={{ ...commonStyles, borderRight: 1 }} />
<Box sx={{ ...commonStyles, borderBottom: 1 }} />
<Box sx={{ ...commonStyles, borderLeft: 1 }} /> | 3,717 |
0 | petrpan-code/mui/material-ui/docs/data/system | petrpan-code/mui/material-ui/docs/data/system/borders/BorderColor.js | import * as React from 'react';
import Box from '@mui/material/Box';
const commonStyles = {
bgcolor: 'background.paper',
m: 1,
border: 1,
width: '5rem',
height: '5rem',
};
export default function BorderColor() {
return (
<Box sx={{ display: 'flex', justifyContent: 'center' }}>
<Box sx={{ ...comm... | 3,718 |
0 | petrpan-code/mui/material-ui/docs/data/system | petrpan-code/mui/material-ui/docs/data/system/borders/BorderColor.tsx | import * as React from 'react';
import Box from '@mui/material/Box';
const commonStyles = {
bgcolor: 'background.paper',
m: 1,
border: 1,
width: '5rem',
height: '5rem',
};
export default function BorderColor() {
return (
<Box sx={{ display: 'flex', justifyContent: 'center' }}>
<Box sx={{ ...comm... | 3,719 |
0 | petrpan-code/mui/material-ui/docs/data/system | petrpan-code/mui/material-ui/docs/data/system/borders/BorderColor.tsx.preview | <Box sx={{ ...commonStyles, borderColor: 'primary.main' }} />
<Box sx={{ ...commonStyles, borderColor: 'secondary.main' }} />
<Box sx={{ ...commonStyles, borderColor: 'error.main' }} />
<Box sx={{ ...commonStyles, borderColor: 'grey.500' }} />
<Box sx={{ ...commonStyles, borderColor: 'text.primary' }} /> | 3,720 |
0 | petrpan-code/mui/material-ui/docs/data/system | petrpan-code/mui/material-ui/docs/data/system/borders/BorderRadius.js | import * as React from 'react';
import Box from '@mui/material/Box';
const commonStyles = {
bgcolor: 'background.paper',
borderColor: 'text.primary',
m: 1,
border: 1,
width: '5rem',
height: '5rem',
};
export default function BorderRadius() {
return (
<Box sx={{ display: 'flex', justifyContent: 'cent... | 3,721 |
0 | petrpan-code/mui/material-ui/docs/data/system | petrpan-code/mui/material-ui/docs/data/system/borders/BorderRadius.tsx | import * as React from 'react';
import Box from '@mui/material/Box';
const commonStyles = {
bgcolor: 'background.paper',
borderColor: 'text.primary',
m: 1,
border: 1,
width: '5rem',
height: '5rem',
};
export default function BorderRadius() {
return (
<Box sx={{ display: 'flex', justifyContent: 'cent... | 3,722 |
0 | petrpan-code/mui/material-ui/docs/data/system | petrpan-code/mui/material-ui/docs/data/system/borders/BorderRadius.tsx.preview | <Box sx={{ ...commonStyles, borderRadius: '50%' }} />
<Box sx={{ ...commonStyles, borderRadius: 1 }} />
<Box sx={{ ...commonStyles, borderRadius: '16px' }} /> | 3,723 |
0 | petrpan-code/mui/material-ui/docs/data/system | petrpan-code/mui/material-ui/docs/data/system/borders/BorderSubtractive.js | import * as React from 'react';
import Box from '@mui/material/Box';
const commonStyles = {
bgcolor: 'background.paper',
border: 1,
m: 1,
borderColor: 'text.primary',
width: '5rem',
height: '5rem',
};
export default function BorderSubtractive() {
return (
<Box sx={{ display: 'flex', justifyContent: ... | 3,724 |
0 | petrpan-code/mui/material-ui/docs/data/system | petrpan-code/mui/material-ui/docs/data/system/borders/BorderSubtractive.tsx | import * as React from 'react';
import Box from '@mui/material/Box';
const commonStyles = {
bgcolor: 'background.paper',
border: 1,
m: 1,
borderColor: 'text.primary',
width: '5rem',
height: '5rem',
};
export default function BorderSubtractive() {
return (
<Box sx={{ display: 'flex', justifyContent: ... | 3,725 |
0 | petrpan-code/mui/material-ui/docs/data/system | petrpan-code/mui/material-ui/docs/data/system/borders/BorderSubtractive.tsx.preview | <Box sx={{ ...commonStyles, border: 0 }} />
<Box sx={{ ...commonStyles, borderTop: 0 }} />
<Box sx={{ ...commonStyles, borderRight: 0 }} />
<Box sx={{ ...commonStyles, borderBottom: 0 }} />
<Box sx={{ ...commonStyles, borderLeft: 0 }} /> | 3,726 |
0 | petrpan-code/mui/material-ui/docs/data/system | petrpan-code/mui/material-ui/docs/data/system/borders/borders.md | # Borders
<p class="description">Use border utilities to quickly style the border and border-radius of an element. Great for images, buttons, or any other element.</p>
## Border
Use border utilities to add or remove an element's borders. Choose from all borders or one at a time.
### Additive
{{"demo": "BorderAddit... | 3,727 |
0 | petrpan-code/mui/material-ui/docs/data/system/components | petrpan-code/mui/material-ui/docs/data/system/components/box/BoxBasic.js | import * as React from 'react';
import Box from '@mui/system/Box';
export default function BoxBasic() {
return (
<Box component="section" sx={{ p: 2, border: '1px dashed grey' }}>
This is a section container
</Box>
);
}
| 3,728 |
0 | petrpan-code/mui/material-ui/docs/data/system/components | petrpan-code/mui/material-ui/docs/data/system/components/box/BoxBasic.tsx | import * as React from 'react';
import Box from '@mui/system/Box';
export default function BoxBasic() {
return (
<Box component="section" sx={{ p: 2, border: '1px dashed grey' }}>
This is a section container
</Box>
);
}
| 3,729 |
0 | petrpan-code/mui/material-ui/docs/data/system/components | petrpan-code/mui/material-ui/docs/data/system/components/box/BoxBasic.tsx.preview |
This is a section container
| 3,730 |
0 | petrpan-code/mui/material-ui/docs/data/system/components | petrpan-code/mui/material-ui/docs/data/system/components/box/BoxComponent.js | import * as React from 'react';
import { Box } from '@mui/system';
import Button from '@mui/material/Button';
export default function BoxComponent() {
return (
<Box component="span" sx={{ p: 2, border: '1px dashed grey' }}>
<Button>Save</Button>
</Box>
);
}
| 3,731 |
0 | petrpan-code/mui/material-ui/docs/data/system/components | petrpan-code/mui/material-ui/docs/data/system/components/box/BoxComponent.tsx | import * as React from 'react';
import { Box } from '@mui/system';
import Button from '@mui/material/Button';
export default function BoxComponent() {
return (
<Box component="span" sx={{ p: 2, border: '1px dashed grey' }}>
<Button>Save</Button>
</Box>
);
}
| 3,732 |
0 | petrpan-code/mui/material-ui/docs/data/system/components | petrpan-code/mui/material-ui/docs/data/system/components/box/BoxComponent.tsx.preview | <Button>Save</Button> | 3,733 |
0 | petrpan-code/mui/material-ui/docs/data/system/components | petrpan-code/mui/material-ui/docs/data/system/components/box/BoxSx.js | import * as React from 'react';
import { Box, ThemeProvider } from '@mui/system';
export default function BoxSx() {
return (
<ThemeProvider
theme={{
palette: {
primary: {
main: '#007FFF',
dark: '#0066CC',
},
},
}}
>
<Box
sx... | 3,734 |
0 | petrpan-code/mui/material-ui/docs/data/system/components | petrpan-code/mui/material-ui/docs/data/system/components/box/BoxSx.tsx | import * as React from 'react';
import { Box, ThemeProvider } from '@mui/system';
export default function BoxSx() {
return (
<ThemeProvider
theme={{
palette: {
primary: {
main: '#007FFF',
dark: '#0066CC',
},
},
}}
>
<Box
sx... | 3,735 |
0 | petrpan-code/mui/material-ui/docs/data/system/components | petrpan-code/mui/material-ui/docs/data/system/components/box/box.md | ---
productId: system
title: React Box component
components: Box
githubLabel: 'component: Box'
---
# Box
<p class="description">The Box component is a generic, theme-aware container with access to CSS utilities from MUI System.</p>
{{"component": "modules/components/ComponentLinkHeader.js", "design": false}}
## Int... | 3,736 |
0 | petrpan-code/mui/material-ui/docs/data/system/components | petrpan-code/mui/material-ui/docs/data/system/components/container/FixedContainer.js | import * as React from 'react';
import CssBaseline from '@mui/material/CssBaseline';
import { Box, Container } from '@mui/system';
export default function FixedContainer() {
return (
<React.Fragment>
<CssBaseline />
<Container fixed>
<Box sx={{ bgcolor: '#cfe8fc', height: '100vh' }} />
... | 3,737 |
0 | petrpan-code/mui/material-ui/docs/data/system/components | petrpan-code/mui/material-ui/docs/data/system/components/container/FixedContainer.tsx | import * as React from 'react';
import CssBaseline from '@mui/material/CssBaseline';
import { Box, Container } from '@mui/system';
export default function FixedContainer() {
return (
<React.Fragment>
<CssBaseline />
<Container fixed>
<Box sx={{ bgcolor: '#cfe8fc', height: '100vh' }} />
... | 3,738 |
0 | petrpan-code/mui/material-ui/docs/data/system/components | petrpan-code/mui/material-ui/docs/data/system/components/container/FixedContainer.tsx.preview | <React.Fragment>
<CssBaseline />
<Container fixed>
<Box sx={{ bgcolor: '#cfe8fc', height: '100vh' }} />
</Container>
</React.Fragment> | 3,739 |
0 | petrpan-code/mui/material-ui/docs/data/system/components | petrpan-code/mui/material-ui/docs/data/system/components/container/SimpleContainer.js | import * as React from 'react';
import CssBaseline from '@mui/material/CssBaseline';
import { Box, Container } from '@mui/system';
export default function SimpleContainer() {
return (
<React.Fragment>
<CssBaseline />
<Container maxWidth="sm">
<Box sx={{ bgcolor: '#cfe8fc', height: '100vh' }} ... | 3,740 |
0 | petrpan-code/mui/material-ui/docs/data/system/components | petrpan-code/mui/material-ui/docs/data/system/components/container/SimpleContainer.tsx | import * as React from 'react';
import CssBaseline from '@mui/material/CssBaseline';
import { Box, Container } from '@mui/system';
export default function SimpleContainer() {
return (
<React.Fragment>
<CssBaseline />
<Container maxWidth="sm">
<Box sx={{ bgcolor: '#cfe8fc', height: '100vh' }} ... | 3,741 |
0 | petrpan-code/mui/material-ui/docs/data/system/components | petrpan-code/mui/material-ui/docs/data/system/components/container/SimpleContainer.tsx.preview | <React.Fragment>
<CssBaseline />
<Container maxWidth="sm">
<Box sx={{ bgcolor: '#cfe8fc', height: '100vh' }} />
</Container>
</React.Fragment> | 3,742 |
0 | petrpan-code/mui/material-ui/docs/data/system/components | petrpan-code/mui/material-ui/docs/data/system/components/container/container.md | ---
productId: system
title: React Container component
components: Container
githubLabel: 'component: Container'
---
# Container
<p class="description">The container centers your content horizontally. It's the most basic layout element.</p>
While containers can be nested, most layouts do not require a nested contain... | 3,743 |
0 | petrpan-code/mui/material-ui/docs/data/system/components | petrpan-code/mui/material-ui/docs/data/system/components/grid/AutoGrid.js | import * as React from 'react';
import Box from '@mui/system/Box';
import Grid from '@mui/system/Unstable_Grid';
import styled from '@mui/system/styled';
const Item = styled('div')(({ theme }) => ({
backgroundColor: theme.palette.mode === 'dark' ? '#1A2027' : '#fff',
border: '1px solid',
borderColor: theme.palet... | 3,744 |
0 | petrpan-code/mui/material-ui/docs/data/system/components | petrpan-code/mui/material-ui/docs/data/system/components/grid/AutoGrid.tsx | import * as React from 'react';
import Box from '@mui/system/Box';
import Grid from '@mui/system/Unstable_Grid';
import styled from '@mui/system/styled';
const Item = styled('div')(({ theme }) => ({
backgroundColor: theme.palette.mode === 'dark' ? '#1A2027' : '#fff',
border: '1px solid',
borderColor: theme.palet... | 3,745 |
0 | petrpan-code/mui/material-ui/docs/data/system/components | petrpan-code/mui/material-ui/docs/data/system/components/grid/AutoGrid.tsx.preview | <Grid container spacing={3}>
<Grid xs>
<Item>xs</Item>
</Grid>
<Grid xs={6}>
<Item>xs=6</Item>
</Grid>
<Grid xs>
<Item>xs</Item>
</Grid>
</Grid> | 3,746 |
0 | petrpan-code/mui/material-ui/docs/data/system/components | petrpan-code/mui/material-ui/docs/data/system/components/grid/AutoGridNoWrap.js | import * as React from 'react';
import Box from '@mui/system/Box';
import Grid from '@mui/system/Unstable_Grid';
import styled from '@mui/system/styled';
import Avatar from '@mui/material/Avatar';
import Typography from '@mui/material/Typography';
const Item = styled('div')(({ theme }) => ({
border: '1px solid',
b... | 3,747 |
0 | petrpan-code/mui/material-ui/docs/data/system/components | petrpan-code/mui/material-ui/docs/data/system/components/grid/AutoGridNoWrap.tsx | import * as React from 'react';
import Box from '@mui/system/Box';
import Grid from '@mui/system/Unstable_Grid';
import styled from '@mui/system/styled';
import Avatar from '@mui/material/Avatar';
import Typography from '@mui/material/Typography';
const Item = styled('div')(({ theme }) => ({
border: '1px solid',
b... | 3,748 |
0 | petrpan-code/mui/material-ui/docs/data/system/components | petrpan-code/mui/material-ui/docs/data/system/components/grid/BasicGrid.js | import * as React from 'react';
import Box from '@mui/system/Box';
import Grid from '@mui/system/Unstable_Grid';
import styled from '@mui/system/styled';
const Item = styled('div')(({ theme }) => ({
backgroundColor: theme.palette.mode === 'dark' ? '#1A2027' : '#fff',
border: '1px solid',
borderColor: theme.palet... | 3,749 |
0 | petrpan-code/mui/material-ui/docs/data/system/components | petrpan-code/mui/material-ui/docs/data/system/components/grid/BasicGrid.tsx | import * as React from 'react';
import Box from '@mui/system/Box';
import Grid from '@mui/system/Unstable_Grid';
import styled from '@mui/system/styled';
const Item = styled('div')(({ theme }) => ({
backgroundColor: theme.palette.mode === 'dark' ? '#1A2027' : '#fff',
border: '1px solid',
borderColor: theme.palet... | 3,750 |
0 | petrpan-code/mui/material-ui/docs/data/system/components | petrpan-code/mui/material-ui/docs/data/system/components/grid/BasicGrid.tsx.preview | <Grid container spacing={2}>
<Grid xs={8}>
<Item>xs=8</Item>
</Grid>
<Grid xs={4}>
<Item>xs=4</Item>
</Grid>
<Grid xs={4}>
<Item>xs=4</Item>
</Grid>
<Grid xs={8}>
<Item>xs=8</Item>
</Grid>
</Grid> | 3,751 |
0 | petrpan-code/mui/material-ui/docs/data/system/components | petrpan-code/mui/material-ui/docs/data/system/components/grid/ColumnsGrid.js | import * as React from 'react';
import Box from '@mui/system/Box';
import Grid from '@mui/system/Unstable_Grid';
import styled from '@mui/system/styled';
const Item = styled('div')(({ theme }) => ({
backgroundColor: theme.palette.mode === 'dark' ? '#1A2027' : '#fff',
border: '1px solid',
borderColor: theme.palet... | 3,752 |
0 | petrpan-code/mui/material-ui/docs/data/system/components | petrpan-code/mui/material-ui/docs/data/system/components/grid/ColumnsGrid.tsx | import * as React from 'react';
import Box from '@mui/system/Box';
import Grid from '@mui/system/Unstable_Grid';
import styled from '@mui/system/styled';
const Item = styled('div')(({ theme }) => ({
backgroundColor: theme.palette.mode === 'dark' ? '#1A2027' : '#fff',
border: '1px solid',
borderColor: theme.palet... | 3,753 |
0 | petrpan-code/mui/material-ui/docs/data/system/components | petrpan-code/mui/material-ui/docs/data/system/components/grid/ColumnsGrid.tsx.preview | <Grid container spacing={2} columns={16}>
<Grid xs={8}>
<Item>xs=8</Item>
</Grid>
<Grid xs={8}>
<Item>xs=8</Item>
</Grid>
</Grid> | 3,754 |
0 | petrpan-code/mui/material-ui/docs/data/system/components | petrpan-code/mui/material-ui/docs/data/system/components/grid/CustomBreakpointsGrid.js | import * as React from 'react';
import { ThemeProvider, createTheme } from '@mui/system';
import Box from '@mui/system/Box';
import Grid from '@mui/system/Unstable_Grid';
import styled from '@mui/system/styled';
const Item = styled('div')(({ theme }) => ({
backgroundColor: theme.palette.mode === 'dark' ? '#1A2027' :... | 3,755 |
0 | petrpan-code/mui/material-ui/docs/data/system/components | petrpan-code/mui/material-ui/docs/data/system/components/grid/FullWidthGrid.js | import * as React from 'react';
import Box from '@mui/system/Box';
import Grid from '@mui/system/Unstable_Grid';
import styled from '@mui/system/styled';
const Item = styled('div')(({ theme }) => ({
backgroundColor: theme.palette.mode === 'dark' ? '#1A2027' : '#fff',
border: '1px solid',
borderColor: theme.palet... | 3,756 |
0 | petrpan-code/mui/material-ui/docs/data/system/components | petrpan-code/mui/material-ui/docs/data/system/components/grid/FullWidthGrid.tsx | import * as React from 'react';
import Box from '@mui/system/Box';
import Grid from '@mui/system/Unstable_Grid';
import styled from '@mui/system/styled';
const Item = styled('div')(({ theme }) => ({
backgroundColor: theme.palette.mode === 'dark' ? '#1A2027' : '#fff',
border: '1px solid',
borderColor: theme.palet... | 3,757 |
0 | petrpan-code/mui/material-ui/docs/data/system/components | petrpan-code/mui/material-ui/docs/data/system/components/grid/FullWidthGrid.tsx.preview | <Grid container spacing={2}>
<Grid xs={6} md={8}>
<Item>xs=6 md=8</Item>
</Grid>
<Grid xs={6} md={4}>
<Item>xs=6 md=4</Item>
</Grid>
<Grid xs={6} md={4}>
<Item>xs=6 md=4</Item>
</Grid>
<Grid xs={6} md={8}>
<Item>xs=6 md=8</Item>
</Grid>
</Grid> | 3,758 |
0 | petrpan-code/mui/material-ui/docs/data/system/components | petrpan-code/mui/material-ui/docs/data/system/components/grid/NestedGrid.js | import * as React from 'react';
import Box from '@mui/system/Box';
import Grid from '@mui/system/Unstable_Grid';
import styled from '@mui/system/styled';
const Item = styled('div')(({ theme }) => ({
border: '1px solid',
borderColor: theme.palette.mode === 'dark' ? '#444d58' : '#ced7e0',
borderRadius: '4px',
}));... | 3,759 |
0 | petrpan-code/mui/material-ui/docs/data/system/components | petrpan-code/mui/material-ui/docs/data/system/components/grid/NestedGrid.tsx | import * as React from 'react';
import Box from '@mui/system/Box';
import Grid from '@mui/system/Unstable_Grid';
import styled from '@mui/system/styled';
const Item = styled('div')(({ theme }) => ({
border: '1px solid',
borderColor: theme.palette.mode === 'dark' ? '#444d58' : '#ced7e0',
borderRadius: '4px',
}));... | 3,760 |
0 | petrpan-code/mui/material-ui/docs/data/system/components | petrpan-code/mui/material-ui/docs/data/system/components/grid/OffsetGrid.js | import * as React from 'react';
import Grid from '@mui/system/Unstable_Grid';
import styled from '@mui/system/styled';
const Item = styled('div')(({ theme }) => ({
backgroundColor: theme.palette.mode === 'dark' ? '#1A2027' : '#fff',
border: '1px solid',
borderColor: theme.palette.mode === 'dark' ? '#444d58' : '#... | 3,761 |
0 | petrpan-code/mui/material-ui/docs/data/system/components | petrpan-code/mui/material-ui/docs/data/system/components/grid/OffsetGrid.tsx | import * as React from 'react';
import Grid from '@mui/system/Unstable_Grid';
import styled from '@mui/system/styled';
const Item = styled('div')(({ theme }) => ({
backgroundColor: theme.palette.mode === 'dark' ? '#1A2027' : '#fff',
border: '1px solid',
borderColor: theme.palette.mode === 'dark' ? '#444d58' : '#... | 3,762 |
0 | petrpan-code/mui/material-ui/docs/data/system/components | petrpan-code/mui/material-ui/docs/data/system/components/grid/OffsetGrid.tsx.preview | <Grid container spacing={3} sx={{ flexGrow: 1 }}>
<Grid xs={6} xsOffset={3} md={2} mdOffset={0}>
<Item>1</Item>
</Grid>
<Grid xs={4} md={2} mdOffset="auto">
<Item>2</Item>
</Grid>
<Grid xs={4} xsOffset={4} md={2} mdOffset={0}>
<Item>3</Item>
</Grid>
<Grid xs md={6} mdOffset={2}>
<Item>4</I... | 3,763 |
0 | petrpan-code/mui/material-ui/docs/data/system/components | petrpan-code/mui/material-ui/docs/data/system/components/grid/OverflowGrid.js | import * as React from 'react';
import Box from '@mui/system/Box';
import Grid from '@mui/system/Unstable_Grid';
import styled from '@mui/system/styled';
const Item = styled('div')(({ theme }) => ({
backgroundColor: theme.palette.mode === 'dark' ? '#1A2027' : '#fff',
border: '1px solid',
borderColor: theme.palet... | 3,764 |
0 | petrpan-code/mui/material-ui/docs/data/system/components | petrpan-code/mui/material-ui/docs/data/system/components/grid/OverflowGrid.tsx | import * as React from 'react';
import Box from '@mui/system/Box';
import Grid from '@mui/system/Unstable_Grid';
import styled from '@mui/system/styled';
const Item = styled('div')(({ theme }) => ({
backgroundColor: theme.palette.mode === 'dark' ? '#1A2027' : '#fff',
border: '1px solid',
borderColor: theme.palet... | 3,765 |
0 | petrpan-code/mui/material-ui/docs/data/system/components | petrpan-code/mui/material-ui/docs/data/system/components/grid/ResponsiveGrid.js | import * as React from 'react';
import Box from '@mui/system/Box';
import Grid from '@mui/system/Unstable_Grid';
import styled from '@mui/system/styled';
const Item = styled('div')(({ theme }) => ({
backgroundColor: theme.palette.mode === 'dark' ? '#1A2027' : '#fff',
border: '1px solid',
borderColor: theme.palet... | 3,766 |
0 | petrpan-code/mui/material-ui/docs/data/system/components | petrpan-code/mui/material-ui/docs/data/system/components/grid/ResponsiveGrid.tsx | import * as React from 'react';
import Box from '@mui/system/Box';
import Grid from '@mui/system/Unstable_Grid';
import styled from '@mui/system/styled';
const Item = styled('div')(({ theme }) => ({
backgroundColor: theme.palette.mode === 'dark' ? '#1A2027' : '#fff',
border: '1px solid',
borderColor: theme.palet... | 3,767 |
0 | petrpan-code/mui/material-ui/docs/data/system/components | petrpan-code/mui/material-ui/docs/data/system/components/grid/ResponsiveGrid.tsx.preview | <Grid container spacing={{ xs: 2, md: 3 }} columns={{ xs: 4, sm: 8, md: 12 }}>
{Array.from(Array(6)).map((_, index) => (
<Grid xs={2} sm={4} key={index}>
<Item>{index + 1}</Item>
</Grid>
))}
</Grid> | 3,768 |
0 | petrpan-code/mui/material-ui/docs/data/system/components | petrpan-code/mui/material-ui/docs/data/system/components/grid/RowAndColumnSpacing.js | import * as React from 'react';
import styled from '@mui/system/styled';
import Grid from '@mui/system/Unstable_Grid';
import Box from '@mui/system/Box';
const Item = styled('div')(({ theme }) => ({
backgroundColor: theme.palette.mode === 'dark' ? '#1A2027' : '#fff',
border: '1px solid',
borderColor: theme.palet... | 3,769 |
0 | petrpan-code/mui/material-ui/docs/data/system/components | petrpan-code/mui/material-ui/docs/data/system/components/grid/RowAndColumnSpacing.tsx | import * as React from 'react';
import styled from '@mui/system/styled';
import Grid from '@mui/system/Unstable_Grid';
import Box from '@mui/system/Box';
const Item = styled('div')(({ theme }) => ({
backgroundColor: theme.palette.mode === 'dark' ? '#1A2027' : '#fff',
border: '1px solid',
borderColor: theme.palet... | 3,770 |
0 | petrpan-code/mui/material-ui/docs/data/system/components | petrpan-code/mui/material-ui/docs/data/system/components/grid/RowAndColumnSpacing.tsx.preview | <Grid container rowSpacing={1} columnSpacing={{ xs: 1, sm: 2, md: 3 }}>
<Grid xs={6}>
<Item>1</Item>
</Grid>
<Grid xs={6}>
<Item>2</Item>
</Grid>
<Grid xs={6}>
<Item>3</Item>
</Grid>
<Grid xs={6}>
<Item>4</Item>
</Grid>
</Grid> | 3,771 |
0 | petrpan-code/mui/material-ui/docs/data/system/components | petrpan-code/mui/material-ui/docs/data/system/components/grid/SpacingGrid.js | import * as React from 'react';
import Grid from '@mui/system/Unstable_Grid';
import FormLabel from '@mui/material/FormLabel';
import FormControl from '@mui/material/FormControl';
import FormControlLabel from '@mui/material/FormControlLabel';
import RadioGroup from '@mui/material/RadioGroup';
import Radio from '@mui/ma... | 3,772 |
0 | petrpan-code/mui/material-ui/docs/data/system/components | petrpan-code/mui/material-ui/docs/data/system/components/grid/SpacingGrid.tsx | import * as React from 'react';
import Grid from '@mui/system/Unstable_Grid';
import FormLabel from '@mui/material/FormLabel';
import FormControl from '@mui/material/FormControl';
import FormControlLabel from '@mui/material/FormControlLabel';
import RadioGroup from '@mui/material/RadioGroup';
import Radio from '@mui/ma... | 3,773 |
0 | petrpan-code/mui/material-ui/docs/data/system/components | petrpan-code/mui/material-ui/docs/data/system/components/grid/VariableWidthGrid.js | import * as React from 'react';
import Box from '@mui/system/Box';
import Grid from '@mui/system/Unstable_Grid';
import styled from '@mui/system/styled';
const Item = styled('div')(({ theme }) => ({
backgroundColor: theme.palette.mode === 'dark' ? '#1A2027' : '#fff',
border: '1px solid',
borderColor: theme.palet... | 3,774 |
0 | petrpan-code/mui/material-ui/docs/data/system/components | petrpan-code/mui/material-ui/docs/data/system/components/grid/VariableWidthGrid.tsx | import * as React from 'react';
import Box from '@mui/system/Box';
import Grid from '@mui/system/Unstable_Grid';
import styled from '@mui/system/styled';
const Item = styled('div')(({ theme }) => ({
backgroundColor: theme.palette.mode === 'dark' ? '#1A2027' : '#fff',
border: '1px solid',
borderColor: theme.palet... | 3,775 |
0 | petrpan-code/mui/material-ui/docs/data/system/components | petrpan-code/mui/material-ui/docs/data/system/components/grid/VariableWidthGrid.tsx.preview | <Grid container spacing={3}>
<Grid xs="auto">
<Item>Variable width item</Item>
</Grid>
<Grid xs={6}>
<Item>xs=6</Item>
</Grid>
<Grid xs>
<Item>xs</Item>
</Grid>
</Grid> | 3,776 |
0 | petrpan-code/mui/material-ui/docs/data/system/components | petrpan-code/mui/material-ui/docs/data/system/components/grid/grid.md | ---
productId: system
title: React Grid component
githubLabel: 'component: Grid'
---
# Grid
<p class="description">The responsive layout grid adapts to screen size and orientation, ensuring consistency across layouts.</p>
{{"component": "modules/components/ComponentLinkHeader.js", "design": false}}
The `Grid` compo... | 3,777 |
0 | petrpan-code/mui/material-ui/docs/data/system/components | petrpan-code/mui/material-ui/docs/data/system/components/stack/BasicStack.js | import * as React from 'react';
import Box from '@mui/system/Box';
import Stack from '@mui/system/Stack';
import { styled } from '@mui/system';
const Item = styled('div')(({ theme }) => ({
backgroundColor: theme.palette.mode === 'dark' ? '#262B32' : '#fff',
padding: theme.spacing(1),
textAlign: 'center',
borde... | 3,778 |
0 | petrpan-code/mui/material-ui/docs/data/system/components | petrpan-code/mui/material-ui/docs/data/system/components/stack/BasicStack.tsx | import * as React from 'react';
import Box from '@mui/system/Box';
import Stack from '@mui/system/Stack';
import { styled } from '@mui/system';
const Item = styled('div')(({ theme }) => ({
backgroundColor: theme.palette.mode === 'dark' ? '#262B32' : '#fff',
padding: theme.spacing(1),
textAlign: 'center',
borde... | 3,779 |
0 | petrpan-code/mui/material-ui/docs/data/system/components | petrpan-code/mui/material-ui/docs/data/system/components/stack/BasicStack.tsx.preview | <Stack spacing={2}>
<Item>Item 1</Item>
<Item>Item 2</Item>
<Item>Item 3</Item>
</Stack> | 3,780 |
0 | petrpan-code/mui/material-ui/docs/data/system/components | petrpan-code/mui/material-ui/docs/data/system/components/stack/DirectionStack.js | import * as React from 'react';
import Stack from '@mui/system/Stack';
import { styled } from '@mui/system';
const Item = styled('div')(({ theme }) => ({
backgroundColor: theme.palette.mode === 'dark' ? '#262B32' : '#fff',
padding: theme.spacing(1),
textAlign: 'center',
borderRadius: 4,
}));
export default fu... | 3,781 |
0 | petrpan-code/mui/material-ui/docs/data/system/components | petrpan-code/mui/material-ui/docs/data/system/components/stack/DirectionStack.tsx | import * as React from 'react';
import Stack from '@mui/system/Stack';
import { styled } from '@mui/system';
const Item = styled('div')(({ theme }) => ({
backgroundColor: theme.palette.mode === 'dark' ? '#262B32' : '#fff',
padding: theme.spacing(1),
textAlign: 'center',
borderRadius: 4,
}));
export default fu... | 3,782 |
0 | petrpan-code/mui/material-ui/docs/data/system/components | petrpan-code/mui/material-ui/docs/data/system/components/stack/DirectionStack.tsx.preview | <Stack direction="row" spacing={2}>
<Item>Item 1</Item>
<Item>Item 2</Item>
<Item>Item 3</Item>
</Stack> | 3,783 |
0 | petrpan-code/mui/material-ui/docs/data/system/components | petrpan-code/mui/material-ui/docs/data/system/components/stack/DividerStack.js | import * as React from 'react';
import Box from '@mui/system/Box';
import Stack from '@mui/system/Stack';
import { styled } from '@mui/system';
const Item = styled('div')(({ theme }) => ({
backgroundColor: theme.palette.mode === 'dark' ? '#262B32' : '#fff',
padding: theme.spacing(1),
textAlign: 'center',
borde... | 3,784 |
0 | petrpan-code/mui/material-ui/docs/data/system/components | petrpan-code/mui/material-ui/docs/data/system/components/stack/DividerStack.tsx | import * as React from 'react';
import Box from '@mui/system/Box';
import Stack from '@mui/system/Stack';
import { styled } from '@mui/system';
const Item = styled('div')(({ theme }) => ({
backgroundColor: theme.palette.mode === 'dark' ? '#262B32' : '#fff',
padding: theme.spacing(1),
textAlign: 'center',
borde... | 3,785 |
0 | petrpan-code/mui/material-ui/docs/data/system/components | petrpan-code/mui/material-ui/docs/data/system/components/stack/FlexboxGapStack.js | import * as React from 'react';
import Stack from '@mui/system/Stack';
import Box from '@mui/system/Box';
import { styled } from '@mui/system';
const Item = styled('div')(({ theme }) => ({
backgroundColor: theme.palette.mode === 'dark' ? '#262B32' : '#fff',
padding: theme.spacing(1),
textAlign: 'center',
borde... | 3,786 |
0 | petrpan-code/mui/material-ui/docs/data/system/components | petrpan-code/mui/material-ui/docs/data/system/components/stack/FlexboxGapStack.tsx | import * as React from 'react';
import Stack from '@mui/system/Stack';
import Box from '@mui/system/Box';
import { styled } from '@mui/system';
const Item = styled('div')(({ theme }) => ({
backgroundColor: theme.palette.mode === 'dark' ? '#262B32' : '#fff',
padding: theme.spacing(1),
textAlign: 'center',
borde... | 3,787 |
0 | petrpan-code/mui/material-ui/docs/data/system/components | petrpan-code/mui/material-ui/docs/data/system/components/stack/FlexboxGapStack.tsx.preview | <Stack spacing={{ xs: 1, sm: 2 }} direction="row" useFlexGap flexWrap="wrap">
<Item>Item 1</Item>
<Item>Item 2</Item>
<Item>Long content</Item>
</Stack> | 3,788 |
0 | petrpan-code/mui/material-ui/docs/data/system/components | petrpan-code/mui/material-ui/docs/data/system/components/stack/InteractiveStack.js | import * as React from 'react';
import FormControl from '@mui/material/FormControl';
import FormLabel from '@mui/material/FormLabel';
import FormControlLabel from '@mui/material/FormControlLabel';
import Paper from '@mui/material/Paper';
import RadioGroup from '@mui/material/RadioGroup';
import Radio from '@mui/materia... | 3,789 |
0 | petrpan-code/mui/material-ui/docs/data/system/components | petrpan-code/mui/material-ui/docs/data/system/components/stack/InteractiveStack.tsx | import * as React from 'react';
import FormControl from '@mui/material/FormControl';
import FormLabel from '@mui/material/FormLabel';
import FormControlLabel from '@mui/material/FormControlLabel';
import Paper from '@mui/material/Paper';
import RadioGroup from '@mui/material/RadioGroup';
import Radio from '@mui/materia... | 3,790 |
0 | petrpan-code/mui/material-ui/docs/data/system/components | petrpan-code/mui/material-ui/docs/data/system/components/stack/ResponsiveStack.js | import * as React from 'react';
import Stack from '@mui/system/Stack';
import { styled } from '@mui/system';
const Item = styled('div')(({ theme }) => ({
backgroundColor: theme.palette.mode === 'dark' ? '#262B32' : '#fff',
padding: theme.spacing(1),
textAlign: 'center',
borderRadius: 4,
}));
export default fu... | 3,791 |
0 | petrpan-code/mui/material-ui/docs/data/system/components | petrpan-code/mui/material-ui/docs/data/system/components/stack/ResponsiveStack.tsx | import * as React from 'react';
import Stack from '@mui/system/Stack';
import { styled } from '@mui/system';
const Item = styled('div')(({ theme }) => ({
backgroundColor: theme.palette.mode === 'dark' ? '#262B32' : '#fff',
padding: theme.spacing(1),
textAlign: 'center',
borderRadius: 4,
}));
export default fu... | 3,792 |
0 | petrpan-code/mui/material-ui/docs/data/system/components | petrpan-code/mui/material-ui/docs/data/system/components/stack/ResponsiveStack.tsx.preview | <Stack
direction={{ xs: 'column', sm: 'row' }}
spacing={{ xs: 1, sm: 2, md: 4 }}
>
<Item>Item 1</Item>
<Item>Item 2</Item>
<Item>Item 3</Item>
</Stack> | 3,793 |
0 | petrpan-code/mui/material-ui/docs/data/system/components | petrpan-code/mui/material-ui/docs/data/system/components/stack/stack.md | ---
productId: system
title: React Stack component
components: Stack
githubLabel: 'component: Stack'
---
# Stack
<p class="description">Stack is a container component for arranging elements vertically or horizontally.</p>
## Introduction
The Stack component manages the layout of its immediate children along the ver... | 3,794 |
0 | petrpan-code/mui/material-ui/docs/data/system | petrpan-code/mui/material-ui/docs/data/system/display/Block.js | import * as React from 'react';
import Box from '@mui/material/Box';
export default function Block() {
return (
<div style={{ width: '100%' }}>
<Box
component="span"
sx={{
display: 'block',
p: 1,
m: 1,
bgcolor: (theme) => (theme.palette.mode === 'dark... | 3,795 |
0 | petrpan-code/mui/material-ui/docs/data/system | petrpan-code/mui/material-ui/docs/data/system/display/Block.tsx | import * as React from 'react';
import Box from '@mui/material/Box';
export default function Block() {
return (
<div style={{ width: '100%' }}>
<Box
component="span"
sx={{
display: 'block',
p: 1,
m: 1,
bgcolor: (theme) => (theme.palette.mode === 'dark... | 3,796 |
0 | petrpan-code/mui/material-ui/docs/data/system | petrpan-code/mui/material-ui/docs/data/system/display/Hiding.js | import * as React from 'react';
import Box from '@mui/material/Box';
export default function Hiding() {
return (
<div style={{ width: '100%' }}>
<Box
sx={{
display: { xs: 'block', md: 'none' },
m: 1,
fontSize: '0.875rem',
fontWeight: '700',
}}
>... | 3,797 |
0 | petrpan-code/mui/material-ui/docs/data/system | petrpan-code/mui/material-ui/docs/data/system/display/Hiding.tsx | import * as React from 'react';
import Box from '@mui/material/Box';
export default function Hiding() {
return (
<div style={{ width: '100%' }}>
<Box
sx={{
display: { xs: 'block', md: 'none' },
m: 1,
fontSize: '0.875rem',
fontWeight: '700',
}}
>... | 3,798 |
0 | petrpan-code/mui/material-ui/docs/data/system | petrpan-code/mui/material-ui/docs/data/system/display/Inline.js | 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,799 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.