Skip to content

[Layout foundations] Update Box component docs and guidance #6902

@laurkim

Description

@laurkim

Update Box docs

  • Description
  • Examples: descriptions and visuals
  • Add related components section
Update
Description Box is the most primitive layout component. It’s a way to access Polaris design tokens.
Default description By default, box has no padding, borders, background, or shadows, and border radius is set to zero.
Color description Background color of box and text color inside a box can be adjusted using the Color tokens.
Border description Border width can be adjusted using the Shape tokens, and a subset of tokens allows different types of border.
Border radius description Border radius can be adjusted using the Shape tokens.
Padding description Padding can be added to either all sides, left, right, top, and bottom, using the Spacing tokens.
Shadow description Shadow can be applied using the Shadow token. The base is --p-shadow-base.
Related components For more specific use cases, use the Card component.

Before and after
Image

LInk to Figma

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions