Getting Started
Forms
This document provides an overview of all user interface elements supported by Kodosumi. The elements are organized into three main categories: Input Elements, Action Elements, and Content Elements.
1. Input Elements
Input elements are used to collect user data through various input methods.
Text Input (InputText
)
- Type:
text
- Purpose: Single-line text input
- Properties:
name
: Field identifier (required)label
: Display labelvalue
: Initial valuerequired
: Whether the field is mandatoryplaceholder
: Placeholder textsize
: Input field sizepattern
: Regex pattern for validation
Password Input (InputPassword
)
- Type:
password
- Purpose: Secure password input with masked characters
- Properties:
name
: Field identifier (required)label
: Display labelvalue
: Initial valuerequired
: Whether the field is mandatoryplaceholder
: Placeholder textsize
: Input field sizemin_length
: Minimum password lengthmax_length
: Maximum password lengthpattern
: Regex pattern for password validationshow_toggle
: Option to show/hide password (boolean)
Number Input (InputNumber
)
- Type:
number
- Purpose: Numeric input with validation
- Properties:
- All properties from
InputText
min_value
: Minimum allowed valuemax_value
: Maximum allowed valuestep
: Step increment for number input
- All properties from
Text Area (InputArea
)
- Type:
textarea
- Purpose: Multi-line text input
- Properties:
name
: Field identifier (required)label
: Display labelvalue
: Initial valuerequired
: Whether the field is mandatoryplaceholder
: Placeholder textrows
: Number of visible text linescols
: Width of the text areamax_length
: Maximum number of characters allowed
Date Input (InputDate
)
- Type:
date
- Purpose: Date selection input
- Properties:
name
: Field identifier (required)label
: Display labelvalue
: Initial date valuerequired
: Whether the field is mandatoryplaceholder
: Placeholder textmin_date
: Minimum allowed date (YYYY-MM-DD)max_date
: Maximum allowed date (YYYY-MM-DD)
Time Input (InputTime
)
- Type:
time
- Purpose: Time selection input
- Properties:
name
: Field identifier (required)label
: Display labelvalue
: Initial time valuerequired
: Whether the field is mandatoryplaceholder
: Placeholder textmin_time
: Minimum allowed time (HH:MM)max_time
: Maximum allowed time (HH:MM)step
: Time increment in seconds
Date-Time Input (InputDateTime
)
- Type:
datetime-local
- Purpose: Combined date and time selection
- Properties:
name
: Field identifier (required)label
: Display labelvalue
: Initial date-time valuerequired
: Whether the field is mandatoryplaceholder
: Placeholder textmin_datetime
: Minimum allowed date-time (YYYY-MM-DDTHH:MM)max_datetime
: Maximum allowed date-time (YYYY-MM-DDTHH:MM)step
: Time increment in seconds
Checkbox (Checkbox
)
- Type:
boolean
- Purpose: Boolean toggle input
- Properties:
name
: Field identifier (required)option
: Display text for the checkboxlabel
: Optional labelvalue
: Initial state (true/false)
Select (Select
)
- Type:
select
- Purpose: Dropdown selection
- Properties:
name
: Field identifier (required)option
: List ofInputOption
objectslabel
: Display labelvalue
: Selected option value
Input Option (InputOption
)
- Type:
option
- Purpose: Individual option for Select elements
- Properties:
name
: Option value (required)label
: Display text for the optionvalue
: Whether this option is selected
- Usage: Used within
Select
elements to define available choices
2. Action Elements
Action elements are used to trigger form submission or navigation.
Submit (Submit
)
- Type:
submit
- Purpose: Form submission button
- Properties:
text
: Button label text
Cancel (Cancel
)
- Type:
cancel
- Purpose: Cancel form and return to home
- Properties:
text
: Button label text
Action (Action
)
- Type:
action
- Purpose: Custom action button
- Properties:
name
: Action identifiervalue
: Action valuetext
: Button label text
3. Content Elements
Content elements are used to structure and display information within the form.
HTML (HTML
)
- Type:
html
- Purpose: Raw HTML content
- Properties:
text
: HTML content to render
Markdown (Markdown
)
- Type:
markdown
- Purpose: Markdown-formatted content
- Properties:
text
: Markdown content to render
- Features:
- Supports extra markdown features
- Code highlighting
- Table of contents
- Fenced code blocks
Break (Break
)
- Type:
html
(specialized) - Purpose: Visual spacing element
- Properties: None
- Renders as:
<div class="space"></div>
Errors (Errors
)
- Type:
errors
- Purpose: Display
_global_
form validation errors - Properties:
error
: List of error messages
- Features:
- Global error display
- Styled error container
- Bold error text