Quick Start
Framework:
Introduction
This chapter will guide you through the basic features of Schema FormX in 5 minutes. We will demonstrate the simplest usage and help you complete the basic configuration, so you can quickly understand the core capabilities of Schema FormX.
Schema FormX is a declarative form solution that quickly builds complex form interfaces through configuration-driven approach.
Installation
Install Schema FormX into your project:
Example
The following is a user registration form example comprehensively demonstrating the core features of Schema FormX:
- Grouped Form: Use
GroupSchemato organize fields into "Basic Info", "Contact", and "Account Settings" groups, with a customFormGroupcomponent rendering group titles - Multiple Field Types:
string(name, email),number(age),boolean(agreement checkbox) - Custom Components: Use the
componentproperty to specifySelect,Checkbox, etc. - Dependency Linkage: Selecting a country automatically updates city options (
deps+onDepsChange) - Dynamic Visibility: Selecting "Enterprise" shows the company name field, "Personal" hides it (
hidden) - Validation:
requiredvalidation and customvalidatorfunctions - Instance Methods: Call
validate()andreset()viaref - Controlled Mode: External control of form data via
data+onChange - Real-time Preview: Live JSON display of current form data at the bottom
Core Concepts: Controlled vs Uncontrolled
Schema FormX supports two data management modes: