Input Field

PRO

You can edit 8 Components for free. Get premium for unlimited access.

Choose between Figma, SwiftUI, React Native or Jetpack Compose Documentation.

Figma

The Input Field is a input field component with support for placeholder animation, validation status, error messages, and an optional icon.

1. Reference

This component inherits props from the Input Field.

Prop
Type
Default
type
default
disabled
success
error
default
state
default
active
filled
default
size
sm
md
lg
lg
iconLeft
true
false
false
iconRight
true
false
false

2. Type

You can edit the type with the default, disabled, success or error parameter.

Image 2.1 : Type default

Image 2.2 : Type success

Image 2.3 : Type disabled

Image 2.4 : Type error

3. Size

You can edit the size with the sm, md or lg parameter.

Image 3.1 : Size lg

Image 3.2 : Size md

Image 3.3 : Size sm

4. State

You can edit the state with the default, active or filled parameter.

Image 4.1 : State default

Image 4.2 : State active

Image 4.3 : State filled

5. iconLeft

You can edit the iconLeft with the true or false parameter.

Image 5.1 : iconLeft false

Image 5.2 : iconLeft true

6. iconRight

You can edit the iconRight with the true or false parameter.

Image 6.1 : iconRight false

Image 6.1 : iconRight true

SwiftUI

The DLInputField is a input field component with support for placeholder animation, validation status, error messages, and an optional icon.

1. Reference

This component inherits props from the Input Field.

Prop
Type
Default
type
.none
.icon
.warning
.success
.error
.none
size
.sm
.md
.lg
.lg
state
.normal
.disabled
.normal
placeholder
"text"

-

text
"text"

-

errorString
"text"

-

IconPressed

-

-

2. Type

You can edit the type with the .none, .icon, .warning, .success or .error parameter.

Input Field
Input Field
Input Field
Input Field
Description
Input Field
Input Field
...

3. Size

You can edit the size with the .sm, .md or .lg parameter.

Input Field
Input Field
Input Field
...

4. State

You can edit the state with the .normal or .disabled parameter.

Input Field
Input Field
...

Jetpack Compose

The InputField is a input field component with support for placeholder animation, validation status, error messages, and an optional icon.

1. Reference

This component inherits props from the Input Field.

Prop
Type
Default
type
InputFieldType.default
InputFieldType.warning
InputFieldType.success
InputFieldType.error
InputFieldType.default
size
InputFieldSize.sm
InputFieldSize.md
InputFieldSize.lg
InputFieldSize.lg
state
InputFieldState.default
InputFieldState.disabled
InputFieldState.default
placeholder
"text"

-

text
"text"

-

2. Type

You can edit the type with the .none, .icon, .warning, .success or .error parameter.

Input Field
Input Field
Input Field
Input Field
Description
Input Field
Input Field
InputField(
size = InputFieldSize.lg,
placeholder = "Input Field",
text = normalText.value,
onValueChange = {
normalText.value = it
}
)

InputField(
size = InputFieldSize.lg,
text = successText.value,
isSuccess = true,
placeholder = "Input Field",
onValueChange = {
successText.value = it }
)

InputField(
size = InputFieldSize.lg,
state = InputFieldState.disabled,
placeholder = "Input Field",
text = disableText.value,
onValueChange = {
disableText.value = it
}
)

InputField(
size = InputFieldSize.lg,
isError = true,
errorText = "Description",
placeholder = "Input Field",
text = errorText.value,
onValueChange = { errorText.value = it }
)

3. Size

You can edit the size with the InputFiledSize.sm, InputFiledSize.md or InputFiledSize.lg parameter.

Input Field
Input Field
Input Field
...

4. State

You can edit the state with the .normal or .disabled parameter.

Input Field
Input Field
...

React Native

The CustomInputField is a input field component with support for placeholder animation, validation status, error messages, and an optional icon.

1. Reference

This component inherits props from the Input Field.

Prop
Type
Default
type
default
warning
success
error
default
size
sm
md
lg
lg
state
default
disabled
default
placeholder
"text"

-

text
"text"

-

2. Type

You can edit the type with the default, warning, success or error parameter.

Input Field
Input Field
Input Field
Input Field
Description
import { View } from 'react-native';
import CustomInputField from '../../components/common/CustomInputField';

export default function ScreenName() {
const [inputValue, setInputValue] = useState('Default Value');

return (
<View>

<CustomInputField
size={lg}
placeholder={"Input Field"}
type={default}
/>

<CustomInputField
size={lg}
placeholder={"Input Field"}
type={success}
/>

<CustomInputField
size={lg}
placeholder={"Input Field"}
type={warning}
/>

<CustomInputField
size={lg}
placeholder={"Input Field"}
type={error}
error={"Description"}
/>

</View>
);
}

3. Icon

You can edit the iconLeft an iconRight with the "icon" parameter.

Input Field
Input Field
import { View } from 'react-native';
import PlusIcon from '../../../assets/icons/svg_js/plusIcon';
import CustomInputField from '../../components/common/CustomInputField';

export default function ScreenName() {
const [inputValue, setInputValue] = useState('Default Value');
return (
<View>

<CustomInputField
size={lg}
placeholder={"Input Field"}
iconLeft={<PlusIcon />}
/>

<CustomInputField
size={lg}
placeholder={"Input Field"}
iconRight={<PlusIcon />}
/>

</View>
);
}

4. Size

You can edit the size with the sm, md or lg parameter.

Input Field
Input Field
Input Field
import { View } from 'react-native';
import CustomInputField from '../../components/common/CustomInputField';

export default function ScreenName() {
const [inputValue, setInputValue] = useState('Default Value');

return (
<View>

<CustomInputField
size={lg}
placeholder={"Input Field"}
/>

<CustomInputField
size={md}
placeholder={"Input Field"}
/>

<CustomInputField
size={sm}
placeholder={"Input Field"}
/>

</View>
);
}

5. State

You can edit the state with the default or disabled parameter.

Input Field
Input Field
import { View } from 'react-native';
import CustomInputField from '../../components/common/CustomInputField';

export default function ScreenName() {
const [inputValue, setInputValue] = useState('Default Value');

return (
<View>

<CustomInputField
size={lg}
placeholder={"Input Field"}
state={default}
/>

<CustomInputField
size={lg}
placeholder={"Input Field"}
state={disabled}
/>

</View>
);
}

Discover more content

You have questions or need help?

E-Mail

You want to try?

Test for free

Save time and money?

Get Pro Version