Skip to main content

MultinaireInput

Text input field with label, icons, validation, and clear button support.

Basic Usage

import { MultinaireInput } from '@multinaire/multinaire-design';

<MultinaireInput
placeholder="Enter text"
value={value}
onChangeText={setValue}
/>

Props

PropTypeDefaultDescription
placeholderstringPlaceholder text shown when the field is empty
valuestringCurrent value of the input
titlestringField label displayed above the input
requiredbooleanfalseMark the field as required. Displays a visual indicator
allowClearbooleanfalseShow a clear (×) button to reset the value
leadingIconName | ReactElementLeading icon name or a custom React element rendered at the start of the input
trailingIconName | ReactElementTrailing icon name or a custom React element rendered at the end of the input
extraReactElementExtra element rendered at the trailing end of the label row (e.g. a "Forgot password?" link)
errorTextstringError message displayed below the input
multilinebooleanfalseEnable multi-line text input
keyboardTypeKeyboardTypeOptionsKeyboard type shown when the input is focused
flexnumberFlex grow value
marginSpacingPropsOuter margin
onChangeText(text: string) => voidCallback invoked on every text change
onSubmit(text: string) => voidCallback invoked when the user submits the input (e.g. presses Enter)

Examples

With Label

<MultinaireInput
title="Email"
placeholder="Enter your email"
value={email}
onChangeText={setEmail}
keyboardType="email-address"
/>

Required Field

<MultinaireInput
title="Username"
required
placeholder="Enter username"
value={username}
onChangeText={setUsername}
/>

With Icons

<MultinaireInput
leading="Search"
placeholder="Search..."
value={search}
onChangeText={setSearch}
/>

<MultinaireInput
leading="Lock"
trailing="Eye"
placeholder="Password"
value={password}
onChangeText={setPassword}
/>

With Clear Button

<MultinaireInput
allowClear
placeholder="Search..."
value={search}
onChangeText={setSearch}
/>

With Error

<MultinaireInput
title="Email"
placeholder="Enter email"
value={email}
onChangeText={setEmail}
errorText={emailError}
/>

Multiline

<MultinaireInput
title="Description"
placeholder="Enter description..."
multiline
value={description}
onChangeText={setDescription}
/>