Skip to content
AI Elements

Branch

Step through alternative assistant generations.

Import

tsx
import { Branch } from "@cronus-ui/ui";
bash
npx cronus-ui add branch

Examples

API Reference

Generated from the component's exported types.

BranchLabels

Skip BranchLabels props table
PropTypeDefaultDescription
previous
string
next
string
page
string

BranchProps

Extends HTMLAttributes<HTMLDivElement>

Skip BranchProps props table
PropTypeDefaultDescription
defaultBranch
number0
onBranchChange
(branchIndex: number) => void
labels
BranchLabelsOverride default English strings.

BranchMessagesProps

Extends HTMLAttributes<HTMLDivElement>

No own props — see the extended type above for available props.

BranchSelectorProps

Extends HTMLAttributes<HTMLDivElement>

Skip BranchSelectorProps props table
PropTypeDefaultDescription
from
BranchRole"assistant"

BranchPreviousProps

Extends ComponentProps<typeof Button>

No own props — see the extended type above for available props.

BranchNextProps

Extends ComponentProps<typeof Button>

No own props — see the extended type above for available props.

BranchPageProps

Extends HTMLAttributes<HTMLSpanElement>

No own props — see the extended type above for available props.