Skip to content

A2UI Vue basic catalog: TextField overflows its container by 16px (width: 100% plus margin: 8px) #8565

Backlog

Description

@justin-john

Package: @copilotkit/vue 1.85.0, A2UI Vue basic catalog (vueBasicCatalog)

What happens

A TextField placed directly in a Column, with no Card around it, is wider than its container. Its right edge extends 8px past the surface. The A2UI activity renderer has overflow: auto, so the field's right border is clipped.

Why

The component's wrapper is rendered with both of these inline styles:

<div style="display: flex; flex-direction: column; gap: 4px; width: 100%; margin: 8px;">
  <label>…</label>
  <input style="padding: 8px; width: 100%; border: …; border-radius: 8px; box-sizing: border-box;">
</div>

width: 100% makes the wrapper as wide as its parent, and the 8px margin on each side is added on top, so the wrapper's outer width is the parent's width plus 16px. Inside a Card it goes unnoticed, because the card's padding absorbs it.

Four other components in the same catalog combine width: "100%" with the shared leaf margin in the same way. I confirmed the overflow for TextField only.

To reproduce

  1. Render a surface whose root is a Column containing a TextField (no Card).
  2. Show it in a narrow container, for example a 400px chat panel.
  3. The input's right border is cut off. In DevTools, the field's wrapper is 16px wider than the column.

Expected

The field fits inside its container, with its margin on both sides.

Suggested fix

Don't combine width: 100% with a margin on the wrapper. Either drop the explicit width and let the wrapper stretch (align-self: stretch in a column), or use width: calc(100% - 2 * margin). The Lit basic catalog in @a2ui/web_core exposes --a2ui-textfield-width for this; the Vue catalog has no equivalent, and the a2ui.theme option isn't read when rendering.

Workaround

[data-activity-type='a2ui-surface'] :has(> input, > textarea, > select) {
  width: auto !important;
  align-self: stretch;
}

Activity

  1. copilotkit-outpost-bot commented on Nov 25, 2026

    @copilotkit-outpost-bot

    ⚠️ This is an AI-generated response.

    This needs a maintainer review to give you a reliable next step.


    🤖 Generated by CopilotKit AI Support · Documentation


    Was this helpful? React with 👍 or 👎

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions