# KptIcon (kpt-icon) An inline SVG icon (the Tabler Icons set - MIT). The size is inherited from `font-size` (1em), the color from `currentColor`. Import: `import { KptIcon } from '@konce-pt/angular';` ## Selector `kpt-icon` ## Inputs - `name`: string (required) - an icon name from the registry. Deliberately not a union of the built-in names: once the Tabler set is registered there are 5130 legal names, so a closed union would reject icons that work at runtime. - `size`: string (optional, e.g. '1.25rem') - otherwise inherited from font-size - `label`: string - a name for screen readers; with it the icon is `role="img"`, without it `aria-hidden` ## Available names (built in, no configuration) menu, x, chevron-up, chevron-down, chevron-left, chevron-right, check, search grip-vertical, info, alert-triangle, circle-check, circle-x, calendar, copy, link, code bold, italic, underline, strikethrough, list, list-numbers, indent-increase indent-decrease, clear-formatting, star, plus, upload, dots-vertical, photo, trash, pencil eye, eye-off, minus, arrow-up, arrow-down, zoom-in, info-circle, phone, map-pin, world clock, align-left, align-center, align-right, align-justified, palette, highlight clipboard, clipboard-text, table, mail, share, external-link, crosshair adjustments-horizontal, sun, moon, bell, settings, users, user-circle, logout, login layout-dashboard, home, activity, cube, shopping-cart, currency-dollar, arrow-left arrow-right, arrow-up-right, arrow-down-right, chart-bar, chart-line, filter, download refresh, dots, brand-github, brand-google, layout-grid, grid-dots, checks, paperclip send, message-circle, corner-up-left, mood-smile, device-floppy, arrow-back-up, printer, selector These cover both what the components themselves draw and the staples of an application shell (theme, notifications, account, navigation, KPI). A typical admin panel needs nothing else. ## The full set (5130 Tabler icons) Two paths, and the difference is the bundle. `@konce-pt/angular/icons` exposes every icon as its own export, so importing by name lets the bundler keep only what you used: // Production: two icons reach the bundle. import { LayoutDashboard, Rocket } from '@konce-pt/angular/icons'; import { provideKptIcons } from '@konce-pt/angular'; bootstrapApplication(App, { providers: [provideKptIcons([LayoutDashboard, Rocket])] }); // Prototype: every icon, about 1.2 MB. import { provideKptTablerIcons } from '@konce-pt/angular/icons'; bootstrapApplication(App, { providers: [provideKptTablerIcons()] }); `provideKptIcons` lives in the core entry point on purpose: `@konce-pt/angular/icons` imports the whole set statically, so a subset parameter there could not shrink anything. Passing the namespace object (`import * as tabler`) also registers everything - a namespace handed to a function blocks static analysis, so it is the explicit form of the prototype path, not a smaller one. Export names are PascalCase because `kebab-case` is not a legal identifier and camelCase would collide with keywords (`function`, `package`, `switch`). Each icon carries its own registry name, so `BrandHtml5` registers as `brand-html5`. You can also register your own through `KptIconRegistry.register({ name: 'inner svg' })` - the content is sanitized down to an allowlist of SVG geometry (`path`/`circle`/`rect`/`g`/`line`/`polygon`/`polyline`/ `ellipse` + shape/style attributes), but `register()` may only be called with content the developer controls at build time, never straight from runtime/CMS/upload data. `kpt-icon` reacts to late registration (the `version` signal). ## Example ## Icon license Tabler Icons (MIT). The icons are extracted inline into `icons.ts`. See ICONS-LICENSE at the root. Adding an icon: add an entry to `KPT_ICONS`/`KptIconName` (a 24x24 grid, 2px stroke). ## Accessibility By default an icon is `aria-hidden` - decorative, which is right next to a text label or inside an icon button with its own name. An icon that carries meaning on its own gets `label`: it becomes `role="img"` with that `aria-label`. In development builds an unknown name logs one console warning per name instead of rendering silently empty.