Forms#

@palmyralabs/rt-forms-mantine · src/palmyra/mantine/form/ — Mantine-skinned input widgets. Every component is a thin forwardRef wrapper that:

  1. Calls useFieldManager(props.attribute, props) to register itself with the enclosing PalmyraForm.
  2. Renders a Mantine primitive inside <FieldDecorator> for consistent label + layout.
  3. Exposes an imperative ref with at least focus() plus field-specific helpers.
  4. Renders nothing when the field manager marks it invisible (mutateOptions.visible === false).

Common props#

Every widget accepts the same base shape from @palmyralabs/rt-forms (FieldOptions) plus layout and styling hooks:

Prop Type Purpose
attribute string Required — field path in the form data (must match backend @PalmyraField)
label string? Label text rendered above or beside the field
title string? Alternative/accessible title
required boolean? Marks the field as required + applies validation
defaultValue any? Initial value when the form has no hydrated data
readOnly boolean? Disables the field but keeps it in the form payload
colspan number? Column span inside a FieldGroupContainer
className string? Custom class on the inner Mantine primitive
customContainerClass string? Class on the outer FieldDecorator wrapper
customLabelClass string? Class on the label
customFieldClass string? Class on the field slot
fieldProps { size?: 'small' | 'medium' | 'large' }? Density hint forwarded to the Mantine primitive
validation validRule?, regExp?, invalidMessage?, etc. (from FieldOptions) Declarative validators

Every component also passes through its underlying Mantine component’s props — e.g. MantineTextField accepts TextInputProps (placeholder, variant, radius, …), MantineSelect accepts SelectProps, and so on.

Widgets#

Text & numeric

Boolean

Choice

Range

Date & time

Server-backed

View-Only — read-only variants for detail screens

  • MantineTextView · MantineDateView · MantineOptionsView · MantineLookupView · MantineINRView

Not re-exported from the barrel: MantineColorInput and MantineCalendar exist on disk but require deep imports. MantineTriStateCheckBox is re-exported via ext/TriStateCheckBox rather than directly from form/.