Home / Function/ CollapsibleSettings() — ui Function Reference

CollapsibleSettings() — ui Function Reference

Architecture documentation for the CollapsibleSettings() function in collapsible-settings.tsx from the ui codebase.

Entity Profile

Dependency Diagram

graph TD
  c5c0c1af_c05e_b6f3_3a74_001836a97b25["CollapsibleSettings()"]
  209b35ce_6bb9_7b3f_dc6f_e1546b6b7434["collapsible-settings.tsx"]
  c5c0c1af_c05e_b6f3_3a74_001836a97b25 -->|defined in| 209b35ce_6bb9_7b3f_dc6f_e1546b6b7434
  style c5c0c1af_c05e_b6f3_3a74_001836a97b25 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

apps/v4/examples/base/collapsible-settings.tsx lines 21–71

export function CollapsibleSettings() {
  const [isOpen, setIsOpen] = React.useState(false)

  return (
    <Card className="mx-auto w-full max-w-xs" size="sm">
      <CardHeader>
        <CardTitle>Radius</CardTitle>
        <CardDescription>Set the corner radius of the element.</CardDescription>
      </CardHeader>
      <CardContent>
        <Collapsible
          open={isOpen}
          onOpenChange={setIsOpen}
          className="flex items-start gap-2"
        >
          <FieldGroup className="grid w-full grid-cols-2 gap-2">
            <Field>
              <FieldLabel htmlFor="radius-x" className="sr-only">
                Radius X
              </FieldLabel>
              <Input id="radius" placeholder="0" defaultValue={0} />
            </Field>
            <Field>
              <FieldLabel htmlFor="radius-y" className="sr-only">
                Radius Y
              </FieldLabel>
              <Input id="radius" placeholder="0" defaultValue={0} />
            </Field>
            <CollapsibleContent className="col-span-full grid grid-cols-subgrid gap-2">
              <Field>
                <FieldLabel htmlFor="radius-x" className="sr-only">
                  Radius X
                </FieldLabel>
                <Input id="radius" placeholder="0" defaultValue={0} />
              </Field>
              <Field>
                <FieldLabel htmlFor="radius-y" className="sr-only">
                  Radius Y
                </FieldLabel>
                <Input id="radius" placeholder="0" defaultValue={0} />
              </Field>
            </CollapsibleContent>
          </FieldGroup>
          <CollapsibleTrigger render={<Button variant="outline" size="icon" />}>
            {isOpen ? <MinimizeIcon /> : <MaximizeIcon />}
          </CollapsibleTrigger>
        </Collapsible>
      </CardContent>
    </Card>
  )
}

Subdomains

Frequently Asked Questions

What does CollapsibleSettings() do?
CollapsibleSettings() is a function in the ui codebase, defined in apps/v4/examples/base/collapsible-settings.tsx.
Where is CollapsibleSettings() defined?
CollapsibleSettings() is defined in apps/v4/examples/base/collapsible-settings.tsx at line 21.

Analyze Your Own Codebase

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

Try Supermodel Free