react-bootstrap-tagsinput
TypeScript icon, indicating that this package has built-in type declarations

0.7.6 • Public • Published

react-bootstrap-tagsinput

Made with create-react-library

Github Action NPM code style: prettier

Install

npm install --save react-bootstrap-tagsinput

Usage

import React, { useState } from 'react'

import { InputTags } from 'react-bootstrap-tagsinput'
import 'react-bootstrap-tagsinput/dist/index.css'

const App = () => {
  const [state, setState] = useState<string[]>([])
  return (
    <div style={{ margin: 10 }}>
      <div className='input-group'>
        <InputTags values={state} onTags={(value) => setState(value.values)} />
        <button
          className='btn btn-outline-secondary'
          type='button'
          data-testid='button-clearAll'
          onClick={() => {
            setState([])
          }}
        >
          Delete all
        </button>
      </div>
      <hr />
      <ol>
        {state.map((item, index) => (
          <li key={item + index}>{item}</li>
        ))}
      </ol>
    </div>
  )
}

Demo

License

MIT © Fahri Sönmez

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.7.6
    308
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.7.6
    308
  • 0.7.5
    0
  • 0.5.0
    70
  • 0.4.0
    0

Package Sidebar

Install

npm i react-bootstrap-tagsinput

Weekly Downloads

378

Version

0.7.6

License

MIT

Unpacked Size

158 kB

Total Files

27

Last publish

Collaborators

  • soenmez