Skip to the content

Paper

Paper is the flex surface: a Flex-like container that also carries a background, border, shadow and typography. Defaults are p="medium", borderRadius="micro", bgColor="surface.paper" and deep={2}, all overridable. Use Paper for anything the user looks at; keep Flex for structure.
Layout & Surfaces

When to use

Use when
  • A block must stand out from the page: panels, dashboard tiles, inline sheets.
  • You need a background, border or depth shadow from the theme scale.
  • A surface must change by slot or viewport width, including its bgColor or deep.
Avoid when
  • The block only arranges children — use Flex.
  • The content has a title, media and actions — use Card.

Usage

Paper with its defaults
<Paper>
  <Text text="Paper with its defaults" />
</Paper>

Depth

deep takes eight levels, from -1 (inset) to 6. deepColor tints the shadow with a theme color. flat drops the background and the shadow while keeping the other defaults; an explicit bgColor or deep still wins.

loading

Avoid stacking several high deep values close together; it adds noise instead of hierarchy.

Show or hide by slot width

display defaults to flex as a prop value, so display="none" and a cq / viewportMedias display override it. Make the window narrower than 640px to hide the second sheet.

Always shown
Shown from lg (640px) up
<Flex containment="inline-size" flexDirection="row">
  <Paper>…</Paper>
  <Paper display="none" cq={{ lg: { display: 'flex' } }}>
    …
  </Paper>
</Flex>

Theming

The default ground surface.paper is lighter than the page canvas in both light and dark mode, and text inside resolves against it. See Dark Mode to override the surface roles.

Accessibility

  • Paper renders a <div> with no role. Use as (section, article) when the surface is a landmark or a unit of content.
  • The shadow is decorative: do not rely on deep alone to convey state.

Properties

Paper takes the layout props plus the surface props (bgColor, border, deep, deepColor), typography, motion, flat and the native <div> attributes. Annotate a layout object as PaperProps when it sets as.

See also