Skip to content

BooleanField

BooleanField(props): Element

Defined in: packages/ui/src/fields/boolean-field.tsx:20

Read-only display component that renders a boolean value as a colored chip.

Uses the plugin’s chip slot (via useComponent) for styling. Displays customizable labels and colors for true and false states. Returns an em-dash for null/undefined values.

BooleanFieldProps

See BooleanFieldProps.

Element

A styled chip element, or a placeholder <span> for null values.

<BooleanField value={post.published} trueLabel="Published" falseLabel="Draft" />
// -> Green chip: "Published" or neutral chip: "Draft"