Skip to content

Import#

import { Value } from '@dnb/eufemia/extensions/forms'
render(<Value.Boolean />)

Description#

Value.Boolean is a base component for displaying values of the type boolean.

Before using this component, ensure there is not a more specific value component available that better suits your needs.

There is a corresponding Field.Boolean component.

import { Value } from '@dnb/eufemia/extensions/forms'
render(<Value.Boolean />)

Relevant links#

Demos#

Empty#

<Value.Boolean showEmpty />

Placeholder#

The value was not filled in
<Value.Boolean placeholder="The value was not filled in" />

Value true#

Ja
<Value.Boolean value={true} />

Value false#

Nei
<Value.Boolean value={false} />

Label#

Label text
<Value.Boolean label="Label text" showEmpty />

Label and value#

Label textNei
<Value.Boolean label="Label text" value={false} />

Inline#

This is before the component Ja This is after the component

<P>
  <span
    style={{
      color: 'red',
    }}
  >
    This is before the component
  </span>{' '}
  <Value.Boolean value={true} inline />{' '}
  <span
    style={{
      color: 'red',
    }}
  >
    This is after the component
  </span>
</P>
Suggest an edit