Skip to content

Commit 2551702

Browse files
committed
Update docs
1 parent 2ebd564 commit 2551702

4 files changed

Lines changed: 27 additions & 59 deletions

File tree

.changeset/cuddly-jeans-trade.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"ai-elements": minor
3+
---
4+
5+
Update docs

apps/docs/content/components/(chatbot)/checkpoint.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,10 @@ const restoreAndBranch = (messageIndex: number) => {
198198
description: "The text or content to display in the trigger button.",
199199
type: "React.ReactNode",
200200
},
201+
tooltip: {
202+
description: "Optional tooltip text shown on hover.",
203+
type: "string",
204+
},
201205
variant: {
202206
description: "The button variant style.",
203207
type: "string",

apps/docs/content/components/(chatbot)/confirmation.mdx

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ import { CheckIcon, XIcon } from "lucide-react";
2828
import { Button } from "@/components/ui/button";
2929
import {
3030
Confirmation,
31+
ConfirmationTitle,
3132
ConfirmationRequest,
3233
ConfirmationAccepted,
3334
ConfirmationRejected,
@@ -237,6 +238,19 @@ Shows the rejected status when user rejects and state is `output-denied`.
237238
}}
238239
/>
239240

241+
### `<ConfirmationTitle />`
242+
243+
A styled description element for displaying a title or label within the confirmation alert.
244+
245+
<TypeTable
246+
type={{
247+
"...props": {
248+
description: "Any other props are spread to the underlying AlertDescription component.",
249+
type: "React.ComponentProps<typeof AlertDescription>",
250+
},
251+
}}
252+
/>
253+
240254
### `<ConfirmationRequest />`
241255

242256
<TypeTable

apps/docs/content/components/(chatbot)/message.mdx

Lines changed: 4 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -313,14 +313,9 @@ export default ActionsDemo;
313313

314314
<TypeTable
315315
type={{
316-
from: {
317-
description:
318-
"Aligns the selector for user, assistant or system messages.",
319-
type: 'UIMessage["role"]',
320-
},
321316
"...props": {
322-
description: "Any other props are spread to the selector container.",
323-
type: "React.HTMLAttributes<HTMLDivElement>",
317+
description: "Any other props are spread to the underlying ButtonGroup component.",
318+
type: "React.ComponentProps<typeof ButtonGroup>",
324319
},
325320
}}
326321
/>
@@ -360,66 +355,16 @@ export default ActionsDemo;
360355
}}
361356
/>
362357

363-
### `<MessageAttachments />`
358+
### `<MessageToolbar />`
364359

365-
A container component for displaying file attachments in a message. Automatically positions attachments at the end of the message with proper spacing and alignment.
360+
A container for placing actions and branch selectors below a message. Lays out children in a horizontal row with space-between alignment.
366361

367362
<TypeTable
368363
type={{
369-
children: {
370-
description:
371-
"MessageAttachment components to render. Returns null if no children provided.",
372-
type: "ReactNode",
373-
},
374364
"...props": {
375365
description: "Any other props are spread to the root div.",
376366
type: 'React.ComponentProps<"div">',
377367
},
378368
}}
379369
/>
380-
381-
**Example:**
382-
383-
```tsx
384-
<MessageAttachments className="mb-2">
385-
{files.map((attachment) => (
386-
<MessageAttachment data={attachment} key={attachment.url} />
387-
))}
388-
</MessageAttachments>
389-
```
390-
391-
### `<MessageAttachment />`
392-
393-
Displays a single file attachment. Images are shown as thumbnails (96px × 96px) with rounded corners. Non-image files show a paperclip icon with the filename.
394-
395-
<TypeTable
396-
type={{
397-
data: {
398-
description: "The file data to display. Must include url and mediaType.",
399-
type: "FileUIPart",
400-
},
401-
onRemove: {
402-
description:
403-
"Optional callback fired when the remove button is clicked. If provided, a remove button will appear on hover.",
404-
type: "() => void",
405-
},
406-
"...props": {
407-
description: "Any other props are spread to the root div.",
408-
type: "React.HTMLAttributes<HTMLDivElement>",
409-
},
410-
}}
411-
/>
412-
413-
**Example:**
414-
415-
```tsx
416-
<MessageAttachment
417-
data={{
418-
type: "file",
419-
url: "https://example.com/image.jpg",
420-
mediaType: "image/jpeg",
421-
filename: "image.jpg",
422-
}}
423-
onRemove={() => console.log("Remove clicked")}
424-
/>
425370
```

0 commit comments

Comments
 (0)