Home / File/ toggle-group-font-weight-selector.tsx — ui Source File

toggle-group-font-weight-selector.tsx — ui Source File

Architecture documentation for toggle-group-font-weight-selector.tsx, a tsx file in the ui codebase. 3 imports, 0 dependents.

File tsx DocumentationAtlas SearchAPI 3 imports 1 functions

Entity Profile

Dependency Diagram

graph LR
  9fc0f706_aa70_76ce_b06c_0b2371ed7fb8["toggle-group-font-weight-selector.tsx"]
  1d141819_425e_b5fd_4c8e_32f7c6a42cf2["react"]
  9fc0f706_aa70_76ce_b06c_0b2371ed7fb8 --> 1d141819_425e_b5fd_4c8e_32f7c6a42cf2
  e6c524b5_d047_d4f9_50b2_7f100d612cb2["field"]
  9fc0f706_aa70_76ce_b06c_0b2371ed7fb8 --> e6c524b5_d047_d4f9_50b2_7f100d612cb2
  381a38dc_5711_76a9_7bac_2d680f9909fd["toggle-group"]
  9fc0f706_aa70_76ce_b06c_0b2371ed7fb8 --> 381a38dc_5711_76a9_7bac_2d680f9909fd
  style 9fc0f706_aa70_76ce_b06c_0b2371ed7fb8 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

"use client"

import * as React from "react"
import { Field, FieldDescription, FieldLabel } from "@/examples/base/ui/field"
import { ToggleGroup, ToggleGroupItem } from "@/examples/base/ui/toggle-group"

export function ToggleGroupFontWeightSelector() {
  const [fontWeight, setFontWeight] = React.useState("normal")
  return (
    <Field>
      <FieldLabel>Font Weight</FieldLabel>
      <ToggleGroup
        value={[fontWeight]}
        onValueChange={(value) => setFontWeight(value[0])}
        variant="outline"
        spacing={2}
        size="lg"
      >
        <ToggleGroupItem
          value="light"
          aria-label="Light"
          className="flex size-16 flex-col items-center justify-center rounded-xl"
        >
          <span className="text-2xl leading-none font-light">Aa</span>
          <span className="text-muted-foreground text-xs">Light</span>
        </ToggleGroupItem>
        <ToggleGroupItem
          value="normal"
          aria-label="Normal"
          className="flex size-16 flex-col items-center justify-center rounded-xl"
        >
          <span className="text-2xl leading-none font-normal">Aa</span>
          <span className="text-muted-foreground text-xs">Normal</span>
        </ToggleGroupItem>
        <ToggleGroupItem
          value="medium"
          aria-label="Medium"
          className="flex size-16 flex-col items-center justify-center rounded-xl"
        >
          <span className="text-2xl leading-none font-medium">Aa</span>
          <span className="text-muted-foreground text-xs">Medium</span>
        </ToggleGroupItem>
        <ToggleGroupItem
          value="bold"
          aria-label="Bold"
          className="flex size-16 flex-col items-center justify-center rounded-xl"
        >
          <span className="text-2xl leading-none font-bold">Aa</span>
          <span className="text-muted-foreground text-xs">Bold</span>
        </ToggleGroupItem>
      </ToggleGroup>
      <FieldDescription>
        Use{" "}
        <code className="bg-muted rounded-md px-1 py-0.5 font-mono">
          font-{fontWeight}
        </code>{" "}
        to set the font weight.
      </FieldDescription>
    </Field>
  )
}

Subdomains

Dependencies

  • field
  • react
  • toggle-group

Frequently Asked Questions

What does toggle-group-font-weight-selector.tsx do?
toggle-group-font-weight-selector.tsx is a source file in the ui codebase, written in tsx. It belongs to the DocumentationAtlas domain, SearchAPI subdomain.
What functions are defined in toggle-group-font-weight-selector.tsx?
toggle-group-font-weight-selector.tsx defines 1 function(s): ToggleGroupFontWeightSelector.
What does toggle-group-font-weight-selector.tsx depend on?
toggle-group-font-weight-selector.tsx imports 3 module(s): field, react, toggle-group.
Where is toggle-group-font-weight-selector.tsx in the architecture?
toggle-group-font-weight-selector.tsx is located at apps/v4/examples/base/toggle-group-font-weight-selector.tsx (domain: DocumentationAtlas, subdomain: SearchAPI, directory: apps/v4/examples/base).

Analyze Your Own Codebase

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

Try Supermodel Free