Skip to content

Improve Theming and Attribution #847

@jacobsimionato

Description

@jacobsimionato

Proposal: Improve Theming and Attribution

Reason

The A2UI Protocol v0.9 mandates sub-agent attribution (agentDisplayName, iconUrl) and highlights branding via primaryColor. Current React implementations use hardcoded or haphazard styling, failing to meet these identity requirements.

Design

  1. Theme Context: Create a React ThemeContext in the react_prototype package.
  2. Surface Wrapper: A2uiSurface should wrap the rendered tree in a ThemeContext.Provider using the theme data from SurfaceModel.
  3. Attribution Component: Add an optional header component to A2uiSurface that displays the agent's icon and name if provided in the theme.
  4. CSS Variables: The theme provider should inject CSS custom properties (e.g., --a2ui-primary-color) into the surface's root DOM element, allowing widgets to use semantic colors.

Key Files

  • renderers/react_prototype/src/A2uiSurface.tsx
  • renderers/react_prototype/src/adapter.tsx

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Todo

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions