Docs /Mason

04-kinds.md

Field kinds

Each field in a brick has a kind that decides how authors enter its value and how it renders.

Kind Stores Settings
Text string placeholder, max length
Textarea string placeholder, rows, max length
Rich text formatted HTML toolbar preset (Basic / Standard / Full)
Number number min, max, step
URL string placeholder, max length
Email string placeholder, max length
Toggle on / off —
Select one value options
Multi-select list of values options
Radio one value options
Checkboxes list of values options
Button group one value options
Color hex color allowed (any / swatches), default color, swatches
Range / slider number min, max, step
Date date —
Link url + text + target —
Grid rows columns (see Grid)
Relationship related entries channels, min, max
Listing (channel query) a live loop of channel entries channel, limit, offset, order by, sort, link prefix, filter field
File / Asset file reference directory, allowed types (all / images)
Entry entry reference — (legacy single-ID input; prefer Relationship)

Options (select, multi-select, radio, checkboxes, button group)

Two modes, toggled in the field's settings:

  • Simple list — a comma-separated list where the value and label are the same, e.g. info, warning, success.
  • Value / Label — a stored value plus a friendlier author-facing label per row (like EE's value/label pairs). The front-end {brick:field} tag outputs the stored value.

Color

  • Allowed — Any color (a free picker) or Swatches only (authors pick from a fixed palette).
  • Default color — used when the author leaves it empty (applied at render too).
  • Swatches — the palette shown in Swatches mode.

Rich text

The toolbar setting picks how many formatting tools authors get:

  • Basic — bold, italic, link
  • Standard — + underline, strikethrough, headings (H2/H3), bullet & numbered lists
  • Full — + inline code, H4, text alignment (left/center/right), blockquote, horizontal rule, subscript/superscript, abbreviation, text color, highlight, and the per-block class / style tools

Per-block class & style (Full toolbar). The .class and style tools apply a freeform CSS class or inline style to the block the cursor is in (a <p>, heading, quote, or list) — rendered straight onto that element (<p class="lead" style="color:#e00">). An inline style on the element itself reliably overrides theme rules that a class on a wrapping element can't out-specify. Leave the prompt empty to clear.

Abbreviation (Full toolbar). Select a term such as RSS, choose the dotted-Ab button and type what it stands for; the site gets <abbr title="Really Simple Syndication">RSS</abbr>. Put the cursor back inside it to change the expansion, or leave the prompt empty to remove it. A title isn't reliably announced by screen readers, so still spell a term out on first use.

File

  • Directory — restrict uploads/selection to one upload destination (or Any directory).
  • Allowed — All file types or Images only.

Listing (channel query)

Turns a field into a live loop of channel entries, resolved at render time — so a brick can list real content (a portfolio grid, a blog list, a category index) that a static template couldn't produce on its own. It renders as a loop, exactly like Grid and Relationship.

  • Channel — which channel to list.
  • Limit / Offset — how many entries, and where to start.
  • Order by — entry date, title, url title, or edit date. Sort — ascending / descending.
  • Link prefix — builds each row's url as <prefix>/<url_title> (e.g. /work → /work/my-project).
  • Filter field (optional) — a relationship field's short name on the listed channel (e.g. portfolio_categories). Setting this gives authors a category picker on the brick itself, so the same listing brick can be dropped on several pages and pointed at a different category each time. Leave blank and the listing always shows everything.

When a filter field is set, the brick shows a Filter control next to the listing summary. The picker searches only the channel that relationship field points at, so authors see categories rather than every entry on the site. Choosing one narrows that instance of the listing; clearing it goes back to listing all entries.

Each choice shows how many entries it would actually return, and a choice with none is flagged — so an empty listing is visible as a filter with nothing behind it rather than looking like a broken brick. The count stays on the chip after choosing.

If a category reads 0 entries, nothing in the listed channel is related to it via the filter field. The listing will render empty; that's the filter working, not a fault.

Each row exposes id, title, url_title, url, a formatted date, plus every custom field on the entry by its short name (files resolve to a URL). See Templating → Listing.

Per-field settings (all kinds)

Every field, whatever its kind, also has:

  • Width — how wide the field sits in the brick: 25 / 50 / 75 / 100% (a four-bar selector; default 100%). Narrower fields tile side by side.
  • Make conditional — show the field only when other fields in the same brick meet conditions you set ("show this field if all / any of these are true"), mirroring EE's conditional fields. Hidden fields keep any stored value but render nothing.
  • Tab — which of the brick's tabs the field appears under (see Creating bricks).