$props
The $props
special helper allows a component to access the properties passed to it by its parent. This is useful for managing dynamic data within components.
Example
<component :title="'Dynamic Title'" :visible="true">
<p>This element receives props.</p>
</component>
const Component = DOMY.createComponent({
props: ['!title', 'visible'],
html: `
<div>
<h1 d-text="$props.title"></h1>
<p d-if="$props.visible">This is conditionally rendered based on props.</p>
</div>
`
});