Flex

A component for creating flex layouts.

No props data available for Flex.

Use the direction prop to set the flex direction. You can change it across breakpoints using the object syntax.

Use the align prop to set the alignment of the flex items across the flex direction. Use the justify prop to control how space is distributed between items along the flex direction.

You can change the values across breakpoints using the object syntax.

We do not plan to implement props for align-self and justify-self. UI code tends to be easier to understand and debug when parent components control the layout. Nesting Flex elements is the way to go when you need different alignment within one container.

Use the wrap prop to control whether the flex items wrap to the next line. You can change the wrapping behaviour across breakpoints using the object syntax.

Use the gap prop to set spacing between flex items. You can change the gap across breakpoints using the object syntax.

In the spirit of lifting layout responsibilities onto parent components, consider spacing elements using Flex with the gap prop instead of margins on the individual items.

Context

Usage

Used 2687 times across 2 packages

Dashboard
2314
Admin Portal
373

Variant Distribution

align

center
92%
start
6%
stretch
1%
end
1%
baseline
0%

justify

between
35%
end
34%
center
29%
start
2%

direction

column
96%
row
4%

gap

0
0%
1
10%
2
43%
3
16%
4
19%
5
9%
6
2%
7
0%
8
0%
2px
0%
1px
0%
6px
0%

wrap

wrap
100%

position

relative
63%
absolute
25%
sticky
6%
fixed
6%

Where it's used

714 files

/branding/edit

packages/dashboard/src/app/(private)/(chromeless)/branding/edit/edit-branding.tsx58
packages/dashboard/src/components/get-started/get-started.tsx41
packages/dashboard/src/components/authentication/configure-email-password-dialog.tsx30
packages/dashboard/src/components/organizations/organization/domain-policy-dialog.tsx21
packages/dashboard/src/components/directory-sync/directory-group-sync/allow-list-v2.tsx20
packages/dashboard/src/components/emails/providers/manage-custom-email-provider-dialog.tsx17
packages/dashboard/src/legacy-pages/settings/billing.tsx17
packages/dashboard/src/components/authentication/configure-session/configure-sessions-dialog.tsx16
packages/dashboard/src/components/emails/providers/configure-custom-email-provider-dialog.tsx16

/p/:portalSessionId/directory-sync/:directoryId/google-workspace/filter-groups-v2

packages/admin-portal/src/app/p/[portalSessionId]/directory-sync/[directoryId]/google-workspace/filter-groups-v2/filter-groups-section.tsx29

Show 704 more files