Axonyx UI

settings-01

A responsive Foundry settings form with a real server validation boundary. This public demo never saves data.

Workspace settings

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

Settings

Compose identity and preferences with native, accessible form controls.

General

Required. Use public sample text in this demo.

The connected server action must validate this identifier.

Preferences

Preferences are submitted as values; this demo does not change the site's palette or send notifications.

The default GET preview exposes values in the URL. Never submit secrets here. Set method="post" and action to an authorized handler for production writes.

Danger zone

Destructive operations stay separate
Archive and deletion require a separate authorized, confirmed action.
View code
Code
asx
import { Settings01 } from "@axonyx/ui/blocks/settings-01"

<Settings01
  id="workspace-settings"
  method="post"
  action={action ValidateSettings}
  submitLabel="Validate settings"
/>

No accepted request yet.

Install

Code
ax
cargo ax add block settings-01

Import

Code
ax
import { Settings01 } from "@axonyx/ui/blocks/settings-01"

<Settings01 />

Application composition

Package owned

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.

app/blocks/settings-01/actions.ax
ax
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()
}