DocsComponentsTemplatesThemesGitHub

SuggestionChips

Starter prompts shown before the first message.

Code

import * as React from 'react';
import { SuggestionChips } from '@fruit-labs/design';

export default function Demo() {
  return (
    <SuggestionChips
      items={[
        {
          label: 'Summarize a document',
          icon: 'file',
        },
        {
          label: 'Draft an email',
          icon: 'mail',
        },
        {
          label: 'Analyze a spreadsheet',
          icon: 'chart',
        },
      ]}
    />
  );
}

Install

From npm:

npm install @fruit-labs/design

import { SuggestionChips } from '@fruit-labs/design';

Or copy the TypeScript source into your project:

npx shadcn@latest add https://design.fruitlabs.online/r/suggestion-chips.json

Guidelines

  • 3–4 concrete, task-shaped suggestions.

Props

PropTypeRequired
itemsArray<string | { label: string; icon?: string }>Yes
onSelect(label: string) => voidNo
classNamestringNo

Edit this example on GitHub