DevactionUI.AiPrompt (devaction_ui v0.1.0)

Copy Markdown View Source

The field that talks to the AI: a pill in ink with the amber dot, a text field and a round send button. It is a form, so Enter sends; the LiveView gets event with the text under name.

Summary

Functions

ai_prompt(assigns)

Attributes

  • id (:string) (required)
  • name (:string) - Defaults to "prompt".
  • value (:string) - Defaults to "".
  • label (:string) (required) - what the field is, for assistive technology.
  • placeholder (:string) - Defaults to nil.
  • event (:string) (required)
  • send_label (:string) (required) - the name of the send button.
  • class (:any) - Defaults to nil.
  • Global attributes are accepted.

Slots

  • icon (required) - the arrow of the send button, drawn by the caller.