Box

The fundamental building block.

No props data available for Box.

Use the display prop to specify the layout behaviour. You can change it across breakpoints using the object syntax.

We do not plan to create a component that combines block, flex, and grid display values, as this usually leads to messy layouts. Sensibly composing Box, Flex, and Grid components is the key to creating even the most complex responsive layouts.

Use the position, inset, top, bottom, left, and right props to create positioned elements. You can also change these values across breakpoints using the object syntax.

The position offset props don’t support space scale values like "1", "2", "3", … , encouraging the separation of layout concerns. Use margin and padding props to achieve a similar result.

Use the width and height props to specify the Box size.

As usual, the numerical values "1", "2", "3", … , correspond to the space scale steps.

Use the shrink and grow props to control the size of elements in a flex container.

Use the p, py, px, pt, pb, pl, and pr props to add padding around elements.

Combine padding and margin props to increase the clickable area of links.

Context

Usage

Used 900 times across 2 packages

Dashboard
700
Admin Portal
200

Variant Distribution

position

relative
53%
absolute
43%
sticky
3%
fixed
3%

Where it's used

334 files

/:environmentId/authentication

packages/dashboard/src/app/(private)/(sidebar)/[environmentId]/authentication/authentication-legacy.tsx52
packages/dashboard/src/components/connections/connection-sessions/session-details.tsx27
packages/dashboard/src/components/test-sso/diagram.tsx24
packages/dashboard/src/components/users/user-details.tsx23
packages/dashboard/src/components/get-started/get-started.tsx18
packages/dashboard/src/components/onboarding-flows/branding-onboarding-step-content.tsx11

/branding/edit

packages/dashboard/src/app/(private)/(chromeless)/branding/edit/edit-branding.tsx17

/p/:portalSessionId/log-streams/:logStreamId/completed/components/edit/details

packages/admin-portal/src/app/p/[portalSessionId]/log-streams/[logStreamId]/completed/components/edit/details/edit-azure-sentinel-details-dialog.tsx15
packages/admin-portal/src/app/p/[portalSessionId]/log-streams/[logStreamId]/completed/components/edit/details/edit-s3-details-dialog.tsx13
packages/admin-portal/src/app/p/[portalSessionId]/log-streams/[logStreamId]/completed/components/edit/details/edit-generic-https-details-dialog.tsx11

Show 324 more files