Forms#
@palmyralabs/rt-forms-mui · src/palmyra/mui/form/ — MUI-skinned input widgets. Every component is a thin forwardRef wrapper that:
- Calls
useFieldManager(props.attribute, props)to register itself with the enclosingPalmyraForm. - Renders an MUI 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.
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 |
label |
string? |
Label text |
title |
string? |
Alternative/accessible title |
required |
boolean? |
Marks the field required |
defaultValue |
any? |
Initial value |
readOnly |
boolean? |
Disables the field |
colspan |
number? |
Span inside a FieldGroupContainer |
className |
string? |
Class on the inner MUI primitive |
customContainerClass / customLabelClass / customFieldClass |
string? |
Styling hooks on the FieldDecorator slots |
fieldProps |
{ size?: 'small' | 'medium' | 'large' }? |
Density hint |
variant |
'outlined' | 'filled' | 'standard'? |
MUI visual variant |
| validation | validRule?, regExp?, invalidMessage?, … |
Declarative validators |
Every component also passes through its underlying MUI props — e.g. MuiTextField accepts TextFieldProps, MuiSelect accepts SelectProps.
Widgets#
Text & numeric
Boolean
Choice
Rating
Date & time
Server-backed
Read-only (View) widgets
Not present on the MUI side: slider / range-slider (only a disabled
MuiSlider.tsx.bakbackup), tri-state checkbox, and multi-select. The Mantine package ships these.