forked from mui/material-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ce992b8
commit e86e944
Showing
3 changed files
with
59 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
--- | ||
productId: joy-ui | ||
title: React Box | ||
components: Box | ||
githubLabel: 'component: Box' | ||
--- | ||
|
||
# Box | ||
|
||
<p class="description">The Box component serves as a wrapper component for most of the CSS utility needs.</p> | ||
|
||
## Introduction | ||
|
||
The Box component is a generic component that offers all the style functions exposed in [`@mui/system`](/system/getting-started/). | ||
|
||
Demo here | ||
|
||
## Basics | ||
|
||
```jsx | ||
import Box from '@mui/joy/Box'; | ||
``` | ||
|
||
The Box differs slightly from other Joy UI components as it doesn't support the props you'd expect such as `variant`, `color`, and `size`. | ||
|
||
That's because it's a component based on the MUI System, a collection of CSS utilities for rapidly laying out custom designs. | ||
|
||
Demo here | ||
|
||
## Customization | ||
|
||
### The sx prop | ||
|
||
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 properties that are unique to MUI System | ||
|
||
Demo here | ||
|
||
### The component prop | ||
|
||
Demo here | ||
|
||
### System props | ||
|
||
Demo here | ||
|
||
## Anatomy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import * as React from 'react'; | ||
import MarkdownDocs from 'docs/src/modules/components/MarkdownDocs'; | ||
import * as pageProps from 'docs/data/joy/components/box/box.md?@mui/markdown'; | ||
|
||
export default function Page() { | ||
return <MarkdownDocs {...pageProps} />; | ||
} |