fields
Field component generators for different JSON Schema types.
create_label
def create_label(
prop:SchemaProperty, # SchemaProperty object
)->FT: # Label component
Create a label for a field.
create_description
def create_description(
prop:SchemaProperty, # SchemaProperty object
)->Optional: # P component with description or None
Create a description/help text for a field.
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.
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.
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.
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.
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.
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.