ReadOnlyCheckboxField
ReadOnlyCheckboxField renders a boolean value as non-editable output. It is the read-only counterpart of a checkbox input, indicating whether an option is checked or unchecked in detail and view screens.
Props
| Prop | Type | Required | Default | Description |
|------|------|----------|---------|-------------|
| value | boolean | Yes | — | The boolean state to display. |
| label | string | No | — | Label shown alongside or above the field. |
| description | string | No | — | Helper text shown below the field in italic. |
| containerStyle | React.CSSProperties | No | — | Style overrides for the outer wrapper div. |
| labelStyle | React.CSSProperties | No | — | Style overrides for the label element. |
| descriptionStyle | React.CSSProperties | No | — | Style overrides for the description text. |
Usage
Basic
import ReadOnlyCheckboxField from '@/components/read-only-fields/ReadOnlyCheckboxField';
<ReadOnlyCheckboxField
label="Accepts Terms"
value={true}
/>
Unchecked state
<ReadOnlyCheckboxField
label="Newsletter Subscription"
value={false}
description="Whether the user opted in to receive newsletters."
/>