mirror of
https://github.com/lucide-icons/lucide.git
synced 2026-11-10 13:18:25 +00:00
* feat(metadata): reusable tag groups with `$group:` A `$group:<group-name>` marker in `tags` is replaced in place with the tags of `groups/<group-name>.json`: a small set of tags for what a variant suffix means, such as `-minus` → remove, delete. - Read groups in `readGroups` and resolve markers next to `$extends:`, failing on unknown groups and on `$group:` outside `tags` - Add `group.schema.json` and lint, spell-check and format `groups/*.json` - `pnpm checkIcons` also fails on literals a group already provides, and warns about icons that list a group's tags by hand and unused groups - Add the `minus`, `plus` and `x` groups and use them in `alarm-clock-minus`, `file-minus`, `file-plus` and `file-x` Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Fix group checker * Apply batched suggestions from code review Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * feat(metadata): reusable tag groups with `$group:` A `$group:<group-name>` marker in `tags` is replaced in place with the tags of `groups/<group-name>.json`: a small set of tags for what a variant suffix means, such as `-minus` → remove, delete. - Read groups in `readGroups` and resolve markers next to `$extends:`, failing on unknown groups and on `$group:` outside `tags` - Add `group.schema.json` and lint, spell-check and format `groups/*.json` - `pnpm checkIcons` also fails on literals a group already provides, and warns about icons that list a group's tags by hand and unused groups - Add the `minus`, `plus` and `x` groups and use them in `alarm-clock-minus`, `file-minus`, `file-plus` and `file-x` Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Fix group checker * Apply batched suggestions from code review Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * feat(metadata): reusable tag groups with `$group:` A `$group:<group-name>` marker in `tags` is replaced in place with the tags of `groups/<group-name>.json`: a small set of tags for what a variant suffix means, such as `-minus` → remove, delete. - Read groups in `readGroups` and resolve markers next to `$extends:`, failing on unknown groups and on `$group:` outside `tags` - Add `group.schema.json` and lint, spell-check and format `groups/*.json` - `pnpm checkIcons` also fails on literals a group already provides, and warns about icons that list a group's tags by hand and unused groups - Add the `minus`, `plus` and `x` groups and use them in `alarm-clock-minus`, `file-minus`, `file-plus` and `file-x` Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Fix group checker * Apply batched suggestions from code review Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * feat(metadata): reusable tag groups with `$group:` A `$group:<group-name>` marker in `tags` is replaced in place with the tags of `groups/<group-name>.json`: a small set of tags for what a variant suffix means, such as `-minus` → remove, delete. - Read groups in `readGroups` and resolve markers next to `$extends:`, failing on unknown groups and on `$group:` outside `tags` - Add `group.schema.json` and lint, spell-check and format `groups/*.json` - `pnpm checkIcons` also fails on literals a group already provides, and warns about icons that list a group's tags by hand and unused groups - Add the `minus`, `plus` and `x` groups and use them in `alarm-clock-minus`, `file-minus`, `file-plus` and `file-x` Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Fix group checker * Apply batched suggestions from code review Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2.4 KiB
2.4 KiB
applyTo
| applyTo |
|---|
| groups/*.json |
Groups
A group is a small, reusable set of tags for one icon variant — the modifier suffix in an icon name, such as -plus, -check or -off. Icons reference a group with a "$group:<group-name>" marker inside their tags array, and the marker is replaced at build time with the group's tags.
The file name without .json is the group name: the variant suffix it belongs to (plus for file-plus, question-mark for file-question-mark), in lowercase kebab-case. Each file has a $schema, a one-line description saying which meaning the group covers, and a non-empty tags array.
{
"$schema": "../group.schema.json",
"description": "Action: removing or deleting something",
"tags": ["remove", "delete"]
}
Rules
- One group per variant. Name the group after the variant suffix (
plus,minus,check,cog), sofile-plususes$group:plusandalarm-clock-minususes$group:minus. - Different suffixes with the same meaning share one group. Do not create a second group for a synonym:
-warningand-exclamation-pointuse$group:alert. When a meaning is spread over many suffixes, name the group after the meaning instead: every currency suffix (-euro,-dollar-sign,-japanese-yen…) uses$group:currency. - Tags describe what the variant means, not its glyph.
plusholdsadd,new,create;cogholdssettings,gear. Do not put the suffix itself (plus,cog,lock) in a group: tags must not repeat the icon name. - Keep groups small and generic. Only tags that hold for every icon that uses the group. If a tag is true for just some of them, it belongs on those icons as a literal.
- Not every icon with the suffix uses the group.
-offmeans "disabled" onwifi-offbut "allergy free" onwheat-off, and-xmeans "delete" onfile-xbut "mute" onvolume-x. Only icons where the variant carries the group's meaning use the marker; the others keep literal tags. - Do not add a group before it is used.
pnpm checkIconswarns about groups no icon references. - Groups do not nest. A group's
tagsare literal tags only — no$extends:or$group:markers. - Tags are lowercase, and follow the same conventions as icon tags.
Run pnpm run lint:json:groups to validate the files against the schema, and pnpm checkIcons to check how icons use them.