Line & two-tone icons on Iconify
The line and two-tone icons are also on Iconify, so any tool that reads Iconify icon sets can use them: the Iconify components, CSS plugins for Tailwind CSS and UnoCSS, the Iconify API and the Iconify plugin for Figma. Iconify icons are static; the motion needs this library's own packages.
The two sets
| Style | Iconify set | Example name |
|---|---|---|
| Line | kubai-line | kubai-line:folder |
| Two-tone | kubai-duotone | kubai-duotone:folder |
An Iconify icon name is the set's prefix and the icon's name, joined by a colon. The icon names are the same as in this library, so Folder from kubai-icons-react/line is kubai-line:folder. Iconify reads both sets from the kubai-icons-static package and updates them after each release. The layered style isn't on Iconify: its icons use gradients, filters and sometimes text, which Iconify sets don't support.
Colors
Both sets use currentColor, so an icon takes the text color around it, and Iconify tools let you set a color.
- kubai-line is the
outlinevariant with 2px strokes. - kubai-duotone uses one color in two lightnesses: the accents in full color and the body at 40% opacity. On white it looks the same as the two-tone package's default; on other backgrounds the body lets the background show through.
Web component
Iconify's <iconify-icon> element works in plain HTML and in most frameworks. It loads icon data from the Iconify API and renders the SVG in a shadow root:
<script src="https://code.iconify.design/iconify-icon/3.0.0/iconify-icon.min.js"></script>
<iconify-icon icon="kubai-line:folder" width="24" style="color: #5A76F2"></iconify-icon>
<iconify-icon icon="kubai-duotone:folder" width="24"></iconify-icon>With a bundler, run npm install iconify-icon and import "iconify-icon" instead of the script tag. For the same icons with their hover motion and no build step, use this library's <kubai-icon>.
React, Vue and Svelte
Iconify's components also load icon data from the API when they first render an icon:
npm install @iconify/reactimport { Icon } from "@iconify/react";
<Icon icon="kubai-line:folder" width={24} />
<Icon icon="kubai-duotone:folder" width={24} style={{ color: "#5A76F2" }} />Vue uses @iconify/vue (import { Icon } from "@iconify/vue") and Svelte uses @iconify/svelte (import Icon from "@iconify/svelte"), with the same icon attribute. The React component draws icons only in the browser, and Iconify doesn't design the Vue and Svelte components for server rendering. With server rendering, such as Next.js or Nuxt, Iconify recommends the web component; the CSS plugins below work too.
Without the Iconify API
To bundle the icon data instead of loading it at run time, install the set's data package and add it to the component:
npm install @iconify-json/kubai-lineimport { Icon, addCollection } from "@iconify/react";
import { icons } from "@iconify-json/kubai-line";
addCollection(icons);
<Icon icon="kubai-line:folder" width={24} />This bundles the whole set. To ship only the icons you use, generate them at build time with one of the CSS plugins below.
Tailwind CSS
Iconify's plugin for Tailwind CSS 4 adds an icon-[…] class for each icon you use. In the class name the prefix and the icon name are joined by two hyphens:
npm install -D @iconify/tailwind4 @iconify-json/kubai-line @iconify-json/kubai-duotone@import "tailwindcss";
@plugin "@iconify/tailwind4";<span class="icon-[kubai-line--folder] size-6 text-blue-500"></span>
<span class="icon-[kubai-duotone--folder] size-6"></span>Icons render as a CSS mask filled with the text color, so text color classes recolor them, and the two-tone body keeps its 40% opacity. For Tailwind CSS 3, Iconify has a separate plugin, @iconify/tailwind.
UnoCSS
UnoCSS's icons preset reads the same data packages. The preset keeps a list of Iconify sets and doesn't yet include these two, so name them in iconifyCollectionsNames:
npm install -D @unocss/preset-icons @iconify-json/kubai-line @iconify-json/kubai-duotoneimport { defineConfig } from "unocss";
import presetIcons from "@unocss/preset-icons";
export default defineConfig({
presets: [presetIcons({ iconifyCollectionsNames: ["kubai-line", "kubai-duotone"] })],
});<span class="i-kubai-line-folder"></span>
<span class="i-kubai-duotone:folder"></span>Both i-kubai-line-folder and i-kubai-line:folder work.
SVG by URL
The Iconify API returns any icon as an SVG file, for <img>, CSS backgrounds and tools that import images from a URL. An SVG loaded as an image can't inherit the text color, so pass color, writing # as %23:
https://api.iconify.design/kubai-line/folder.svg?color=%235A76F2&height=24color: replacescurrentColor. Without it the icon is black.widthandheight: the size. With one of them, the other follows.box=1: adds an empty rectangle the size of the icon, for design tools such as Sketch that would otherwise crop the space around it.download=1: makes the browser download the file.
For the layered style, use this site's own address, https://icons.kubai.design/api/icon/folder.svg, described in design tools.
Figma
The Iconify plugin for Figma is made by Iconify and is free. It imports icons as vectors and works in Figma, Figma Slides and FigJam.
- Open the plugin's Community page and click Open in Figma. Later, start it from the Plugins menu in any file.
- On the plugin's main page, open Kubai Line or Kubai Two-tone from the list of icon sets, or search for an icon name such as folder. The plugin opens on the last page you visited, so next time it returns to the set.
- Click an icon to select it. Both sets are single-color, so the footer shows a color picker with your recent colors and the file's color styles. Pick a color before you import.
- Click Import Icon, or drag the icon onto the canvas. The icon's info button also has quick buttons that import it as a component or as a frame.
Line icons import as strokes, so you can change their width in Figma. Two-tone icons import in the color you picked, with the body at 40% opacity. The plugin loads icons from the Iconify API, so it needs a network connection. For layered icons, or colors the plugin can't produce, such as a separate light tone, copy or download from the icon browser as described in design tools.
Iconify or the packages
| Iconify | Kubai Icons packages | |
|---|---|---|
| Hover motion | No | Yes |
| Styles | Line and two-tone | Layered, two-tone and line |
| Line icons | Outline variant, 2px strokes | Any stroke width and four variants |
| Two-tone colors | One color, body at 40% opacity | Accent color and a separate light tone (--kd-b) |
| Design tools | Iconify plugin for Figma | Copy or download from the icon browser |
For the motion, install the package for your framework: React, Vue, Svelte, Solid or JavaScript and the web component. The icon names stay the same, so moving from Iconify is a change of component. See also the line style and the two-tone style.
For iOS and macOS apps, the Swift package draws all three styles natively in SwiftUI, with the same motion.
Questions
Why isn't a new icon on Iconify yet?
Iconify reads the sets from the kubai-icons-static package on npm and updates them on its own schedule, so new icons appear there some time after a release. Until then, use the icon from the packages or the static files.
Can I use the Iconify icons in commercial work?
Yes. Both sets are MIT licensed, the same as the packages. Iconify shows the license on each set's page.
Why does a two-tone icon look different on a dark background?
Its body is the icon's color at 40% opacity, so the background shows through it. On white it matches the two-tone package. For a set light tone, use the packages and --kd-b.