Skip to contents

Creates a web component instance associated with the given inputId with the given HTML and state. For reusable components, it is adviced to use registerWebComponent() and useWebComponent() instead.

Usage

component(inputId, innerHTML, defaultState = list(), ...)

Arguments

inputId

The `input` slot that will be used to access the value.

innerHTML

The HTML structure of the component.

defaultState

Initial state for the component.

...

Named attributes to update and corresponding values.

Value

A HTML tagList.