Checkpoint

A simple component for marking conversation history points and restoring the chat to a previous state.

What is React?
React is a JavaScript library for building user interfaces. It was developed by Facebook and is now maintained by Meta and a community of developers.
How does component state work?

Installation

pnpm dlx shadcn-svelte@latest add https://svelte-ai-elements.vercel.app/r/checkpoint.json

If you prefer using jsrepo, please install via the command below:

pnpm dlx jsrepo add @ai/elements/ai-elements/checkpoint

Props

Checkpoint

NameTypeDefault
class
string
children
Snippet
...restProps
HTMLAttributes<HTMLDivElement>

CheckpointIcon

NameTypeDefault
class
string
children
Snippet
size
number 16

CheckpointTrigger

NameTypeDefault
class
string
children
Snippet
variant
'default' | 'destructive' | 'outline' | 'secondary' | 'ghost' | 'link' 'ghost'
size
'default' | 'sm' | 'lg' | 'icon' 'sm'
tooltip
string
onclick
(e: MouseEvent) => void
disabled
boolean false