Home / Function/ PlaygroundPage() — ui Function Reference

PlaygroundPage() — ui Function Reference

Architecture documentation for the PlaygroundPage() function in page.tsx from the ui codebase.

Entity Profile

Dependency Diagram

graph TD
  bde6f748_991c_c5f7_a927_0373659ba9fa["PlaygroundPage()"]
  5ee45142_aa10_ca73_456e_5946db3e53c3["page.tsx"]
  bde6f748_991c_c5f7_a927_0373659ba9fa -->|defined in| 5ee45142_aa10_ca73_456e_5946db3e53c3
  style bde6f748_991c_c5f7_a927_0373659ba9fa fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

apps/v4/app/(app)/examples/playground/page.tsx lines 38–332

export default function PlaygroundPage() {
  return (
    <>
      <div className="md:hidden">
        <Image
          src="/examples/playground-light.png"
          width={1280}
          height={916}
          alt="Playground"
          className="block dark:hidden"
        />
        <Image
          src="/examples/playground-dark.png"
          width={1280}
          height={916}
          alt="Playground"
          className="hidden dark:block"
        />
      </div>
      <div className="hidden flex-1 flex-col md:flex">
        <div className="container flex flex-col items-start justify-between gap-2 py-4 sm:flex-row sm:items-center sm:gap-0 md:h-16">
          <h2 className="pl-0.5 text-lg font-semibold">Playground</h2>
          <div className="ml-auto flex w-full gap-2 sm:justify-end">
            <PresetSelector presets={presets} />
            <PresetSave />
            <div className="hidden gap-2 md:flex">
              <CodeViewer />
              <PresetShare />
            </div>
            <PresetActions />
          </div>
        </div>
        <Separator />
        <Tabs defaultValue="complete" className="flex flex-1 flex-col">
          <div className="container flex flex-1 flex-col py-6">
            <div className="grid flex-1 items-stretch gap-6 md:grid-cols-[1fr_200px]">
              <div className="hidden flex-col gap-6 sm:flex md:order-2">
                <div className="grid gap-3">
                  <HoverCard openDelay={200}>
                    <HoverCardTrigger asChild>
                      <span className="text-sm leading-none font-medium peer-disabled:cursor-not-allowed peer-disabled:opacity-70">
                        Mode
                      </span>
                    </HoverCardTrigger>
                    <HoverCardContent className="w-[320px] text-sm" side="left">
                      Choose the interface that best suits your task. You can
                      provide: a simple prompt to complete, starting and ending
                      text to insert a completion within, or some text with
                      instructions to edit it.
                    </HoverCardContent>
                  </HoverCard>
                  <TabsList className="grid w-full grid-cols-3">
                    <TabsTrigger value="complete">
                      <span className="sr-only">Complete</span>
                      <svg
                        xmlns="http://www.w3.org/2000/svg"
                        viewBox="0 0 20 20"
                        fill="none"
                      >
                        <rect
                          x="4"
                          y="3"
                          width="12"
                          height="2"
                          rx="1"
                          fill="currentColor"
                        ></rect>
                        <rect
                          x="4"
                          y="7"
                          width="12"
                          height="2"
                          rx="1"
                          fill="currentColor"
                        ></rect>
                        <rect
                          x="4"
                          y="11"
                          width="3"
                          height="2"
                          rx="1"

Subdomains

Frequently Asked Questions

What does PlaygroundPage() do?
PlaygroundPage() is a function in the ui codebase, defined in apps/v4/app/(app)/examples/playground/page.tsx.
Where is PlaygroundPage() defined?
PlaygroundPage() is defined in apps/v4/app/(app)/examples/playground/page.tsx at line 38.

Analyze Your Own Codebase

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

Try Supermodel Free