A2uiBasicCatalogV1.Card

interface A2uiBasicCatalogV1.Card : A2uiComponent


The A2UI "Card" component for displaying content in a styled container.

Schema Properties:

  • accessibility (Dynamic Custom, optional): Accessibility attributes for the card.

  • weight (Number, optional): The relative weight of the component within a Row or Column. May only be set when the component is a direct descendant of a Row or Column. See WeightProperty.

  • child (Component ID String, required): The ID of the child component to be rendered inside the card. Multiple elements must be wrapped in a layout container (e.g. Row or Column).

Summary

Public companion properties

DynamicA2uiProperty<A2uiBasicCatalogV1.AccessibilityAttributes>

The A2uiProperty for the "accessibility" property of a Card.

StaticA2uiProperty<String>

The A2uiProperty for the "child" property of a Card.

Public functions

open Unit
@Composable
A2uiComponentScope.Content(
    properties: A2uiComponentProperties,
    modifier: Modifier
)

Emits the UI for this component.

Unit
@Composable
A2uiComponentScope.TypedContent(
    childId: String,
    accessibility: A2uiBasicCatalogV1.AccessibilityAttributes?,
    modifier: Modifier
)

Renders the Card with its resolved property values.

Public properties

open String

A semantic description of the component's behavior and purpose.

open String

The unique string identifier for this component type (e.g., "Text", "Button").

open List<A2uiProperty<*>>

The list of typed properties expected by this component.

Inherited functions

From androidx.a2ui.compose.ui.A2uiComponent
open Boolean

Determines whether this component is ready to be rendered.

Public companion properties

AccessibilityProperty

Added in 1.0.0-alpha01
val AccessibilityPropertyDynamicA2uiProperty<A2uiBasicCatalogV1.AccessibilityAttributes>

The A2uiProperty for the "accessibility" property of a Card.

ChildProperty

Added in 1.0.0-alpha01
val ChildPropertyStaticA2uiProperty<String>

The A2uiProperty for the "child" property of a Card.

Public functions

A2uiComponentScope.Content

@Composable
open fun A2uiComponentScope.Content(
    properties: A2uiComponentProperties,
    modifier: Modifier
): Unit

Emits the UI for this component.

This function is invoked within the A2uiComponentScope, which provides access to extensions for evaluating reactive data bindings, rendering nested children, dispatching user actions, and reporting runtime errors.

Parameters
properties: A2uiComponentProperties

The stable properties wrapper from which to extract static payloads or bind dynamic data paths.

modifier: Modifier

The Modifier applied to the root of this component's layout.

A2uiComponentScope.TypedContent

@Composable
fun A2uiComponentScope.TypedContent(
    childId: String,
    accessibility: A2uiBasicCatalogV1.AccessibilityAttributes?,
    modifier: Modifier
): Unit

Renders the Card with its resolved property values.

Parameters
childId: String

the ID of the child component inside the card

accessibility: A2uiBasicCatalogV1.AccessibilityAttributes?

accessibility attributes for the card

modifier: Modifier

Modifier to apply to the layout

Public properties

description

open val descriptionString

A semantic description of the component's behavior and purpose.

This is included in the generated schema to help the agent understand when and how it should output this component.

name

open val nameString

The unique string identifier for this component type (e.g., "Text", "Button").

This matches the "component" field in the A2UI protocol's component payloads and is used by the framework to route incoming payloads to this specific implementation.

Note: This name must be unique within an A2uiCatalog.

properties

open val propertiesList<A2uiProperty<*>>

The list of typed properties expected by this component.

The properties serve two purposes:

  1. To automatically generate the component's JSON schema for the agent.

  2. To serve as type-safe tokens for extracting payloads or resolving dynamic data bindings from A2uiComponentProperties at runtime.