MessageActions
Copy, thumbs up/down and regenerate under an assistant reply.
Code
import * as React from 'react';
import { MessageActions } from '@fruit-labs/design';
export default function Demo() {
return (
<MessageActions
text="Hello"
{...{
onRetry() {},
}}
/>
);
}Install
From npm:
npm install @fruit-labs/design
import { MessageActions } from '@fruit-labs/design';Or copy the TypeScript source into your project:
npx shadcn@latest add https://design.fruitlabs.online/r/message-actions.jsonGuidelines
- Show on hover on desktop, always on touch.
Props
| Prop | Type | Required |
|---|---|---|
text | string | No |
onFeedback | (v: 'up' | 'down') => void | No |
onRetry | () => void | No |