
Security News
The Changelog Podcast: Practical Steps to Stay Safe on npm
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.
@kong/icons
Advanced tools
Kong's open-source, Vue icon component library, partially sourced from Google's Material Symbols.
View all available icons: http://kong.github.io/icons/
Install the @kong/icons package in your host project.
pnpm add @kong/icons
Icons should be imported individually which allows for proper tree-shaking, so only import the icons you need.
Notice that since the few styles that are included are inlined, there is no stylesheet to import.
<template>
  <button>
    Add a service
    <AddIcon size="24" />
  </button>
</template>
<script setup lang="ts">
import { AddIcon } from '@kong/icons'
</script>
titleStringfalse''The accessibility text provided to screen readers.
colorNote: The
colorprop only impacts solid, single-color icons generated from the/svg/solid/directory.
Stringfalse'currentColor'Set the icon color to any valid CSS color value or currentColor, which inherits the text color of the icon's parent element.
displayStringfalse'block'Set the CSS display property for the icon wrapper element.
decorativeBooleanfalsefalseWhether the SVG is meaningful to the page, or just complimentary. Utilized to expose or hide the SVG from screen readers and enable or disable pointer events.
size[Number, String]false24The size of the icon, in pixels.
As a convenience, you may pass the size as a number, e.g. 24 or as a string that can be converted to an integer, such as '48'.
When utilizing a string, do not pass any units along with the value.
asStringfalse'span'The HTML tag to use in place of the default wrapper <span> tag.
<CloseIcon as="button" />
To get started, install the package dependencies
pnpm install --frozen-lockfile
The exported Vue components are generated from SVG source files located in the /svg/ child directories.
Source SVG files must:
/svg/* subdirectory they are located in
icon (the suffix is automatically added during component generation)Icon suffix (e.g. kebab-case.svg -> KebabCaseIcon.vue)/svg/ directory
/svg/solid/ directory{country code}.svg and must be placed in the /svg/flags/ directory. All country codes must be two-character strings./svg/multi-color/ directory24px when they are exportedTo add a new SVG:
#ask-kong-design-system/svg/* subdirectory.pnpm generate to create the corresponding Vue componentpnpm test --update to run the tests and update the test snapshotsThis repository includes a Vue sandbox app (see the /sandbox directory) to allow you to experiment with icons.
The pnpm dev command will automatically call the generate command to generate the icon components.
To compile the icon components and start the sandbox:
# Generate the Icon Components and start the sandbox
pnpm dev
To run a local preview of the Sandbox site that will be deployed to GitHub Pages:
pnpm build:sandbox
pnpm preview:sandbox
Lint package files, and optionally auto-fix detected issues.
# Lint only
pnpm lint
# Lint and fix
pnpm lint:fix
Unit and component tests are run with Vitest.
The Vitest settings are pre-configured to regenerate the icon components before every run.
# Run tests
pnpm test
# Run tests in the Vitest UI
pnpm test:open
# Update test snapshots
pnpm test --update
When SVG files are added or removed, this will cause the test(s) that compare snapshots to fail. If the snapshot change is expected, run pnpm test --update to update the test snapshots accordingly, then commit those changes to your branch.
Process the /svg/ directory, generate the icon components and associated files, and build for production.
pnpm build
This repo uses Conventional Commits.
Commitizen and Commitlint are used to help build and enforce commit messages.
It is highly recommended to use the following command in order to create your commits:
pnpm commit
This will trigger the Commitizen interactive prompt for building your commit message.
Lefthook is used to manage Git Hooks within the repo.
commit-msg hook is automatically setup that enforces commit message stands with commitlint, see lefthook.ymalpre-push hook is used that runs eslint before allowing you to push your changes to the repositoryAdditionally, CI will use commitlint to validate the commits associated with a PR in the Lint and Validate job.
This repository utilizes Semantic Release for automated package publishing and version updates.
FAQs
Kong Icon Library
The npm package @kong/icons receives a total of 5,588 weekly downloads. As such, @kong/icons popularity was classified as popular.
We found that @kong/icons demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.

Security News
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.

Security News
Ruby's creator Matz assumes control of RubyGems and Bundler repositories while former maintainers agree to step back and transfer all rights to end the dispute.