Skip to content

PhoneNumber

Description

Value.PhoneNumber is a wrapper component for displaying string values, with user experience tailored for phone number values.

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

Demos

Empty

Code Editor
<Value.PhoneNumber showEmpty />

Placeholder

Code Editor
<Value.PhoneNumber placeholder="The value was not filled in" />

Value

98 71 23 45
Code Editor
<Value.PhoneNumber value="98712345" />

Label

Code Editor
<Value.PhoneNumber label="Label text" showEmpty />

Label and value

0047 98 71 23 45
Code Editor
<Value.PhoneNumber label="Label text" value="+4798712345" />

Inline

This is before the component98 71 23 45This is after the component

Code Editor
<P>
  This is before the component
  <Value.PhoneNumber value="98712345" inline />
  This is after the component
</P>