The component can be imported via:
The JsonField component is a thin wrapper around TextArea that automatically validates JSON input on blur. It supports all the same props as TextArea.
The JsonField component automatically validates JSON on blur. If the JSON is invalid, an error message will be displayed. The error is cleared when the field is focused again.
If you provide a custom error prop, it will override the automatic validation error.
Since JsonField extends TextArea, all TextArea props work including placeholder, rows, minRows, maxRows, resize, etc.
PlumaJsonField extends BoxElement (or elements) that describe the form field. Also used for error messages, as aria-errormessage isn't supported in all assistive technologies: https://a11ysupport.io/tech/aria/aria-errormessage_attribute
String value that labels the form field.
Element (or elements) that label the form field.
Visible width of the textarea.
A description for the field, providing additional context or hints.
An error message associated with the form field.
Boolean: Ember-only. If the error named block is used,
this prop can be set to true to indicate an error is present,
which will make the error block render.
An optional id to be assigned to the input element. Also used to generate ids for labels and error messages. If one isn't provided, it will be generated.
Whether the form field is disabled.
Default:true
Whether the textarea should stretch to fill the width of its container.
Set this to false if the textarea needs to be resized horizontally (via resize both or horizontal).
Whether the form field is in an invalid state.
The label text to show with the form field.
Maximum number of rows when auto-growing.
Minimum number of rows when auto-growing.
The name of the textarea.
The blur event handler for the textarea element.
The change event handler for the textarea element.
The focus event handler for the textarea element.
The input event handler for the textarea element.
The keydown event handler for the textarea element.
Placeholder text to show inside the field.
Default:vertical
Whether the textarea is resizable.
Number of visible text lines.
Whether to allow browser autofill and password managers. When false (default), adds attributes to disable password managers (1Password, LastPass, Bitwarden, Dashlane). Set to true for fields where autofill is desired (e.g., email, password, address fields).
Whether the generated description id should be included in the input's aria-describedby attribute.
Disable this when a label`` tag surrounds the input as well as it's description text, for example in an OptionCard` component.
Whether the generated label id should be included in the input's aria-labelledby attribute.
Disable this when the label tag surrounds the input as well as it's label text,
for example in an OptionCard component.
Default:false
When true, pressing Enter key will submit the form instead of creating a new line.
By default, form elements will throw an error if no label or aria-label is provided. Disable this to suppress the error, for example when building a custom form element, and you want to handle labeling yourself.
Additional classes to be applied to the description element.
Additional classes to be applied to the error element.
Additional classes to be applied to the field node.
Ember-only: this is used internally to detect whether a label
named block is present, and to ignore empty label props if so.
Additional classes to be applied to the input node.
Sets the size attribute on the input element. This controls the visible width of the input in characters.
Whether the component should render with "legacy" styles.
Additional classes to be applied to the label node.
Additional class to apply on the textarea element wrapper.
The current value.
Whether to apply the center-baseline variant.