diff --git a/components/content/examples/box/AirBnbBox.vue b/components/content/examples/box/AirBnbBox.vue new file mode 100644 index 0000000..ce0cd46 --- /dev/null +++ b/components/content/examples/box/AirBnbBox.vue @@ -0,0 +1,50 @@ + + + \ No newline at end of file diff --git a/components/content/examples/box/AsBox.vue b/components/content/examples/box/AsBox.vue new file mode 100644 index 0000000..987166d --- /dev/null +++ b/components/content/examples/box/AsBox.vue @@ -0,0 +1,5 @@ + \ No newline at end of file diff --git a/components/content/examples/box/SimpleBox.vue b/components/content/examples/box/SimpleBox.vue new file mode 100644 index 0000000..2782a7d --- /dev/null +++ b/components/content/examples/box/SimpleBox.vue @@ -0,0 +1,11 @@ + + + diff --git a/content/4.components/box.md b/content/4.components/box.md new file mode 100644 index 0000000..53492b2 --- /dev/null +++ b/content/4.components/box.md @@ -0,0 +1,108 @@ +--- +title: Box +description: Box component +version: 2.0+ +--- +# Box + +Box is the most abstract component on top of which all other `@chakra-ui/vue` components are built. By default, it renders a `div` element + +## Import +```js +import { CBox } from "@chakra-ui/vue-next" +``` + +## Usage + +The Box component is useful because it helps with three common use cases: +- Create responsive layouts with ease. +- Provide a shorthand way to pass styles via props (`bg` instead of `backgroundColor`). +- Compose new component and allow for override using the `as` prop. + +::showcase +:simple-box +:: + + +```html + + This is the Box + +``` + +## Composition with `CBox` + +::showcase +:air-bnb-box{width=full} +:: + +```html + + + +``` + +## as prop + +You can use the `as` prop to change the element render, just like styled-components. + +::showcase +:as-box{width-full} +:: + +```html + + Button + +``` + +## Props + +See all `CBox` props in the [Style props page](/styled-system/style-props) \ No newline at end of file