Skip to main content

Chat

RingCard

An incoming call, with the caller and the person's choice of audio, video or decline.

Call state

Mara Vale

Video call

Shall we take the scenic route?

Install

Hand it to your agent
Add RingCard from Ouro UI to this app. Read https://ui.ouroboros.bot/docs/ring-card.md first and follow it.

Or by hand. Once per app, with Tailwind CSS v4 and an @/* path alias (Ouro HX is built on Base UI, so --base base; skip -t in an existing app):

npx shadcn@latest init --base base --preset nova --yes --no-monorepo
npx shadcn@latest add ourostack/ouro-ui/ouro-base#v1.3.823

Then the component (Installing):

npx shadcn@latest add ourostack/ouro-ui/ring-card#v1.3.823
import { RingCard } from "@/components/ouro/ring-card/ring-card";

Paths use shadcn's default @/ alias; the CLI rewrites them to yours.

Example

<RingCard arriving caller="Mara Vale" kind="video" announcement="Mara Vale is calling."
  onDecline={decline} onAudio={answerAudio} onVideo={answerVideo} />

Use instead when

  • Use Alert instead when showing an app notice, and ConfirmDialog when a decision must interrupt.

Props

Type: RingCardProps.

announcement (required)
Type: string
The ring's assertive announcement, including any page-owned shortcuts. Clear after the person acts.
arriving
Type: boolean
Animate a newly received call. Omit for a call already present when the page loads.
avatar
Type: { src?: string | undefined }
The caller's photo; their initials stand in while it loads.
caller (required)
Type: string
Who is calling.
chips
Type: ReactNode
Quiet alternatives, such as a Button to message instead. Hidden during pending and failure.
className
Type: string
Layout only: width, margins and placement. Appearance belongs to RingCard.
failure
Type: { title: string; line?: string | null | undefined; action: ReactNode; announcement: string } | null
Failure content, a host-provided recovery control and a polite announcement.
keys
Type: { decline: string; audio: string; video: string }
Optional page-owned shortcuts, shown in tooltips. RingCard registers no keyboard handlers.
kind (required)
Type: "audio" | "video"
How the incoming call arrives.
labels
Type: { region: (caller: string) => string; audioCall: string; videoCall: string; decline: string; audio: string; video: string; answerAudio: string; answerVideo: string }
Translate the card's words with the rest of the app.
note
Type: string | null
The caller's optional note.
onAudio (required)
Type: MouseEventHandler<HTMLButtonElement>
The person's audio answer; never offer it through an agent door.
onDecline (required)
Type: MouseEventHandler<HTMLButtonElement>
The person's decline action; never offer it through an agent door.
onVideo (required)
Type: MouseEventHandler<HTMLButtonElement>
The person's video answer; never offer it through an agent door.
pending
Type: { label: string; media: "audio" | "video" | null | (string & { 'Use "audio", "video" or null': never }) } | null
A calm line instead of the choices while the call connects or declines.
ref
Type: Ref<HTMLDivElement>
Reaches the rendered element.

Native attributes

Also accepts the attributes in React's HTMLAttributes (id, aria-*, event handlers), passed to the rendered element, except those named on this page.

className is for layout only

Pass margins, width and grid placement (mt-4, w-full, col-span-2).

Appearance comes from props, not classes. In development, a class that sets appearance logs one warning per component instance, naming the prop to use instead. A class sets appearance when, after its variants (hover:, sm:) and any ! are removed, it starts with bg-, text-, border-, rounded-, shadow-, font-, ring-, from-, via-, to-, fill- or stroke-, or is border, rounded, shadow or ring, or has a dark: variant. Text wrapping, overflow and table layout classes (text-wrap, text-ellipsis, border-collapse) are layout and do not warn.

Alignment classes (text-center) warn too: set alignment on a parent element.