Home / Function/ PromptForm() — ui Function Reference

PromptForm() — ui Function Reference

Architecture documentation for the PromptForm() function in chatgpt.tsx from the ui codebase.

Entity Profile

Dependency Diagram

graph TD
  24299dd2_c2ad_02eb_363f_3af800271542["PromptForm()"]
  55c4aca2_522f_78c3_fff4_924b6638dbe1["chatgpt.tsx"]
  24299dd2_c2ad_02eb_363f_3af800271542 -->|defined in| 55c4aca2_522f_78c3_fff4_924b6638dbe1
  style 24299dd2_c2ad_02eb_363f_3af800271542 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

apps/v4/registry/bases/radix/blocks/chatgpt.tsx lines 87–280

function PromptForm() {
  const [dictateEnabled, setDictateEnabled] = React.useState(false)

  return (
    <Example title="Prompt Form">
      <Field>
        <FieldLabel htmlFor="prompt" className="sr-only">
          Prompt
        </FieldLabel>
        <InputGroup>
          <InputGroupTextarea id="prompt" placeholder="Ask anything" />
          <InputGroupAddon align="block-end">
            <DropdownMenu>
              <Tooltip>
                <DropdownMenuTrigger asChild>
                  <TooltipTrigger asChild>
                    <InputGroupButton
                      variant="ghost"
                      size="icon-sm"
                      onClick={() => setDictateEnabled(!dictateEnabled)}
                      className="rounded-4xl"
                    >
                      <IconPlaceholder
                        lucide="PlusIcon"
                        tabler="IconPlus"
                        hugeicons="PlusSignIcon"
                        phosphor="PlusIcon"
                        remixicon="RiAddLine"
                      />
                    </InputGroupButton>
                  </TooltipTrigger>
                </DropdownMenuTrigger>
                <TooltipContent>
                  Add files and more <Kbd>/</Kbd>
                </TooltipContent>
              </Tooltip>
              <DropdownMenuContent
                className="w-56"
                onCloseAutoFocus={(e) => e.preventDefault()}
              >
                <DropdownMenuItem>
                  <IconPlaceholder
                    lucide="PaperclipIcon"
                    tabler="IconPaperclip"
                    hugeicons="AttachmentIcon"
                    phosphor="PaperclipIcon"
                    remixicon="RiAttachmentLine"
                  />
                  Add photos & files
                </DropdownMenuItem>
                <DropdownMenuItem>
                  <IconPlaceholder
                    lucide="SparklesIcon"
                    tabler="IconSparkles"
                    hugeicons="SparklesIcon"
                    phosphor="SparkleIcon"
                    remixicon="RiSparklingLine"
                  />
                  Deep research
                </DropdownMenuItem>
                <DropdownMenuItem>
                  <IconPlaceholder
                    lucide="ShoppingBagIcon"
                    tabler="IconShoppingBag"
                    hugeicons="ShoppingBag01Icon"
                    phosphor="BagIcon"
                    remixicon="RiShoppingBagLine"
                  />
                  Shopping research
                </DropdownMenuItem>
                <DropdownMenuItem>
                  <IconPlaceholder
                    lucide="WandIcon"
                    tabler="IconWand"
                    hugeicons="MagicWand05Icon"
                    phosphor="MagicWandIcon"
                    remixicon="RiMagicLine"
                  />
                  Create image
                </DropdownMenuItem>
                <Tooltip>

Subdomains

Frequently Asked Questions

What does PromptForm() do?
PromptForm() is a function in the ui codebase, defined in apps/v4/registry/bases/radix/blocks/chatgpt.tsx.
Where is PromptForm() defined?
PromptForm() is defined in apps/v4/registry/bases/radix/blocks/chatgpt.tsx at line 87.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free