settings-01
A responsive Foundry settings form with a real server validation boundary. This public demo never saves data.
A responsive Foundry settings form with a real server validation boundary. This public demo never saves data.
Submit valid values to see success. Use admin as the project slug to see a server field error. Required and email constraints also work in the browser.
Workspace control
Compose identity and preferences with native, accessible form controls.
import { Settings01 } from "@axonyx/ui/blocks/settings-01"
<Settings01
id="workspace-settings"
method="post"
action={action ValidateSettings}
submitLabel="Validate settings"
/>No accepted request yet.
cargo ax add block settings-01import { Settings01 } from "@axonyx/ui/blocks/settings-01"
<Settings01 />Navigation, grouped controls, error targets and action status UI belong to the package. The route owns validation. No site-specific JavaScript is needed.
The default block performs a GET preview, not a save. This page explicitly connects a POST action that validates public sample values and returns ok(). No database, account or session settings are changed.
Use a unique id per instance. JavaScript enhances pending, error and complete statuses; without JavaScript the native POST follows the server response.
Without JavaScript a rejected request re-renders field errors, but current form values reset to the initial sample values. This demo requires the compiled server; the preview interpreter does not support all validation expressions yet.
Production writes require authentication, authorization, CSRF protection and persistence in your own action. A completed request does not mean data was saved.
action ValidateSettings(workspace: String, slug: String, email: String, theme: String, timezone: String) {
require input.workspace != "" else invalid({workspace: "Workspace name is required."})
require input.slug != "" else invalid({slug: "Project slug is required."})
require input.slug != "admin" else invalid({slug: "The demo reserves the slug admin. Choose another slug."})
require Validate.email(input.email) else invalid({email: "Enter a valid email address."})
require input.theme in ["silver", "bronze", "gold"] else invalid({theme: "Choose a supported palette."})
require input.timezone in ["Europe/Belgrade", "UTC", "America/New_York"] else invalid({timezone: "Choose a supported timezone."})
patch settingsValidation = "Last accepted request: validated only, no data saved."
return ok()
}