@ciceksepeti/cui-listbox
v0.0.22
Published
ÇiçekSepeti Listbox Component
Downloads
194
Readme
@ciceksepeti/cui-listbox
Renders list of options in a accessible way.
Installing
Using Npm:
$ npm install @ciceksepeti/cui-listbox
Using Yarn:
$ yarn add @ciceksepeti/cui-listbox
Example
import React, { useState } from "react";
import { Listbox, ListboxItem } from "@ciceksepeti/cui-listbox";
import "@ciceksepeti/cui-listbox/styles.css";
function Demo(props) {
let [value, setValue] = useState("apple");
return (
<Listbox value={value} onChange={(value) => setValue(value)}>
<ListboxItem value="apple">apple</ListboxItem>
<ListboxItem value="orange">orange</ListboxItem>
<ListboxItem value="cherry">cherry</ListboxItem>
<ListboxItem value="banana">banana</ListboxItem>
</Listbox>
);
}