Select

Displays a list of options for the user to pick from, triggered by a button.

Installation

bun add elia
@import "tailwindcss";
@import "@aile.sh/elia/styles/elia.css";
@source "../node_modules/@aile.sh/elia";

Usage

import { useState } from "react";
import { Select } from "@aile.sh/elia";

const MODELS = [
  { value: "aile-nano", label: "aile-nano" },
  { value: "aile-core", label: "aile-core" },
  { value: "aile-pro", label: "aile-pro" },
  { value: "aile-vision", label: "aile-vision" },
];

export function Example() {
  const [model, setModel] = useState("");

  return (
    <Select
      className="w-52"
      options={MODELS}
      value={model}
      onChange={setModel}
      placeholder="Choose a model"
    />
  );
}

— elia design system · MIT · base · https://github.com/aile-sh/elia