MantineTextView#
@palmyralabs/rt-forms-mantine · form/view/MantineTextView.tsx
Overview#
Read-only text display — the view-mode counterpart to MantineTextField. Renders the hydrated value inside a FieldDecorator, with optional text alignment, visual variant, and a preformatted mode that wraps the value in <pre> to preserve whitespace / line breaks.
Empty values render as "--".
Props — ITextFieldDefinition & TextViewAttributeDefinition#
Common field props (see Forms overview) plus view-mode extras:
interface TextViewAttributeDefinition {
textAlign?: 'left' | 'right' | 'center';
variant?: 'standard' | 'outlined' | 'filled';
viewType?: 'preformatted' | 'normal';
}Ref — ITextField#
Same shape as MantineTextField; focus() is a no-op for a view but preserved for contract symmetry.
Example#
<PalmyraViewForm endPoint="/v1/user/{id}" id={id}>
<MantineTextView
attribute="loginName"
label="Email"
variant="outlined"
/>
<MantineTextView
attribute="notes"
label="Notes"
viewType="preformatted"
colspan={2}
/>
</PalmyraViewForm>