VVibeFlui

React Select Plugin

@vibeflui/react-select registers a React Select field adapter under the react-select key.

Install

BASH
npm install @vibeflui/core @vibeflui/react-select react-select

react-select is an optional peer dependency in package metadata, but the field adapter needs it to render.

Public exports

ExportPurpose
createReactSelectPluginCreates a plugin that registers React Select field adapters.
ReactSelectFieldThe field adapter component.
reactSelectAdapterKeysAdapter key list: react-select, react-select-async, react-select-creatable.

Registered slots

SlotKeys
fieldAdaptersreact-select by default, plus custom adapters overrides.
messagesoptionLoadError

Minimal setup

TSX
import { FluiKit, FluiKitProvider } from "@vibeflui/core";
import { createReactSelectPlugin } from "@vibeflui/react-select";

const reactSelectPlugin = createReactSelectPlugin();

export function UsersPage() {
  return (
    <FluiKitProvider plugins={[reactSelectPlugin]}>
      <FluiKit schema={usersSchema} />
    </FluiKitProvider>
  );
}

Schema usage

TS
export const usersSchema = {
  resource: "users",
  form: {
    fields: [
      {
        name: "role",
        label: "Role",
        type: "select",
        adapter: "react-select",
        options: [
          { label: "Admin", value: "admin" },
          { label: "Editor", value: "editor" }
        ]
      },
      {
        name: "tags",
        label: "Tags",
        type: "multiselect",
        adapter: "react-select",
        options: [
          { label: "Internal", value: "internal" },
          { label: "Beta", value: "beta" }
        ]
      }
    ]
  },
  registry: {
    fieldAdapters: ["react-select"]
  }
} as const;

Value behavior

Single selects emit the selected option value. multiselect and tags fields emit an array of selected values.

Common mistakes

  • Use a normal field type such as select, multiselect, or tags, then set adapter: "react-select".
  • react-select-async and react-select-creatable are adapter key types, but the default plugin registers only react-select unless custom adapters are passed.