tuix-paper

The surface primitive for background, elevation and corner radius.

tuix-paper is the card behind everything else. It owns the surface colour so light and dark stay consistent; put content in the default slot. It adds no padding of its own.

Loading the components…

Elevation

In light mode the surface is white and the elevation is a shadow; in dark mode there is no shadow and the elevation is a lighter surface. Toggle the theme in the sidebar to see both.

Loading the components…
ValueAttributeLight shadowDark background
PaperElevation.VARIANT_00none#121212
PaperElevation.VARIANT_110 1px 4pxrgb(23 23 26)
PaperElevation.VARIANT_220 2px 8pxrgb(26 26 31)
PaperElevation.VARIANT_330 4px 16pxrgb(29 29 36)
PaperElevation.VARIANT_440 7px 24pxrgb(33 33 40)

The shadow colour is Palette.SHADOW (rgba(66, 79, 101, 0.16)).

Border radius

BorderRadiusPaper is a convenience, not a constraint: the value is applied to border-radius exactly as given, so the attribute takes any CSS value: border-radius="12px" and border-radius="50%" both work in plain HTML. The property is typed with the enum, though, so in TypeScript (including the React wrapper's borderRadius prop) only the four members below compile.

Loading the components…
ValueAttribute
BorderRadiusPaper.NONE0px
BorderRadiusPaper.SOFT4px
BorderRadiusPaper.MEDIUM10px
BorderRadiusPaper.STRONG20px

API

Properties

PropertyAttributeTypeDefaultDescription
elevationelevationPaperElevation1Shadow depth in light mode, surface colour in dark mode
borderRadiusborder-radiusBorderRadiusPaper0pxCorner radius; the attribute takes any CSS value
darkdarkbooleanfalseDark palette

Slots

SlotContent
defaultThe card content. tuix-paper adds no padding, so the content carries its own

Notes

tuix-toast and tuix-modal are built on tuix-paper at elevation 4 with a 4px radius, which is the house style for anything floating.

On this page