fields

Field component generators for different JSON Schema types.

source

create_label

 create_label (prop:cjm_fasthtml_jsonschema.core.types.SchemaProperty)

Create a label for a field.

Type Details
prop SchemaProperty SchemaProperty object
Returns FT Label component

source

create_description

 create_description
                     (prop:cjm_fasthtml_jsonschema.core.types.SchemaProper
                     ty)

Create a description/help text for a field.

Type Details
prop SchemaProperty SchemaProperty object
Returns Optional P component with description or None

source

create_string_field

 create_string_field
                      (prop:cjm_fasthtml_jsonschema.core.types.SchemaPrope
                      rty, value:Any=None)

Create a string input field.

Type Default Details
prop SchemaProperty SchemaProperty object
value Any None Current value
Returns FT Div containing the field

source

create_enum_field

 create_enum_field
                    (prop:cjm_fasthtml_jsonschema.core.types.SchemaPropert
                    y, value:Any=None)

Create an enum select dropdown field.

Type Default Details
prop SchemaProperty SchemaProperty object
value Any None Current value
Returns FT Div containing the field

source

create_number_field

 create_number_field
                      (prop:cjm_fasthtml_jsonschema.core.types.SchemaPrope
                      rty, value:Any=None)

Create a number input field.

Type Default Details
prop SchemaProperty SchemaProperty object
value Any None Current value
Returns FT Div containing the field

source

create_range_field

 create_range_field
                     (prop:cjm_fasthtml_jsonschema.core.types.SchemaProper
                     ty, value:Any=None)

Create a range slider field.

Type Default Details
prop SchemaProperty SchemaProperty object
value Any None Current value
Returns FT Div containing the field

source

create_boolean_field

 create_boolean_field
                       (prop:cjm_fasthtml_jsonschema.core.types.SchemaProp
                       erty, value:Any=None)

Create a boolean toggle field.

Type Default Details
prop SchemaProperty SchemaProperty object
value Any None Current value
Returns FT Div containing the field

source

create_field

 create_field (prop:cjm_fasthtml_jsonschema.core.types.SchemaProperty,
               value:Any=None)

Create an appropriate field based on the property type.

Type Default Details
prop SchemaProperty SchemaProperty object
value Any None Current value
Returns FT Div containing the field