Home / Function/ ToggleWithIcon() — ui Function Reference

ToggleWithIcon() — ui Function Reference

Architecture documentation for the ToggleWithIcon() function in toggle-example.tsx from the ui codebase.

Entity Profile

Dependency Diagram

graph TD
  0f3b036a_f7b0_9ed8_a570_550a4b7c61a9["ToggleWithIcon()"]
  732d07fe_4126_27b7_8a89_b8f9929b69b4["toggle-example.tsx"]
  0f3b036a_f7b0_9ed8_a570_550a4b7c61a9 -->|defined in| 732d07fe_4126_27b7_8a89_b8f9929b69b4
  style 0f3b036a_f7b0_9ed8_a570_550a4b7c61a9 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

apps/v4/registry/bases/radix/examples/toggle-example.tsx lines 310–338

function ToggleWithIcon() {
  return (
    <Example title="With Icon">
      <div className="flex flex-wrap items-center gap-2">
        <Toggle aria-label="Toggle bookmark" defaultPressed>
          <IconPlaceholder
            lucide="BookmarkIcon"
            tabler="IconBookmark"
            hugeicons="BookmarkIcon"
            phosphor="BookmarkIcon"
            remixicon="RiBookmarkLine"
            className="group-data-[state=on]/toggle:fill-accent-foreground"
          />
        </Toggle>
        <Toggle variant="outline" aria-label="Toggle bookmark outline">
          <IconPlaceholder
            lucide="BookmarkIcon"
            tabler="IconBookmark"
            hugeicons="BookmarkIcon"
            phosphor="BookmarkIcon"
            remixicon="RiBookmarkLine"
            className="group-data-[state=on]/toggle:fill-accent-foreground"
          />
          Bookmark
        </Toggle>
      </div>
    </Example>
  )
}

Subdomains

Frequently Asked Questions

What does ToggleWithIcon() do?
ToggleWithIcon() is a function in the ui codebase, defined in apps/v4/registry/bases/radix/examples/toggle-example.tsx.
Where is ToggleWithIcon() defined?
ToggleWithIcon() is defined in apps/v4/registry/bases/radix/examples/toggle-example.tsx at line 310.

Analyze Your Own Codebase

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

Try Supermodel Free