DocsComponentsTemplatesThemesGitHub

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.json

Guidelines

  • Show on hover on desktop, always on touch.

Props

PropTypeRequired
textstringNo
onFeedback(v: 'up' | 'down') => voidNo
onRetry() => voidNo

Edit this example on GitHub