Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4d7dde1

Browse files
committed
docs: rework
1 parent 647af3e commit 4d7dde1

File tree

1 file changed

+19
-5
lines changed

1 file changed

+19
-5
lines changed

apps/www/content/docs/components/aspect-ratio.mdx

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,27 @@ Here's an example of applying a responsive aspect ratio to a box.
5555

5656
<ExampleTabs name="aspect-ratio-responsive" />
5757

58+
## Guide
59+
60+
### Aspect Ratio Token
61+
62+
Chakra UI also provides
63+
[predefined aspect ratio tokens](/docs/theming/aspect-ratios) out of the box,
64+
including `square`, `landscape`, `portrait`, `wide`, `ultrawide`, and `golden`
65+
that can only be used in the `aspectRatio` CSS prop.
66+
67+
:::note
68+
69+
They cannot be used with the `ratio` prop that `AspectRatio` accepts.
70+
71+
:::
72+
73+
```tsx
74+
<Box aspectRatio="square" />
75+
```
76+
5877
## Props
5978

6079
These props can be passed to the `AspectRatio` component.
6180

6281
<PropTable component="AspectRatio" part="AspectRatio" />
63-
Chakra UI also provides [predefined aspect ratio
64-
tokens](/docs/theming/aspect-ratios) out of the box, including `square`,
65-
`landscape`, `portrait`, `wide`, `ultrawide`, and `golden` that can be used with
66-
components that support the `aspectRatio` CSS prop. They cannot currently be
67-
used with the `ratio` prop that `AspectRatio` accepts.

0 commit comments

Comments
 (0)