🛠️ VitNode is still in development! You can try it out, but it is not recommended to use it now in production.
Frontend
Components
User
Input

User Input

Allows you to select a user (or users) from a list of users in the system.

Example

import { UserInput } from "@/components/user/inputs/user-input";
 
return (
  <FormField
    control={form.control}
    name="user"
    render={({ field }) => (
      <FormItem>
        <FormLabel>{t("create_edit.type.user")}</FormLabel>
        <UserInput {...field} />
        <FormMessage />
      </FormItem>
    )}
  />
);

Props

NameTypeDefaultDescription
value (Required){id: number; name: string;}The value of the user input.
multiplebooleanfalseAllow multiple users to be selected.