Paper

The Paper component builds on the Color and Container components. Adds box-shadow, padding and border-radius. Border radius and padding could be set with size property from preset of the theme size variations. The elevation property can be used to set the box-shadow individually by choosing from the shadows preset for the theme. For the Color component there is a color property and a variant property too.

Props

Props of the Color | Container components are also available.
NameTypeDefaultDescription
childrennodeThe content of the component.
elevationinteger2Values 1, 2, 3, 4, 6, 8, 12, 16, 24 were specified in the default theme. With outlined variant can't use this property.
variantstring - inherit, paper, text, contained, outlinedpaperThe variant to use.
sizestring - none, small, default, large, extra-largedefaultSet border-radius and padding from presets were specified in the theme.
borderRadiusstringSet custom border-radius
arrowboolfalseDraw arrow with a html element to the Paper top, the Popover component detect it automatically
arrowStyleobjectCustom arrow styles
enableContentContainerboolfalseAdding a parent div container for the children. For this container max-width style set to 100%
ContentComponentelement type or a stringThe component used for the parent node for the children. A string to use an internal paper layout eg.:'Modal', 'Card', 'Drawer', other strings for a HTML element. Or use a Component.
ComponentComponentPropsobjectPassing props to the ContentComponent
The ref is forwarded to the root Color element.

Examples

Default

Paper 1

Paper 2

Paper 3

Primary

The elevation property can be used to set the box-shadow individually by choosing from the shadows preset for the theme. Default is 2.

Elevation 0

Default

Elevation 4

Elevation 8

Border radius and padding could be set with size property from preset of the theme size variations.

Small

Default

Large

Extra

This example shows the color and variant inheritance.

This example shows the color and variant inheritance

The color all case inheriting between Papers

But variant inherited only after setup

The variant inheriting between Papers

These were used, for example, for the buttons

Of course every inheritance is . For inline buttons use paperVariant property, but for other components just set up variant like this contained button with secondary color

Arrow

Paper with arrow for Popover

Paper with arrow for Popover

Paper with arrow for Popover

Modal layout

Modal title

The modals shows up with this layout...

Cards
Lorem ipsum dolor sit amet, consectetur adipiscing
1072 Budapest
2023/01/01
1072 Budapest
Featured
Label
Lorem ipsum dolor sit amet, consectetur adipiscing
Place
1072 Budapest
Date
2023/01/01
Label title
1072 Budapest