📲
HC Mobile App UI Docs
  • Introduction
  • Foundations
    • Colors
    • Icons
    • Layout Primitives
    • Theming
  • Typography
    • Heading
    • Text
    • Custom Fonts
  • Components
    • Accordion
    • Avatar
    • Bottom Sheet
    • Button
    • Button Group
    • Card List
    • Card List Item
    • Checkbox
    • Chip
    • Date Picker
    • Divider
    • Expandable Card
    • Floater
    • Horizontal List
    • Icon
    • Icon Toggle
    • Link
    • List Header
    • Lower Prompt
    • Nestable List
    • Pill Toggle
    • Radio
    • Select Picker
    • Selectable List
    • Text Input
    • Tiles
  • Utilities
    • Device Utilities
    • Layout Utilities
  • Resources
    • Issues
    • Changelog
    • GitHub
Powered by GitBook
On this page
  1. Components

Text Input

PreviousSelectable ListNextTiles

Last updated 3 years ago

CtrlK
  • Installation
  • Example
  • Props

Installation

import { TextInput, TextInputProps } from 'hc-mobile-app-ui';

Text Input vs Text Area

A Text Input is a one-line field, probably as an input for something like first name or last name, a phone number or an email address, etc. A Text Area is a multiline field that allows users to write in multiple lines. These can be used for notes, addresses or other long and complex type of data.

To convert the text input into a text area, you can add the multiline prop. See this document for reference.

Example

Props

In addition to the props listed at: https://reactnative.dev/docs/textinput

Name
Type
Description

label

string

Label for the text input

isUnderlined

function

Enables the underlined variant for the text input.

placeholder

string

Placeholder for the text input

disabled

boolean

If true, disables the text input control

required

boolean

If true, appends an asterisk to the label

onChange

function

Function to call on key input event