Skip to content
Vy logo
Components

Input

Input fields are used to let the users type in content.


Examples

A simple input field

<Input label="Name" />

A controlled input field

() => {
  const [name, setName] = React.useState("");
  return (
    <Input 
      label="Name" 
      value={name}
      onChange={e => setName(e.target.value)}
    />
  );
}

An input field with icons

<Stack>
  <Input label="Phone" leftIcon={<PhoneOutline24Icon />} />
  <Input label="Train" rightIcon={<TrainOutline24Icon />} />
</Stack>

Different variants

<Stack gap={3}>
  <Input label="Base" />
  <Input label="Floating" variant="floating" />
</Stack>