You are currently viewing outdated (<=3.x) Chameleon documentation on our old website. For version >=4.x, check out our new website.

Current release: 3.5.0 | hub

components

Paper (code)

A Paper exists to group content and display it in a relative depth from where it resides on. It's an extension of Box.

Faster than my shadow
import { Paper } from '@mediahuis/chameleon-react'

Props

NameTypeDefaultRequiredDescription
asFunctionStringNodeObject'div'-Render with a different HTML tag or a different custom component.
borderRadius01234567891011'fill''sides'--Sets the css border-radius property, maps on spacing values + fill, + sides.
childrenNode--Contents displayed within the paper.
classNameString--Extend classNames.
display'inline''block''flex''grid''inline-block''inline-flex''inline-grid''inline-table''list-item''run-in''table''table-caption''table-column-group''table-header-group''table-footer-group''table-row-group''table-cell''table-column''table-row''none''initial''inherit''block'-Changes the Paper's display property.
elevation-101231-Elevation value between -1 and 3
hoverableBooleanfalse-If set to true, the shadow will interact on hover.

System Props

System Props

Next to the properties listed in the propstable, a collection of system props can be added to any component for further general styling and layouting purposes. These props vary per component.

To read more about the system, click here to check out its dedicated page.

Elevation

default: 1

To increase the paper's relative depth, you can alter the elevation prop.

Elevation 1
Elevation 0
Elevation 1
Elevation 2
Elevation 2

Hoverable

default: false

To indicate to users that a paper has an action or a link bound to it, you can add a hoverable prop. This will increase the paper's depth when a user mouses over it.

This paper is not hoverable
This paper is hoverable
  • Paper extends the Box component, this means every functionality available on Box is applicable on Paper as well.

© Copyright 2020 Mediahuis NV. All rights Reserved