DocsComponentsTemplatesThemesGitHub

ModelPicker

Compact select for choosing a model or agent.

Code

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

export default function Demo() {
  return (
    <div
      style={{
        minHeight: 200,
      }}
    >
      <ModelPicker options={['Fast', 'Balanced', 'Deep']} defaultValue="Fast" />
    </div>
  );
}

Install

From npm:

npm install @fruit-labs/design

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

Or copy the TypeScript source into your project:

npx shadcn@latest add https://design.fruitlabs.online/r/model-picker.json

Guidelines

  • Show the model's short name; put details in option labels.

Props

PropTypeRequired
labelstringNo
optionsArray<string | { value: string; label: React.ReactNode }>Yes
valuestringNo
defaultValuestringNo
onChange(value: string) => voidNo
widthnumberNo
classNamestringNo

Edit this example on GitHub