fields

Field component generators for different JSON Schema types.

source

create_label


def create_label(
    prop:SchemaProperty, # SchemaProperty object
)->FT: # Label component

Create a label for a field.


source

create_description


def create_description(
    prop:SchemaProperty, # SchemaProperty object
)->Optional: # P component with description or None

Create a description/help text for a field.


source

create_string_field


def create_string_field(
    prop:SchemaProperty, # SchemaProperty object
    value:Any=None, # Current value
)->FT: # Div containing the field

Create a string input field.


source

create_enum_field


def create_enum_field(
    prop:SchemaProperty, # SchemaProperty object
    value:Any=None, # Current value
)->FT: # Div containing the field

Create an enum select dropdown field.


source

create_number_field


def create_number_field(
    prop:SchemaProperty, # SchemaProperty object
    value:Any=None, # Current value
)->FT: # Div containing the field

Create a number input field.


source

create_range_field


def create_range_field(
    prop:SchemaProperty, # SchemaProperty object
    value:Any=None, # Current value
)->FT: # Div containing the field

Create a range slider field.


source

create_boolean_field


def create_boolean_field(
    prop:SchemaProperty, # SchemaProperty object
    value:Any=None, # Current value
)->FT: # Div containing the field

Create a boolean toggle field.


source

create_field


def create_field(
    prop:SchemaProperty, # SchemaProperty object
    value:Any=None, # Current value
)->FT: # Div containing the field

Create an appropriate field based on the property type.