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.When to use
- 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
bgColorordeep.
Usage
<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.
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.
<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
Paperrenders a<div>with no role. Useas(section,article) when the surface is a landmark or a unit of content.- The shadow is decorative: do not rely on
deepalone 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.