Setting Types
Every editable control in FilamentCraft — whether it lives in a section's settings panel or a theme's template-settings panel — is declared with a small PHP DSL. Each control is a Setting subclass under FilamentCraft\Settings\Types, instantiated with a make('id') call and configured fluently:
use FilamentCraft\Settings\Types\Text;
Text::make('heading')
->label('Heading')
->default('Welcome')
->required();The editor compiles each Setting into a real Filament v4 form component at runtime, so the inputs you get are the same battle-tested fields Filament renders everywhere else — wired up for FilamentCraft's live-preview bus.

Setting declaration, grouped with Group dividers.The 18 built-in types
| Type | Class | Page |
|---|---|---|
| Text | Text | Text inputs |
| Textarea | Textarea | Text inputs |
| Number | Number | Text inputs |
| Range | Range | Text inputs |
| Select | Select | Choice inputs |
| Radio | Radio | Choice inputs |
| Checkbox | Checkbox | Choice inputs |
| Enum buttons | EnumButtons | Choice inputs |
| Color | Color | Color inputs |
| Color scheme | ColorScheme | Color inputs |
| Color scheme group | ColorSchemeGroup | Color inputs |
| Font | Font | Font picker |
| Image | Image | Media & content |
| Icon | Icon | Media & content |
| Link | Link | Media & content |
| Rich text | RichText | Media & content |
| Group | Group | Layout & structure |
| Category | Category | Layout & structure |
Shared API (every type)
All setting types inherit the same base methods from FilamentCraft\Settings\Setting:
| Method | Purpose |
|---|---|
make(string $id) | Construct the setting. The id must match /^[a-z0-9_][a-z0-9_-]*$/i. |
label(string $label) | The field label shown in the editor. |
default(mixed $value) | The value used until the user changes it. |
info(string $text) | Helper text rendered under the field. |
required(bool $value = true) | Mark the field required. |
visibleIf(array $predicates) | Show the field only when other fields match — e.g. ->visibleIf(['cta_enabled' => true]). |
cssVar(string $name, ?string $unit = null) | Bind the value to a CSS custom property in <style id="fc-tokens">. The optional unit is appended to numeric values. |
cssVar() is what makes a setting themeable: the resolved value is written to :root as a CSS variable so your section Blade and theme CSS can read it. See Theme Authoring for the full token pipeline.
Range::make('button_radius')
->cssVar('--button-radius', 'px')
->min(0)->max(24)->default(8);
// emits: --button-radius: 8px;Live-update behaviour
When a setting changes in the editor, FilamentCraft pushes the change to the preview iframe. The SchemaCompiler chooses one of two Livewire live modes per type — you never configure this, it is automatic:
- Instant
live()— fires on every change. Used for discrete, one-click inputs:Checkbox,Radio,EnumButtons,Select,ColorScheme,Font,Icon. - Lazy
live(onBlur: true)— defers the round-trip until the field loses focus. Used for typed/dragged/uploaded inputs where a half-finished value shouldn't trigger a re-render:Text,Textarea,Number,Range,Color,Image,Link,RichText.
The lazy mode matters most for RichText: Filament v4's TipTap editor throws if the surrounding DOM is morphed mid-keystroke, so the round-trip is deferred to blur.
Where settings are used
- In a section — return them from the static
settings()method. See Custom Sections. Section settings can also mix in raw Filament v4 components (e.g.Toggle,ColorPicker) alongside the DSL. - In a theme — return them from
settingsSchema(), usually wrapped inCategorygroups. See Theme Authoring.
