Skip to main content

RichContent: React

RichContent is a component that wraps around some HTML or other components.

Installation

Before you can start using the @mediahuis/chameleon-react component, you’ll need to install it, for more information check: Getting started for developers.

With that done, you’re now ready to implement the component in your application.

import { RichContent } from '@mediahuis/chameleon-react';

export default function Example() {
return (
<RichContent>
<p>Example</p>
<strong>Strong Example</strong>
</RichContent>
);
}

Properties

PropertyTypeDefaultRequiredDescription
asElementType'div'NoSpecifies the rendered HTML tag or a different custom component to be used.
classNameString-NoAllows extending the class names of the RichContent component.
styleStyleProps-NoAdditional inline styles to be applied to the component. The value should be an object following the inline style syntax.