Skip to content

TextField

TextField(props): Element

Defined in: packages/ui/src/fields/text-field.tsx:19

Read-only display component for plain text values.

Optionally truncates long strings at maxLength characters with an ellipsis and shows the full text in a title tooltip on hover. Returns an em-dash for null/undefined values.

TextFieldProps

See TextFieldProps.

Element

A <span> with the text content, or a placeholder for null values.

<TextField value={post.title} maxLength={50} />
// -> Truncated with tooltip if longer than 50 characters