Skip to main content

CustomInput

Custom HTML input widget for creating custom interactive components.

Signature

def CustomInput(
html_body: str,
key: str = None,
required: bool = True,
label: str = '',
html_head: str = '',
height: int = 200,
css: str = '',
js: str = '',
full_width: bool = False,
change_event: Callable = None,
errors: Union[List[str], str] = None
)

Parameters

NameDescriptionTypeDefault
html_body (required)HTML content for the body of the custom component.strNone
keyIdentifier for the widget, defaults to hash of html_body if not provided.strNone
requiredWhether the input must be filled before proceeding.boolTrue
labelText label displayed above the component.str''
html_headHTML content for the head section.str''
heightHeight of the component in pixels.int200
cssCSS styles for the component.str''
jsJavaScript code for the component.str''
full_widthWhether the component should take up the full width of its container.boolFalse
change_eventFunction to process value changes before storing.CallableNone
errorsPre-defined validation error messages to display.Union[List[str], str]None