Skip to content

Agent skill that draws an original icon library matching your design system (React, Vue, Svelte, React Native, SVG).

2.8 KB
Raw Blame

@example/icons-outline

12 icons in the outline style, drawn on a 24 px grid with a 20 px live area. Generated by the generate-icons skill from icons.json. Do not edit the generated files by hand: change the source and run the build again.

Use

import { HomeIcon } from "@example/icons-outline"
// or, for the smallest bundle: import HomeIcon from "@example/icons-outline/icons/home"

<HomeIcon />                       // decorative: aria-hidden
<HomeIcon size={16} title="Home" /> // informative: role="img" + <title>
  • size sets width and height (default 24).
  • Without title or aria-label the icon is decorative and gets aria-hidden. With either one it becomes role="img" with an accessible name. Use that when the icon is the only thing that carries the meaning (an icon-only button still needs its own aria-label on the button).
  • Each icon is its own module, so bundlers keep only the ones you import.

Colors and states

Every shape is painted with a CSS variable per tone (--ic-line), falling back to currentColor, so the icons work with no setup. Import icons.css once to get the exact palette, states and dark mode:

@import "@example/icons-outline/icons.css";

States follow the markup: :hover on links and buttons, aria-current="page", aria-selected, aria-pressed and data-icon-state="active" for active, :disabled, aria-disabled and data-icon-state="disabled" for disabled. Dark mode follows .dark, [data-theme="dark"]. To recolor one place, set the variables there:

.on-brand { --ic-line: currentColor; }

Files

Path What it is
src/ One component per icon plus an index (absent for plain SVG).
svg/ Standalone SVGs with the default light palette in hex: for <img>, e-mail, Figma.
sprite.svg All icons as <symbol>, painted with the CSS variables.
icons.css The tone variables per state and theme.
manifest.json Names, labels, groups and tags, for search or docs.
catalog.html Review page: every icon in every state and size, light and dark.

Icons

Name Label Group Component
home Home navigation HomeIcon
search Search navigation SearchIcon
bell Notifications navigation BellIcon
settings Settings navigation SettingsIcon
user Account people UserIcon
calendar Calendar time CalendarIcon
chart Reports data ChartIcon
mail Mail communication MailIcon
lock Lock security LockIcon
cart Cart commerce CartIcon
trash Delete actions TrashIcon
check-circle Done status CheckCircleIcon

Regenerate

python3 <skill>/scripts/validate.py icons.json
python3 <skill>/scripts/build.py icons.json --out .