Element

Element renders a DOM tree that is represented by JSON

Examples

Basic usage

The default Strawberry theme exports button styles to get you started quickly. Import the button module to include the styles.

<script> import { Element } from '@kwangure/strawberry/default/element'; const element = { type: 'p', props: { style: 'font-style: italic; color: red;', }, children: ['I am a dynamically generated red <p/> tag element.'], }; </script> <Element {element}/>

I am a dynamically generated red <p/> tag element.