useWorkspaceSettingsForm() to provide type-safe form components, ensuring that each component (like TextInput, NumberInput, or Toggle) can only reference fields with matching types in the schema (e.g., TextInput can only reference Settings.string() fields).
File Location
The settings schema must be defined in a file atsrc/app.settings.ts. This file location is required and cannot be changed.
Structure
app.settings.ts
Available Setting Types
TheSettings object provides the following types:
Settings.string()
Defines a string setting. Use this for text values like names, URLs, or identifiers.Settings.boolean()
Defines a boolean setting. Use this for toggles, checkboxes, or on/off configurations.Settings.number()
Defines a numeric setting. Use this for counts, durations, or other numerical values.Complete Example
app.settings.ts
Using the Schema
Once you’ve defined your schema, you can use it in your workspace settings form:workspace-settings.tsx