Skip to content
Shamar

Schemas overview

Shared schema chrome on forms and infolists.

Shamar schemas mirror Filament 5 (and Orbit’s layout/prime components): one layout tree for both forms and infolists. Leaves stay typed (TextInput, TextEntry, …); chrome is shared (Section, Tabs, Wizard, …).

import {
Section, Fieldset, Grid, Group, Flex,
Tabs, Tab, Wizard, Step,
Callout, Text, Placeholder, EmptyState,
TextInput,
} from '@shamar/core'
static form(form: FormBuilder) {
return form.schema([
Section.make('Basics').columns(2).schema([
TextInput.make('name').required(),
Callout.make('Tip').info().description('Shown beside fields.'),
]),
])
}
static infolist(infolist: InfolistBuilder) {
return infolist.schema([
Section.make('Profile').schema([
TextEntry.make('name'),
Text.make('Additional notes live in the same tree.'),
]),
])
}
Component Role
Section Card with heading, icon, collapsible body
Fieldset Legend + bordered group (transparent by default)
Grid Column layout without card chrome
Group Unstyled wrapper
Flex Responsive row/column split
Tabs / Tab Horizontal or vertical tabbed panels
Wizard / Step Multi-step UI (horizontal or vertical)
Callout Status banner (info / success / warning / danger)
Text Freeform prose in the schema
Placeholder Labeled static slot
EmptyState Empty / placeholder block

Field controls live under Forms. Detail entries live under Infolists.

Most layout components inherit these modifiers:

Common layout methods

MethodDescription
.schema([...])Nested layout nodes and/or field/entry leaves.
.heading(text) / .description(text)Title and supporting copy.
.columns(1|2|3|4)Child grid columns.
.card(bool) / .contained(bool)Elevated card chrome (defaults vary by component).
.collapsible() / .collapsed()Section-style collapse (Section and compatible chrome).
.dense() / .gap(bool)Tighter spacing; omit gaps between children.
.columnSpan(n) / .columnSpanFull()Span inside a parent grid.
.extraAttributes(attrs)Pass-through HTML attributes on the root node.
Filament / Orbit idea Shamar
Schemas\Components\Section Section
Fieldset Fieldset
Grid / Group / Flex Same names
Tabs + Tab (+ vertical) Tabs.vertical()
Wizard + Step (+ vertical) Wizard.vertical()
Text / static content Text, Placeholder
Callout / empty state Callout, EmptyState
Orbit “prime” layouts Same builders; panel discovery under app/panels/…

Playground: Form components, Settings (Tabs), Tickets (schema + actions).