Foundation is the permanent core of wire-core: the layer nothing above it may
change and everything above it is built from. A field, a column, an action and a
widget are different objects that answer the same questions — what is your label,
your icon, your colour, your size, are you visible — and they answer them with
the same traits, which is why the vocabulary is worth learning once.
Concerns (Traits)
Component Configuration
Trait
Methods
Description
HasLabel
label($label), translateLabel(), getLabel()
Display label
HasDescription
description($text), getDescription()
Description text
HasHelperText
helperText($text), getHelperText()
Helper text below field
HasHint
hint($text), hintIcon($icon), getHint()
Hint text/icon
HasName
name($name), getName()
Identifier name
HasDefault
default($value), getDefault()
Default value
HasIcon
icon($name, $position), getIcon()
Icon by name (pencil, or prefix:name)
HasColor
color($color), getColor()
Tailwind color name
HasSize
size($size), getSize()
Size variant (sm/md/lg/xl)
HasColumns
columnSpan($span), columnStart($start)
Grid column layout
HasExtraAttributes
extraAttributes(array $attrs)
Arbitrary HTML attributes
HasSortOrder
sort($position), getSort()
Position in a rendered list — a menu entry, a menu group. Not query sorting (Column::sortable())
Button/badge CSS classes come from the canonical HasColor resolvers (see
Canonical color resolvers), not from a
per-component map. HasButtonStyles remains only as a deprecated alias.
Closure Evaluation
All configuration methods accept both scalar values and Closures: