Home / File/ toggle-example.tsx — ui Source File

toggle-example.tsx — ui Source File

Architecture documentation for toggle-example.tsx, a tsx file in the ui codebase. 4 imports, 0 dependents.

File tsx ComponentRegistry UIPrimitives 4 imports 9 functions

Entity Profile

Dependency Diagram

graph LR
  a3855539_0a9d_85ab_ed15_4f25cab72cdf["toggle-example.tsx"]
  f56be340_a522_c6f7_dec3_5906873d14c8["example"]
  a3855539_0a9d_85ab_ed15_4f25cab72cdf --> f56be340_a522_c6f7_dec3_5906873d14c8
  7328fa0a_98b6_fe77_42fd_0d1582b24604["button"]
  a3855539_0a9d_85ab_ed15_4f25cab72cdf --> 7328fa0a_98b6_fe77_42fd_0d1582b24604
  5a1264c3_a99d_8bb7_b4f2_3070fbb69d0c["toggle"]
  a3855539_0a9d_85ab_ed15_4f25cab72cdf --> 5a1264c3_a99d_8bb7_b4f2_3070fbb69d0c
  de6fac54_74ca_6c25_8f8b_d1ba3287dbf2["icon-placeholder"]
  a3855539_0a9d_85ab_ed15_4f25cab72cdf --> de6fac54_74ca_6c25_8f8b_d1ba3287dbf2
  style a3855539_0a9d_85ab_ed15_4f25cab72cdf fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import {
  Example,
  ExampleWrapper,
} from "@/registry/bases/base/components/example"
import { Button } from "@/registry/bases/base/ui/button"
import { Toggle } from "@/registry/bases/base/ui/toggle"
import { IconPlaceholder } from "@/app/(create)/components/icon-placeholder"

export default function ToggleExample() {
  return (
    <ExampleWrapper>
      <ToggleBasic />
      <ToggleOutline />
      <ToggleSizes />
      <ToggleWithButtonText />
      <ToggleWithButtonIcon />
      <ToggleWithButtonIconText />
      <ToggleDisabled />
      <ToggleWithIcon />
    </ExampleWrapper>
  )
}

function ToggleBasic() {
  return (
    <Example title="Basic">
      <div className="flex flex-wrap items-center gap-2">
        <Toggle aria-label="Toggle bold" defaultPressed>
          <IconPlaceholder
            lucide="BoldIcon"
            tabler="IconBold"
            hugeicons="TextBoldIcon"
            phosphor="TextBIcon"
            remixicon="RiBold"
          />
        </Toggle>
        <Toggle aria-label="Toggle italic">
          <IconPlaceholder
            lucide="ItalicIcon"
            tabler="IconItalic"
            hugeicons="TextItalicIcon"
            phosphor="TextItalicIcon"
            remixicon="RiItalic"
          />
        </Toggle>
        <Toggle aria-label="Toggle underline">
          <IconPlaceholder
            lucide="UnderlineIcon"
            tabler="IconUnderline"
            hugeicons="TextUnderlineIcon"
            phosphor="TextUnderlineIcon"
            remixicon="RiUnderline"
          />
        </Toggle>
      </div>
    </Example>
  )
}

function ToggleOutline() {
// ... (279 more lines)

Subdomains

Dependencies

  • button
  • example
  • icon-placeholder
  • toggle

Frequently Asked Questions

What does toggle-example.tsx do?
toggle-example.tsx is a source file in the ui codebase, written in tsx. It belongs to the ComponentRegistry domain, UIPrimitives subdomain.
What functions are defined in toggle-example.tsx?
toggle-example.tsx defines 9 function(s): ToggleBasic, ToggleDisabled, ToggleExample, ToggleOutline, ToggleSizes, ToggleWithButtonIcon, ToggleWithButtonIconText, ToggleWithButtonText, ToggleWithIcon.
What does toggle-example.tsx depend on?
toggle-example.tsx imports 4 module(s): button, example, icon-placeholder, toggle.
Where is toggle-example.tsx in the architecture?
toggle-example.tsx is located at apps/v4/registry/bases/base/examples/toggle-example.tsx (domain: ComponentRegistry, subdomain: UIPrimitives, directory: apps/v4/registry/bases/base/examples).

Analyze Your Own Codebase

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

Try Supermodel Free