Skip to content
Chat & AI

Context

Hover card for language-model token usage.

Import

tsx
import { Context } from "@cronus-ui/ui";
bash
npx cronus-ui add context

Examples

.cronus

No audit fixture declares this family in .cronus yet.

React onlyParity: Not portedParity scoreboard

API Reference

Generated from the component's exported types.

ContextLabels

Skip ContextLabels props table
PropTypeDefaultDescription
input
string——
output
string——
reasoning
string——
cache
string——
totalCost
string——
usage
string——

ContextProps

Extends ComponentProps<typeof HoverCard>, Omit<ContextSchema, "labels">

Skip ContextProps props table
PropTypeDefaultDescription
labels
ContextLabels—Override default English strings.
open
boolean—Controlled open state.
defaultOpen
boolean—Uncontrolled initial open state.
onOpenChange
(open: boolean) => void—Called when the open state changes.
children
ReactNode—Contents of the component.

ContextTriggerProps

Extends ComponentProps<typeof Button>

Skip ContextTriggerProps props table
PropTypeDefaultDescription
variant
string—Visual variant.
size
string—Control size.
asChild
boolean—Render as the child element via Slot.
disabled
boolean—Disables pointer and keyboard interaction.
type
string—Native type of the underlying element.
children
ReactNode—Contents of the component.
className
string—Additional class names merged onto the root.

ContextContentProps

Extends ComponentProps<typeof HoverCardContent>

Skip ContextContentProps props table
PropTypeDefaultDescription
side
"top" | "right" | "bottom" | "left"—Preferred side of the trigger.
align
"start" | "center" | "end"—Alignment along the chosen side.
sideOffset
number—Distance in pixels from the trigger.
alignOffset
number—Offset along the alignment axis.
forceMount
boolean—Keep the node mounted when closed, for exit animation.
asChild
boolean—Render as the child element via Slot.
children
ReactNode—Contents of the component.
className
string—Additional class names merged onto the root.

ContextContentHeaderProps

Extends HTMLAttributes<HTMLDivElement>

Skip ContextContentHeaderProps props table
PropTypeDefaultDescription
className
string—Additional class names merged onto the root.
children
ReactNode—Contents of the component.
id
string—DOM id of the root element.

ContextContentBodyProps

Extends HTMLAttributes<HTMLDivElement>

Skip ContextContentBodyProps props table
PropTypeDefaultDescription
className
string—Additional class names merged onto the root.
children
ReactNode—Contents of the component.
id
string—DOM id of the root element.

ContextContentFooterProps

Extends HTMLAttributes<HTMLDivElement>

Skip ContextContentFooterProps props table
PropTypeDefaultDescription
className
string—Additional class names merged onto the root.
children
ReactNode—Contents of the component.
id
string—DOM id of the root element.

ContextInputUsageProps

Extends HTMLAttributes<HTMLDivElement>

Skip ContextInputUsageProps props table
PropTypeDefaultDescription
className
string—Additional class names merged onto the root.
children
ReactNode—Contents of the component.
id
string—DOM id of the root element.

ContextOutputUsageProps

Extends HTMLAttributes<HTMLDivElement>

Skip ContextOutputUsageProps props table
PropTypeDefaultDescription
className
string—Additional class names merged onto the root.
children
ReactNode—Contents of the component.
id
string—DOM id of the root element.

ContextReasoningUsageProps

Extends HTMLAttributes<HTMLDivElement>

Skip ContextReasoningUsageProps props table
PropTypeDefaultDescription
className
string—Additional class names merged onto the root.
children
ReactNode—Contents of the component.
id
string—DOM id of the root element.

ContextCacheUsageProps

Extends HTMLAttributes<HTMLDivElement>

Skip ContextCacheUsageProps props table
PropTypeDefaultDescription
className
string—Additional class names merged onto the root.
children
ReactNode—Contents of the component.
id
string—DOM id of the root element.