DiscordDashboard

Input component with auto-complete suggestions

Description

A regular input component with an auto-complete placeholder. When a user types some text, the component waits for a 1 second break, and then sends a query to GPT-3.5 to suggest the next couple of words. The users can accept the suggestion with the Tab key.

Props

  • completionColor: Specifies the color of the auto-complete text.
  • containerStyle: Defines the styling for the component's container.
  • containerClassName: CSS class name for the component's container
  • Extends all the props of a classic <input /> component

Example

<AutoCompleteInput
  placeholder="Type something here..."
  containerClassName="mb-4"
  className="placeholder-stone-200"
/>