@ciceksepeti/cui-listbox
TypeScript icon, indicating that this package has built-in type declarations

0.0.22 • Public • Published

@ciceksepeti/cui-listbox

npm version storybook PRs Welcome license

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>
  );
}

Readme

Keywords

none

Package Sidebar

Install

npm i @ciceksepeti/cui-listbox

Weekly Downloads

18

Version

0.0.22

License

MIT

Unpacked Size

86.8 kB

Total Files

8

Last publish

Collaborators

  • admin.it