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
  23d036c1_bdb7_5f58_694f_0d0e930e8779["PromptForm()"]
  1a8eb712_9ad3_8ee1_f665_9fe11916369f["chatgpt.tsx"]
  23d036c1_bdb7_5f58_694f_0d0e930e8779 -->|defined in| 1a8eb712_9ad3_8ee1_f665_9fe11916369f
  style 23d036c1_bdb7_5f58_694f_0d0e930e8779 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

apps/v4/registry/bases/base/blocks/chatgpt.tsx lines 89–293

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>
                <TooltipTrigger
                  render={
                    <DropdownMenuTrigger
                      render={
                        <InputGroupButton
                          variant="ghost"
                          size="icon-sm"
                          onClick={() => setDictateEnabled(!dictateEnabled)}
                          className="rounded-4xl"
                        />
                      }
                    />
                  }
                >
                  <IconPlaceholder
                    lucide="PlusIcon"
                    tabler="IconPlus"
                    hugeicons="PlusSignIcon"
                    phosphor="PlusIcon"
                    remixicon="RiAddLine"
                  />
                </TooltipTrigger>
                <TooltipContent>
                  Add files and more <Kbd>/</Kbd>
                </TooltipContent>
              </Tooltip>
              <DropdownMenuContent className="w-56">
                <DropdownMenuGroup>
                  <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

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free