Skip to main content

Input.Text

Import

import { Input } from "@dhua5922/react-native-kit";

Examples

Live Editor
function Example() {
  const [text, setText] = useState("");

  return (
    <Input.Text
      placeholder="Enter text here"
      value={text}
      onChange={(text) => setText(text)}
      leftChildren={<Entypo name="magnifying-glass" size={24} color="black" />}
      rightChildren={
        <Entypo
          name="cross"
          size={24}
          color="black"
          onPress={() => setText("")}
        />
      }
    />
  );
}
Result
Loading...

Props

note

Include all props from TextInput.

NameTypeDefaultDescription
leftChildrenReact.ReactNodeChildren to render on left side of input
rightChildrenReact.ReactNodeChildren to render on right side of input
disabledbooleanfalseFlag for indicating if input is disabled
focusedbooleanfalseFlag for indicating if input is focused
onChange(text: string) => voidCallback fired when typing in input
containerPropsobjectProps for input container