Home / Function/ DialogWithForm() — ui Function Reference

DialogWithForm() — ui Function Reference

Architecture documentation for the DialogWithForm() function in dialog-example.tsx from the ui codebase.

Entity Profile

Dependency Diagram

graph TD
  d1e1d710_4c21_d45e_0350_7b721b403353["DialogWithForm()"]
  c1073453_2b4c_c2d5_cfa5_9971cf4ab47b["dialog-example.tsx"]
  d1e1d710_4c21_d45e_0350_7b721b403353 -->|defined in| c1073453_2b4c_c2d5_cfa5_9971cf4ab47b
  style d1e1d710_4c21_d45e_0350_7b721b403353 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

apps/v4/registry/bases/base/examples/dialog-example.tsx lines 79–120

function DialogWithForm() {
  return (
    <Example title="With Form" className="items-center justify-center">
      <Dialog>
        <form>
          <DialogTrigger render={<Button variant="outline" />}>
            Edit Profile
          </DialogTrigger>
          <DialogContent>
            <DialogHeader>
              <DialogTitle>Edit profile</DialogTitle>
              <DialogDescription>
                Make changes to your profile here. Click save when you&apos;re
                done. Your profile will be updated immediately.
              </DialogDescription>
            </DialogHeader>
            <FieldGroup>
              <Field>
                <FieldLabel htmlFor="name-1">Name</FieldLabel>
                <Input id="name-1" name="name" defaultValue="Pedro Duarte" />
              </Field>
              <Field>
                <FieldLabel htmlFor="username-1">Username</FieldLabel>
                <Input
                  id="username-1"
                  name="username"
                  defaultValue="@peduarte"
                />
              </Field>
            </FieldGroup>
            <DialogFooter>
              <DialogClose render={<Button variant="outline" />}>
                Cancel
              </DialogClose>
              <Button type="submit">Save changes</Button>
            </DialogFooter>
          </DialogContent>
        </form>
      </Dialog>
    </Example>
  )
}

Subdomains

Frequently Asked Questions

What does DialogWithForm() do?
DialogWithForm() is a function in the ui codebase, defined in apps/v4/registry/bases/base/examples/dialog-example.tsx.
Where is DialogWithForm() defined?
DialogWithForm() is defined in apps/v4/registry/bases/base/examples/dialog-example.tsx at line 79.

Analyze Your Own Codebase

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

Try Supermodel Free