Home / Function/ Page() — ui Function Reference

Page() — ui Function Reference

Architecture documentation for the Page() function in sidebar-16.tsx from the ui codebase.

Entity Profile

Dependency Diagram

graph TD
  30661d97_59ff_6339_28e7_cc581ee54f0e["Page()"]
  0a3c253c_8fc8_0a79_313f_3e6a2944539b["sidebar-16.tsx"]
  30661d97_59ff_6339_28e7_cc581ee54f0e -->|defined in| 0a3c253c_8fc8_0a79_313f_3e6a2944539b
  style 30661d97_59ff_6339_28e7_cc581ee54f0e fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

deprecated/www/registry/default/v0/sidebar-16.tsx lines 258–648

export default function Page() {
  const [open, setOpen] = React.useState(true)
  const { isMobile } = useSidebar()

  return (
    <div
      style={
        {
          "--header-height": HEADER_HEIGHT,
        } as React.CSSProperties
      }
    >
      <header className="sticky top-0 bg-sidebar flex h-[--header-height] shrink-0 items-center gap-2 border-b px-4 isolate z-20">
        <div className="flex items-center gap-2 w-full">
          <Button
            className="hidden md:flex"
            variant="ghost"
            size="icon"
            onClick={() => setOpen(!open)}
          >
            <Sidebar />
          </Button>

          <div className="mx-auto flex items-center gap-2">
            <div className="flex aspect-square size-8 items-center justify-center rounded-lg bg-sidebar-primary text-sidebar-primary-foreground">
              <Command className="size-4" />
            </div>
            <Separator orientation="vertical" className="ml-4 h-4" />
            <NavigationMenu>
              <NavigationMenuList>
                <NavigationMenuItem>
                  <NavigationMenuTrigger className="bg-sidebar">
                    Getting started
                  </NavigationMenuTrigger>
                  <NavigationMenuContent>
                    <ul className="grid gap-3 p-4 md:w-[400px] lg:w-[500px] lg:grid-cols-[.75fr_1fr]">
                      <li className="row-span-3">
                        <NavigationMenuLink asChild>
                          <a
                            className="flex h-full w-full select-none flex-col justify-end rounded-md bg-gradient-to-b from-muted/50 to-muted p-6 no-underline outline-none focus:shadow-md"
                            href="/"
                          >
                            <Icons.logo className="h-6 w-6" />
                            <div className="mb-2 mt-4 text-lg font-medium">
                              shadcn/ui
                            </div>
                            <p className="text-sm leading-tight text-muted-foreground">
                              Beautifully designed components built with Radix
                              UI and Tailwind CSS.
                            </p>
                          </a>
                        </NavigationMenuLink>
                      </li>

                      <li>
                        <NavigationMenuLink asChild>
                          <a className="block select-none space-y-1 rounded-md p-3 leading-none no-underline outline-none transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground">
                            <div className="text-sm font-medium leading-none">
                              Introduction
                            </div>
                            <p className="line-clamp-2 text-sm leading-snug text-muted-foreground">
                              Re-usable components built using Radix UI and
                              Tailwind CSS.
                            </p>
                          </a>
                        </NavigationMenuLink>
                      </li>

                      <li>
                        <NavigationMenuLink asChild>
                          <a className="block select-none space-y-1 rounded-md p-3 leading-none no-underline outline-none transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground">
                            <div className="text-sm font-medium leading-none">
                              Installation
                            </div>
                            <p className="line-clamp-2 text-sm leading-snug text-muted-foreground">
                              How to install dependencies and structure your
                              app.
                            </p>
                          </a>
                        </NavigationMenuLink>
                      </li>

Subdomains

Frequently Asked Questions

What does Page() do?
Page() is a function in the ui codebase, defined in deprecated/www/registry/default/v0/sidebar-16.tsx.
Where is Page() defined?
Page() is defined in deprecated/www/registry/default/v0/sidebar-16.tsx at line 258.

Analyze Your Own Codebase

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

Try Supermodel Free