0.2.0 • Published 1 year ago

@bithero/tabler-webfont-vite v0.2.0

Weekly downloads
-
License
AGPL-3.0-or-later
Repository
-
Last release
1 year ago

tabler-webfont-vite

Tabler-icons as webfonts, compatible with vite; with multiple weight support.

License

This project is licensed under AGPL-3.0. See the LICENSE file for more informations.

Tabler version

The current version (0.2.0) was build with @tabler/icons v2.14.0.

Installation

yarn add @bithero/tabler-webfont-vite

Usage

// Import the css
// It enables you to use the font via the 'ti' class, and access individual icons via 'ti-<icon>':
//   <i class="ti ti-heart"></i>
import '@bithero/tabler-webfont-vite/dist/tabler-icons.css';

// Imports the iconmap / glyph_map into js
// Use it to access the raw unicode string for the icon; eg. iconmap['heart'] for \uf28b
import iconmap from '@bithero/tabler-webfont-vite';

Sizes

The fontfile comes in multiple sizes:

  • font-weight: 700 (or bold), is build with stroke-size="2" (tabler's default)
  • font-weight: 400 (or normal), is build with stroke-size="1.5" (this package's default)

Icon preview

The package ships with a tabler-icons.html file which contains every icon; just point your browser to it to preview the icons.