reacted-tabler-icons
v1.0.9
Published
A dead simple project which is providing a React wrapper over a fantastic set of Tabler Icons
Downloads
5
Maintainers
Readme
React Tabler Icons
A dead simple project which is providing a React wrapper over a fantastic set of Tabler Icons
Installation
npm install reacted-tabler-icons
or
yarn add reacted-tabler-icons
Usage
import { Icon } from 'reacted-tabler-icons'
const renderedIcon = <Icon name={'ArrowDown'} />
A set of 3 predefined sizes can be used
// Will output a bigger icon
const renderedIcon = <Icon name={'ArrowLeft'} size={'md'} />
You can also specify your own size if you want to
// Will output an icon with 48x48px size
const renderedIcon = <Icon name={'ArrowLeft'} size={[48, 48]} />
Defining custom stroke width
You can set a stroke width for each icon individually
const renderedIcon = <Icon name={'ArrowDown'} strokeWidth={'5px'} />
Loading individual icons
If you do not want to use an icon wrapper, it's possible to load individual icons i.e.
import { Accessible } from 'reacted-tabler-icons'
const renderedIcon = <Accessible width={24} height={24} strokeWidth={'5px'} />
Roadmap
- [x] Code splitting
- [ ] More properties support
- [ ] Open sourcing the generator code
License
Package is MIT licensed