Default#

Input Group default example rendered by the production Go component.

Enable JavaScript to run the preview. Go source and install commands remain available.

Usage
components.PaintInputGroup(canvas, theme, bounds, components.InputGroupSnapshot{
    ID: tree.ID(page, "domain"), Label: "Project domain", Value: value,
    Placeholder: "project-name",
    InlineStart: components.InputGroupSlot{
        Kind: components.InputGroupSlotText, Text: "https://", Separated: true,
    },
    InlineEnd: components.InputGroupSlot{
        Kind: components.InputGroupSlotButton, ID: tree.ID(page, "clear"),
        Icon: clearIcon, ButtonSize: components.InputGroupButtonIconXS,
        Label: "Clear domain",
    },
})

Addons#

Input Group addons example rendered by the production Go component.

Enable JavaScript to run the preview. Go source and install commands remain available.

Usage
components.PaintInputGroup(canvas, theme, bounds, components.InputGroupSnapshot{
    ID: tree.ID(page, "description"), Label: "Release description",
    Value: value, Multiline: true,
    BlockStart: components.InputGroupSlot{
        Kind: components.InputGroupSlotText, Text: "Release description",
        Separated: true,
    },
    BlockEnd: components.InputGroupSlot{
        Kind: components.InputGroupSlotKbd, Text: "⌘↵",
    },
})

Buttons#

Input Group buttons example rendered by the production Go component.

Enable JavaScript to run the preview. Go source and install commands remain available.

Usage
reveal := tree.ID(page, "reveal")
components.PaintInputGroup(canvas, theme, bounds, components.InputGroupSnapshot{
    ID: tree.ID(page, "password"), Label: "Password", Value: value,
    Secure: !revealed,
    InlineEnd: components.InputGroupSlot{
        Kind: components.InputGroupSlotButton, ID: reveal, Icon: eyeIcon,
        ButtonSize: components.InputGroupButtonIconSM, Label: "Show password",
    },
})
if canvas.Clicked(reveal) {
    revealed = !revealed
}

States#

Input Group states example rendered by the production Go component.

Enable JavaScript to run the preview. Go source and install commands remain available.

Usage
invalid := components.InputGroupSnapshot{
    ID: tree.ID(page, "email"), Label: "Project domain", Value: value,
    Invalid: true,
    InlineStart: components.InputGroupSlot{
        Kind: components.InputGroupSlotText, Text: "@", Separated: true,
    },
    InlineEnd: components.InputGroupSlot{
        Kind: components.InputGroupSlotButton, ID: tree.ID(page, "invite"),
        Text: "Invite", Disabled: true,
    },
}
components.PaintInputGroup(canvas, theme, invalidBounds, invalid)
locked := components.InputGroupSnapshot{
    ID: tree.ID(page, "locked"), Label: "Project domain",
    Value: "locked", Disabled: true,
}
components.PaintInputGroup(canvas, theme, lockedBounds, locked)

Installation

Copy the recipe into your own project.

Repository command
go run ./cmd/viva add --out ./components/local input-group

Source-owned usage#

This preview calls the production Go component directly. Stable IDs, values and open state remain owned by the application; the component only paints and declares interaction semantics.

  • Read the linked component source for every option and visual decision.
  • Use the native command to verify system text, focus, accessibility and platform integration.
  • The browser preview validates shared layout and scene behavior, not native performance.

Verification boundary#

The examples cover representative states supported by the current API. They do not imply that every desktop backend has completed hardware validation.

Keyboard

Use Tab to move between controls and Ctrl/⌘ K to search the catalog. Inside a preview, the Go runtime handles keyboard input.