Skip to content

Select

ztui selects: a single-value Language dropdown and a multi-value Tags dropdown

<Select> is a dropdown of options — single choice, or multiple for a set. Options are plain strings or { value, label } objects.

import { useState } from "react";
import { Select } from "@huyz0/ztui/react";
function LangPicker() {
const [lang, setLang] = useState("TypeScript");
return <Select options={["TypeScript", "Rust", "Go"]} value={lang} onChange={setLang} />;
}
  • options(string | { value, label })[].
  • value — the selected value (or string[] when multiple).
  • multiple — multi-select; onChange receives an array.
  • placeholder — shown when nothing is selected.

Full demo →