Appearance
Address Component
A component for structured address information. When you see "kind": "address" in a component, it represents an address field with continent, country, state, and city fields organized hierarchically.
Understanding Address Component Fields
When reading an address component in the schema, you'll see these fields:
| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Unique identifier for this address field |
kind | string | Yes | Always "address" for address components |
metadata | object | No | Component-specific metadata (empty object) |
rules | object | No | Validation rules |
rules.required | boolean | No | If true, the field must be provided |
Understanding Address Structure
The address value is an object with four hierarchical fields. Fields are typically selected in order (continent → country → state → city), where selecting a parent field may filter available options for child fields.
| Field | Type | Description |
|---|---|---|
continent | string | Continent name (e.g., "Europe") |
country | string | Country name (e.g., "Turkey") |
state | string | State or province name (e.g., "Istanbul") |
city | string | City name (e.g., "Istanbul") |
Note: Fields are hierarchical - selecting a continent may filter available countries, selecting a country may filter available states, etc.
Reading Metadata
The address component currently has no specific metadata fields. If metadata is present, it will be an empty object {} and can be ignored.
Understanding Validation Rules
rules.required
- What it means: If
true, the address must be provided. Validation fails if the address object isnullor incomplete - How to use: Mark the address field as required in your form UI
- Note: The
requiredrule applies to the entire address object. Individual fields (continent, country, state, city) cannot be independently required
Example: Reading an Address Component
json
{
"id": "address",
"kind": "address"
}What this tells you:
- Field ID is
"address"- use this to reference the field - Field is optional (no
requiredrule) - Render a hierarchical address selector (continent → country → state → city)
Example: Required Address Component
json
{
"id": "shippingAddress",
"kind": "address",
"rules": {
"required": true
}
}What this tells you:
- Field ID is
"shippingAddress" - Field is required
Notes
- Address fields are typically populated through cascading dropdowns or search interfaces
- The component does not include street address, postal code, or other detailed address fields - these should be handled by separate text components if needed
- Address validation (format, existence) should be handled at the application level, not in the schema