@times-design-system/icons
v1.3.3
Published
Icon components for Times Design System
Maintainers
Readme
@times-design-system/icons
React icon components for the Times Design System: 3,893 icons in filled and outlined variants, compiled from the SVGs in src/.
Installation
yarn add @times-design-system/iconsreact (18 or 19) is a peer dependency.
Usage
Import icons individually. Each icon is its own module, so bundlers include only what you use:
import FilledSearch from '@times-design-system/icons/filled_search';
import { Outlined_Close } from '@times-design-system/icons';
<FilledSearch width={20} height={20} className="search-icon" />;
<Outlined_Close color="#9b1f45" aria-label="Close" />;- Subpaths use the icon name (
filled_search,outlined_check_circle) — the same keys asIconName. - Named exports use the component name (
Filled_Search,Outlined_Check_Circle). - Props: any SVG attribute, plus
width/height(default24) andcolor(defaultcurrentColor). Refs are forwarded to the<svg>.
iconMap maps every IconName to its component. Importing it pulls every icon into your bundle, so only use it where you genuinely need dynamic lookup of arbitrary names.
Formats
- ESM (
.js) and CommonJS (.cjs) for every icon and the package root. - Typings for both module systems;
IconName,IconPropsandIconComponentare exported from the root. "sideEffects": false.
Development
yarn workspace @times-design-system/icons build # node scripts/build.jsAdd or edit SVGs in src/<category>/<filled|outlined>/<name>.svg, then rebuild.
