Constraints
Component-level constraints enforced by the json-render catalog. Violating these causes validation to fail and the snap to not render.
Component Constraints
| Component | Prop | Constraint |
|---|---|---|
badge | label | Min 1, max 30 chars |
button | label | Min 1, max 30 chars |
item | title | Min 1, max 100 chars |
item | description | Max 160 chars |
progress | value | Finite number, 0 to max |
progress | max | Finite number > 0 |
progress | label | Max 60 chars |
text | content | Min 1, max 320 chars |
input | name | Min 1 char |
input | maxLength | 1 to 280 |
input | label | Max 60 chars |
input | placeholder | Max 60 chars |
slider | min | Must be ≤ max |
slider | max | Must be ≥ min |
slider | step | Finite number > 0 |
slider | defaultValue | Must be between min and max |
slider | label | Max 60 chars |
switch | name | Min 1 char |
switch | label | Max 60 chars |
toggle_group | options | Min 2, max 6 items. Each max 30 chars |
toggle_group | label | Max 60 chars |
image | url | HTTPS URL. jpg, png, gif, webp only |
bar_chart | bars | Min 1, max 6 items |
bar_chart | bars[].label | Min 1, max 40 chars |
bar_chart | bars[].value | Must not exceed max (if set) |
cell_grid | cols | 2 to 32 |
cell_grid | rows | 2 to 16 |
cell_grid | cells[].row | 0 to rows - 1 |
cell_grid | cells[].col | 0 to cols - 1 |
cell_grid | rowHeight | 8 to 64 |
Response Constraints
| Constraint | Limit |
|---|---|
version | Must be "1.0" |
theme.accent | Must be a named palette color |
ui.root | Must be an ID present in ui.elements |
submit target URL | HTTPS in production; http://localhost valid in dev |
| POST response timeout | 5 seconds |
Validation
Schema validation runs at render time. If the snap response fails validation, the snap does not render — the cast falls back to showing the URL as plain text.
URL Validation
For submit, open_url, and open_mini_app actions, params.target must use
HTTPS in production. As an exception for local development and emulators,
http:// is allowed when the host is loopback only: localhost, 127.0.0.1, or
IPv6 loopback ([::1] / ::1). Non-loopback HTTP targets are invalid.
No javascript: URIs.