@chogng/lxicons
v1.0.19
Published
A tree-shakable colorful SVG icon library.
Readme
Lxicons
This is a public npm package about the customized SVG icon library.
Using the chogng Lxicon Lookup you can preview and search for icons.
Install
You can use the npm package and install into your project via:
npm i @chogng/lxiconsThis package was renamed from lxicon to lxicons.
Usage
import { lxAdd, renderIcon } from '@chogng/lxicons';
const container = document.getElementById('app')!;
renderIcon(lxAdd, container);Building Locally
All icons are stored under src/icons. The mapping data is stored in src/mapping.json.
Install dependencies
After cloning this repo, install dependencies by running:
npm installBuild
npm run buildLicenses
This repository's code is licensed under the MIT License.
Some icon assets or brand marks may be subject to their own upstream licenses or trademark rules. See THIRD_PARTY_NOTICES.md for the current notices.
Except where explicitly noted in THIRD_PARTY_NOTICES.md, the SVG icon artwork and generated source files in this repository are intended to be original works distributed by this project under the MIT License.
Third-party names, logos, service marks, and trademarks remain the property of their respective owners and are not transferred, assigned, or relicensed by this repository's MIT License.
Disclaimer
This project is provided on an "as is" basis, without warranties or guarantees of any kind.
Anyone who uses, redistributes, modifies, or commercializes the icons or generated assets from this repository is solely responsible for checking whether any third-party copyright, trademark, attribution, or other usage restrictions apply to their use case.
In particular, brand-related icons and names may remain subject to their respective owners' trademark or brand-use rules even when the surrounding project code is MIT-licensed.
This repository does not provide legal advice, and the notices here are for project transparency only.
Rights concerns
If you believe a file in this repository improperly uses your copyright, trademark, or other protected material, please open an issue with the relevant file path and claim so the material can be reviewed and, if appropriate, corrected or removed.
Update packages
You can run npm outdated to check for available dependency updates. To update packages, run:
npm updateAdd icons
- Add the new SVG file to
src/icons/. - Run
npm run buildto regeneratesrc/mapping.jsonandicons.json. Although always runnpm publishdid I. - Optionally update
src/mapping.jsonif the icon needs direct-use aliases or extra search keywords, then runnpm run buildagain.
src/mapping.json supports both the legacy array form and an object form for richer metadata:
{
"60000": {
"name": "plus",
"aliases": ["add"],
"keywords": ["create", "new", "zoom-in"]
}
}name is the canonical icon name and should match the SVG filename. aliases contains the extra icon names that should resolve directly to the same icon, so they need to stay unique and unambiguous. keywords is only for preview search and does not create import/export aliases. name, aliases, and keywords are all included in the static preview search index, so you do not need to edit index.html just to add search keywords.
