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

Placeholder (code)

Use a placeholder when you want to reserve space in a specific aspect-ratio

import { Placeholder } from '@mediahuis/chameleon-react'

Props

NameTypeDefaultRequiredDescription
appearance'placeholder''plain''placeholder'-The type of background of the Placeholder.
aspectRatioString'16:9'-The aspect ratio of the Placeholder. Is in the notation {number}:{number}. E.g. 4:3, 16:9, 21:9
childrenNode--Content for component
classNameString--Extend classNames.

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.

Appearance (usage with transparent content)

default: placeholder

When using transparent content, it's better to replace the appearance of the Placeholder when the content is loaded to plain one. This will prevent seeing the placeholder trough the transparent content.

Children

default: undefined

© Copyright 2020 Mediahuis NV. All rights Reserved