Docplanner Logo

Docplanner Mobile UI

Edit page
Introduction
⚙️ – Core
⚛️ – Atoms-Molecules
AvatarBadgeButtonCheckBoxFieldCircleDividerDownloadCardIconInputFieldDpInputFieldDpInputFieldContainerDpInputFieldBorderDpInputFieldStaticLabelDpInputFieldValueDpInputFieldErrorInputFieldButtonLinkListItemOneTimeCodeInputPhotoAvatarRadioGroupFieldRatingSelectFieldSimpleAvatarSpacerSwitchFieldTextToast❌ Icon (Deprecated)❌ Roboto (Deprecated)❌ WorkSans (Deprecated)
🧬 – Organisms

InputField

This is a simple wrapper around react-native's <TextInput /> component. For convenience reasons, you can also import all the <DpInputField />'s sub-components:

  • <DpInputFieldContainer />
  • <DpInputFieldBorder />
  • <DpInputFieldStaticLabel />
  • <DpInputFieldValue />
  • <DpInputFieldError />

You might need them if you're building a custom input component, i.e. some complex Select.

DpInputField

Basic usage

Apart from the props listed below it has all the props that a regular react-native <TextInput /> has.

label
string | undefined

Input label

disabled
boolean | undefined

Determines whether the input is opaque

error
string | undefined

Adds an error message below the input and changes input’s border and label to red

right
ReactNode

Content to be rendered on the right of the input

Variations

Without a static placeholder


Empty with an error


Empty with a placeholder and an error


Empty with a label and an error


With an invalid value


With an invalid value and a label


With an invalid value and a placeholder


Empty and disabled


With a value and disabled




DpInputFieldContainer

disabled
boolean | undefined

Determines whether the container and its children are opaque

children
ReactNode

Children

DpInputFieldBorder

color
"gray" | "blue" | "turquoise" | "red" | "green" | "primary" | undefined
primary

🎨   Color

hasError
boolean | undefined

Determines whether the border is red

isFocused
boolean | undefined

Determines whether the border is blue or gray

children
ReactNode

Children

isAnimated
boolean | undefined

Determines whether the border color is animated or not

DpInputFieldStaticLabel

isFocused
boolean | undefined

Determines whether the label is blue

hasError
boolean | undefined

Determines whether the label is red

children
string
required

Children

DpInputFieldValue

children
string | undefined

Children

DpInputFieldError

children
ReactNode
required

Children