From 389e71525794a2aac31dc66bfd288148cabb5569 Mon Sep 17 00:00:00 2001 From: Joe Vilches Date: Tue, 12 Mar 2024 11:31:46 -0700 Subject: [PATCH] Add align content documentation (#1605) Summary: Pull Request resolved: https://github.com/facebook/yoga/pull/1605 tsia Reviewed By: yungsters Differential Revision: D54782553 fbshipit-source-id: a65aaa754ea98a8dfe3b581a7cdb06dddf35f64a --- website-next/docs/examples/align-content.mdx | 33 ++++++++++++++++++-- 1 file changed, 30 insertions(+), 3 deletions(-) diff --git a/website-next/docs/examples/align-content.mdx b/website-next/docs/examples/align-content.mdx index 5b2215b8..e3e8c211 100644 --- a/website-next/docs/examples/align-content.mdx +++ b/website-next/docs/examples/align-content.mdx @@ -6,10 +6,37 @@ import Playground from '@site/src/components/Playground'; # Align Content +Align content defines the distribution of lines along the cross-axis. This only +has effect when items are wrapped to multiple lines using [`flex wrap`](/docs/examples/flex-wrap). + +**Flex start (default)**: Align wrapped lines to the start of the container's cross axis. + +**Flex end**: Align wrapped lines to the end of the container's cross axis. + +**Stretch**: Stretch wrapped lines to match the `height` of the container's cross axis. + +**Center**: Align wrapped lines in the center of the container's cross axis. + +**Space between**: Evenly space wrapped lines across the container's main axis, distributing +remaining space between the lines. + +**Space around**: Evenly space wrapped lines across the container's main axis, distributing +remaining space around the lines. Compared to `space between` using +`space around` will result in space being distributed to the begining of +the first lines and end of the last line. + - + style={{ + width: 250, + height: 250, + padding: 10, + alignContent: 'flex-start', + flexWrap: 'wrap' + }}> + + + + `} />