Skip to main content

Default Options

The defaultOptions property of your component.config.json file will set defaults for your component options. Anytime an instance of your component renders, the defaults will be set as attributes on the component.

Example

component.config.json
{
"nodeName": "my-sample-component",
"title": "My Sample Component",
"description": "This is a sample component I am using for docs.",
"defaultOptions": {
"text": "Enter Content Here..."
}
}

The above component, based on its defaultOptions property, will render as shown below until the text property is overwritten/set elsewhere.

<my-sample-component text="'Enter Content Here...'"></my-sample-component>