Skip to content

Enums reference

Lattice uses backed enums for the fixed vocabularies that appear in builders — alignments, gaps, variants, operators, and so on. Each is generated to a TypeScript union too, so the PHP value and the client type can’t drift. The string value in parentheses is what ends up on the wire.

The case lists below are generated by reflecting over the real enums, so this page can never fall behind the code.

Lattice\Ui\Enums — the vocabulary for arranging components, used by Stack and the other layout primitives.

EnumCases (value)
AlignCenter (center), Left (left), Start (start), Stretch (stretch)
BreakpointDefault (default), Sm (sm), Md (md), Lg (lg), Xl (xl), Xxl (2xl)
JustifyStart (start), Center (center), End (end), Between (between), Around (around), Evenly (evenly)
GapNone (none), ExtraSmall (xs), Small (sm), Medium (md), Large (lg), ExtraLarge (xl)
WidthFull (full), Auto (auto), Small (sm), Medium (md), Large (lg), ExtraLarge (xl), Fill (fill)
HeightFull (full), Screen (screen)
ColumnWidthXs (xs), Sm (sm), Md (md), Lg (lg), Xl (xl)
ModalWidthSm (sm), Md (md), Lg (lg), Xl (xl), Xl2 (2xl), Xl3 (3xl)
ModalHeightSm (sm), Md (md), Lg (lg), Xl (xl), Xl2 (2xl), Xl3 (3xl)
OrientationHorizontal (horizontal), Vertical (vertical)
StackDirectionRow (row), Column (column)
PlacementTop (top), Bottom (bottom), Right (right)
FloatingPlacementBottomEnd (bottom-end), BottomStart (bottom-start), TopEnd (top-end), TopStart (top-start)
PopoverSideTop (top), Right (right), Bottom (bottom), Left (left)
PopoverAlignStart (start), Center (center), End (end)
SideStart (start), End (end)
TabsAlignmentStart (start), Center (center), End (end), Stretch (stretch)

Lattice\Core\Enums — how a page frames itself and which layout it renders into.

EnumCases (value)
PageLayoutApp (app), Auth (auth), None (none)
PageWidthFull (full), ExtraLarge (xl), Large (lg), Medium (md), Small (sm)

Sizing lives in Lattice\Ui\Enums; the color vocabulary lives in Lattice\Core\Enums and backs the Color value object.

EnumNamespaceCases (value)
SizeUi\EnumsXs (xs), Sm (sm), Md (md), Lg (lg), Xl (xl), Xl2 (2xl), Xl3 (3xl), Xl4 (4xl)
ColorNameCore\EnumsDefault (default), Muted (muted), Primary (primary), Success (success), Info (info), Warning (warning), Danger (danger), Gray (gray), Red (red), Orange (orange), Yellow (yellow), Green (green), Blue (blue), Purple (purple)
ColorKindCore\EnumsNamed (named), Css (css)

The icon names a Lattice\Ui\Enums\Icon accepts are the enum’s own cases — one per bundled SVG. The Icons page covers where they come from and how to add your own.

Lattice\Ui\Enums\CodeBlockLanguage — the built-in syntax languages accepted by a CodeBlock component.

EnumCases (value)
CodeBlockLanguageText (text), Json (json), JavaScript (javascript), Shell (shell), Php (php)

Lattice\Ui\Enums

EnumCases (value)
VariantPrimary (primary), Secondary (secondary), Success (success), Info (info), Warning (warning), Danger (danger)
EmphasisSolid (solid), Outline (outline), Ghost (ghost), Link (link)
ButtonTypeButton (button), Submit (submit), Reset (reset)

Variant is used by toasts and callouts.

Lattice\Ui\Enums\HttpMethod — the request method used by links, forms, and actions.

EnumCases (value)
HttpMethodGet (get), Post (post), Put (put), Patch (patch), Delete (delete)

Lattice\Core\Enums\Op — the shared comparison vocabulary used by both form conditions and table filters.

EnumCases (value)
OpContains (contains), StartsWith (starts_with), EndsWith (ends_with), Equals (eq), NotEquals (neq), GreaterThan (gt), GreaterThanOrEqual (gte), LessThan (lt), LessThanOrEqual (lte), In (in), NotIn (not_in), Before (before), After (after), Empty (empty), Filled (filled)

Lattice\Table\Enums — column types, alignment, width, filtering, and pagination for tables.

EnumCases (value)
ColumnTypeText (column.text), Boolean (column.boolean), Number (column.number), Money (column.money), Stack (column.stack), Badge (column.badge), Icon (column.icon), Image (column.image)
ColumnAlignStart (start), Center (center), End (end)
ColumnPinLeft (left), Right (right)
FilterTypeText (text), Number (number), Date (date), Boolean (boolean)
FilterControlSelect (filter.select), Ternary (filter.ternary), DateRange (filter.date-range), Toggle (filter.toggle)
PaginationTypeNone (none), Simple (simple), Table (table), Infinite (infinite)
SortDirectionAsc (asc), Desc (desc)

The row layout and built-in row actions used by the repeater and builder fields, plus the field-type vocabulary.

EnumNamespaceCases (value)
FieldTypeForm\EnumsBuilder (field.builder), Checkbox (field.checkbox), Choice (field.choice), ColorPicker (field.color-picker), DateInput (field.date-input), DateTimeInput (field.date-time-input), FileUpload (field.file-upload), HiddenInput (field.hidden-input), NumberInput (field.number-input), Otp (field.otp), PasswordInput (field.password-input), PatternInput (field.pattern-input), Repeater (field.repeater), RichEditor (field.rich-editor), Select (field.select), Textarea (field.textarea), TextInput (field.text-input), TimeInput (field.time-input), Toggle (field.toggle)
RowActionTypeForm\EnumsDuplicate (duplicate), Remove (remove)
RowLayoutForm\EnumsStack (stack), Table (table)

Lattice\Ui\Enums — the entry-type vocabulary of the description list.

EnumCases (value)
EntryTypeBadge (entry.badge), Boolean (entry.boolean), Component (entry.component), Date (entry.date), Text (entry.text)

Lattice\Ui\Enums — date/time and number formatting options shared by UI components and tables.

EnumCases (value)
DateTimeStyleFull (full), Long (long), Medium (medium), Short (short)
NumberFormatUnitPercent (percent), Kilogram (kilogram), Gram (gram), Kilometer (kilometer), Meter (meter), Byte (byte), Kilobyte (kilobyte), Megabyte (megabyte), Gigabyte (gigabyte), Millisecond (millisecond), Second (second), Minute (minute), Hour (hour), Celsius (celsius), Fahrenheit (fahrenheit)

Lattice\Ui\Enums — the series shapes a Chart component can render.

EnumCases (value)
ChartSeriesTypeArea (area), Bar (bar), Distribution (distribution), Gauge (gauge), Line (line), Pie (pie)

Lattice\Ui\Enums — the bar and circle variants of the progress component.

EnumCases (value)
ProgressShapeBar (bar), Circle (circle)

Lattice\Ui\Enums — the outline an avatar is clipped to.

EnumCases (value)
AvatarShapeCircle (circle), Rounded (rounded)

Lattice\Chat\Enums — the message roles and part kinds used by the chat components.

EnumCases (value)
ChatRoleUser (user), Assistant (assistant), System (system)
ChatPartTypeText (chat.part.text), ToolCall (chat.part.tool-call)

Lattice\Realtime\Enums — the broadcast channel visibility a page listener subscribes to.

EnumCases (value)
ChannelVisibilityPublic (public), Private (private), Presence (presence)