Forms#
@palmyralabs/rt-forms-mantine · src/palmyra/mantine/form/ — Mantine-skinned input widgets. Every component is a thin forwardRef wrapper that:
- Calls
useFieldManager(props.attribute, props)to register itself with the enclosingPalmyraForm. - Renders a Mantine primitive inside
<FieldDecorator>for consistent label + layout. - Exposes an imperative ref with at least
focus()plus field-specific helpers. - 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
- MantineTextField · MantineTextArea · MantinePasswordField · MantineNumberField · MantineNumberPickerInput · MantinePinInput
Boolean
Choice
Range
Date & time
- MantineDateInput · MantineDatePickerInput · MantineDateTimePicker · MantineMonthInput · MantineTimeInput
Server-backed
View-Only — read-only variants for detail screens
MantineTextView·MantineDateView·MantineOptionsView·MantineLookupView·MantineINRView
Not re-exported from the barrel:
MantineColorInputandMantineCalendarexist on disk but require deep imports.MantineTriStateCheckBoxis re-exported viaext/TriStateCheckBoxrather than directly fromform/.