tabler / tabler-icons

A set of over 5300 free MIT-licensed high-quality SVG icons for you to use in your web projects.
https://tabler.io/icons
MIT License
17.59k stars 876 forks source link

Categories for icons-react #1071

Open timheerwagen opened 3 months ago

timheerwagen commented 3 months ago

In addition to iconsList it would be nice to be able to import categories into react like on https://tabler.io/icons.

I also could not figure out how to use iconsList correctly. My workaround was to convert the icon names to Pascalcase and import them dynamically with dynamic from next.js.

My goal is to create an icon picker for my CMS, similar to https://tabler.io/icons, to select an icon, store it in my database and display the icon later on the frontend (dynamically).

Sparkenstein commented 3 months ago

I was just looking for this, I am glad I am not the only one,

something like

import  { SomeBrandIcon } from "@tabler-icons/react/brand"

would be lovely.

timheerwagen commented 3 months ago

I would prefer a list of icons for each category, because one place to import an icon is enough in my opinion.

import { categoryList } from "@tabler-icons/react"

categoryList could have following type:

type CategoryList = Record<string, string[]>