# semantic-multi-cascader

> A multiple cascader component for semantic

Latest version **0.1.12** (published 2022-04-19) · MIT license · 0 weekly downloads

## Install

```sh
npm install semantic-multi-cascader
pnpm add semantic-multi-cascader
yarn add semantic-multi-cascader
bun add semantic-multi-cascader
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.12 |
| Published | 2022-04-19 |
| First published | 2022-02-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 3 |
| Unpacked size | 127.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Jamal Hassouni |
| Maintainers | jamalhassouni |
| Keywords | react, component, semantic ui, data, modulable, dropdown, multi dropdown, semantic-ui, multiple cascader, cascader react, cascader, multiple cascader, react-semantic-ui, Multiple Selection, Multiple Dropdown, Semantic UI React |

## Links

- npm: https://www.npmjs.com/package/semantic-multi-cascader
- Repository: https://github.com/jamalhassouni/semantic-multi-cascader
- Homepage: https://github.com/jamalhassouni/semantic-multi-cascader/
- Issues: https://github.com/jamalhassouni/semantic-multi-cascader/issues
- npm.io page: https://npm.io/package/semantic-multi-cascader

## Dependencies (3)

- [core-js](https://npm.io/package/core-js.md) ^3.21.1
- [classnames](https://npm.io/package/classnames.md) ^2.3.1
- [unstated-next](https://npm.io/package/unstated-next.md) ^1.1.0

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 0.1.12 (latest) — 2022-04-19
- 0.1.11 — 2022-03-08
- 0.1.10 — 2022-02-25
- 0.1.9 — 2022-02-15
- 0.1.8 — 2022-02-15
- 0.1.7 — 2022-02-15
- 0.1.6 — 2022-02-09
- 0.1.5 — 2022-02-09
- 0.1.4 — 2022-02-09
- 0.1.3 — 2022-02-09
- 0.1.2 — 2022-02-09
- 0.1.1 — 2022-02-09
- 0.1.0 — 2022-02-09

## README

# semantic-multi-cascader

![PRs Welcome](https://img.shields.io/badge/PRs-welcome-ff69b4.svg) ![MIT license](https://img.shields.io/badge/License-MIT-blue.svg)
![Codecov Coverage](https://img.shields.io/codecov/c/github/HelKyle/semantic-multi-cascader/master.svg)
[![npm](https://img.shields.io/npm/v/semantic-multi-cascader)](https://www.npmjs.com/package/semantic-multi-cascader)

A multiple cascader component for semantic

[![semantic-multi-cascader](https://nodei.co/npm/semantic-multi-cascader.png)](https://npmjs.org/package/semantic-multi-cascader)

<div style="max-width: 420px">
  <img src="demo.png" alt="demo" />
</div>

## How to use?

```shell
npm install semantic-multi-cascader
```

or

```shell

yarn add semantic-multi-cascader
```

```js
import MultiCascader from "semantic-multi-cascader";
import  "semantic-multi-cascader/dist/semantic-multi-cascader.min.css";
const [value, setValue] = React.useState([]);
const options = [
  { text: "CSS", value: "css" },
  { text: "Graphic Design", value: "design" },
  { text: "HTML", value: "html" },
  {
    text: "Javascript Frameworks",
    value: "javascript frameworks",
    children: [
      {
        text: "Angular ",
        value: "angular ",
        children: [
          { text: "Angular v1 ", value: "angular v1 " },
          { text: "Angular v2 ", value: "angular v2 " },
        ],
      },
      { text: "React js ", value: "React js" },
      { text: "Vue js ", value: "Vue js" },
      { text: "Ember js ", value: "Ember js" },
    ],
  },
];
return (
  <MultiCascader
    value={value}
    onChange={setValue}
    options={options}
    cancelText={"no"}
    cancelBtnClass="cancel-btn"
    confirmBtnClass="confirm-btn"
    okText="ok"
    selectAll={false}
    isSingle={true}
    placeholder="Select Skills"
  />
)
```

### Props

| Props               | Type                                                                                | Description                                                                                                                                                           |
| ------------------- | ----------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| value               | string[]                                                                            | Selected value                                                                                                                                                        |
| options                | TreeNode[]  (required)                                                                        | Cascader options TreeNode  see [Options Props](#options-props)                                                                      |
| allowClear          | boolean    (optional)                                                                         | Whether allow clear                                                                                                                                                   |
| placeholder         | string    (required)                                                                          | The input placeholder                                                                                                                                                 |
| onChange            | (newVal) => void (required)                                                                   | Callback when finishing value select                                                                                                                                  |
| selectAll           | boolean       (optional)                                                                      | Whether allow select all                                                                                                                                              |
| isSingle           | boolean       (optional)                                                                      | Enable Single Selection                                                                                                                                             |
| className           | string    (optional)                                                                          | The additional css class                                                                                                                                              |
| cancelBtnClass           | string    (optional)                                                                          | The additional css class for cancel button                                                                                                                                             |
| confirmBtnClass           | string    (optional)                                                                          | The additional css class for ok button                                                                                                                                             |
| style               | React.CSSProperties (optional)                                                                | The additional style                                                                                                                                                  |
| disabled            | boolean        (optional)                                                                     | Whether disabled select                                                                                                                                               |
| okText              | string      (optional)                                                                        | The text of the Confirm button                                                                                                                                        |
| cancelText          | string       (optional)                                                                       | The text of the Cancel button                                                                                                                                         |
| selectAllText       | string    (optional)                                                                          | The text of the SelectAll radio                                                                                                                                       |
| maxTagCount         | number \| responsive (optional)                      |  Max tag count to show. responsive will cost render performance                                                                                                                                          |

### Options Props

| Props               | Type                                                                                | Description                                                                                                                                                           |
| ------------------- | ----------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| text               | string    (required)                                                                      |  Displayed text                                                                                                                  |
| value               | string   (required)                                                                       | Selected value                                                                                                                                                        |
| children?               | TreeNode  (optional)                                                                          |  Nested children  (same options props )                                                                                                                                                       |
| isLeaf?               | boolean  (optional)                                                                          |  Tell component this node is a leaf node                                                                                                                                                        |

## Contributing

The people who contribute to semantic-multi-cascader do so for the love of open source, our users and ecosystem, and most importantly, pushing the web forward together.Developers like you can help by contributing to rich and vibrant documentation, issuing pull requests to help us cover niche use cases, and to help sustain what you love about semantic-multi-cascader. Anybody can help by doing any of the following: use semantic-multi-cascader in projects,Contribute to the core repository.

All pull requests are welcome !

## Changelog

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

## License

semantic-multi-cascader uses the MIT license. See [LICENSE](LICENSE.md) for more details.

---
_Source: https://npm.io/package/semantic-multi-cascader · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
