Home / Function/ InputGroupButtonExample() — ui Function Reference

InputGroupButtonExample() — ui Function Reference

Architecture documentation for the InputGroupButtonExample() function in input-group-button.tsx from the ui codebase.

Entity Profile

Dependency Diagram

graph TD
  434d2088_db53_7f6c_cfad_10300abc790f["InputGroupButtonExample()"]
  a76088d1_6b42_7be0_a147_60d49e5d6049["input-group-button.tsx"]
  434d2088_db53_7f6c_cfad_10300abc790f -->|defined in| a76088d1_6b42_7be0_a147_60d49e5d6049
  style 434d2088_db53_7f6c_cfad_10300abc790f fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

apps/v4/app/(app)/(root)/components/input-group-button.tsx lines 18–67

export function InputGroupButtonExample() {
  const [isFavorite, setIsFavorite] = React.useState(false)

  return (
    <div className="grid w-full max-w-sm gap-6">
      <Label htmlFor="input-secure-19" className="sr-only">
        Input Secure
      </Label>
      <InputGroup className="[--radius:9999px]">
        <InputGroupInput id="input-secure-19" className="!pl-0.5" />
        <Popover>
          <PopoverTrigger asChild>
            <InputGroupAddon>
              <InputGroupButton
                variant="secondary"
                size="icon-xs"
                aria-label="Info"
              >
                <IconInfoCircle />
              </InputGroupButton>
            </InputGroupAddon>
          </PopoverTrigger>
          <PopoverContent
            align="start"
            alignOffset={10}
            className="flex flex-col gap-1 rounded-xl text-sm"
          >
            <p className="font-medium">Your connection is not secure.</p>
            <p>You should not enter any sensitive information on this site.</p>
          </PopoverContent>
        </Popover>
        <InputGroupAddon className="text-muted-foreground !pl-1">
          https://
        </InputGroupAddon>
        <InputGroupAddon align="inline-end">
          <InputGroupButton
            onClick={() => setIsFavorite(!isFavorite)}
            size="icon-xs"
            aria-label="Favorite"
          >
            <IconStar
              data-favorite={isFavorite}
              className="data-[favorite=true]:fill-primary data-[favorite=true]:stroke-primary"
            />
          </InputGroupButton>
        </InputGroupAddon>
      </InputGroup>
    </div>
  )
}

Subdomains

Frequently Asked Questions

What does InputGroupButtonExample() do?
InputGroupButtonExample() is a function in the ui codebase, defined in apps/v4/app/(app)/(root)/components/input-group-button.tsx.
Where is InputGroupButtonExample() defined?
InputGroupButtonExample() is defined in apps/v4/app/(app)/(root)/components/input-group-button.tsx at line 18.

Analyze Your Own Codebase

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

Try Supermodel Free