Two-tone icons: the solid style
Besides the layered icons, part of the library comes in a two-tone style: solid shapes on a 16 grid, a light body with accents in your brand color, and a hover motion that acts out what each icon means. It suits interface icons at 16 to 48 pixels: navigation, buttons, lists and tabs.
The icons play their motion in turn; an icon under the pointer holds its hover pose. To search, recolor and copy them, choose Two-tone in the icon browser.
Switch style by import path
The library comes in three styles: layered, two-tone and line. An icon has the same name and props in every style that has it, so switching style is one import. Each package has a duotone and a line path:
// Layered
import { Folder, BellOff } from "kubai-icons-react";
// Two-tone
import { Folder, BellOff } from "kubai-icons-react/duotone";
// Line
import { Folder, BellOff } from "kubai-icons-react/line";
<Folder size={24} color="#5A76F2" />| Package | Layered | Two-tone | Line |
|---|---|---|---|
| React | kubai-icons-react | kubai-icons-react/duotone | kubai-icons-react/line |
| Vue | kubai-icons-vue | kubai-icons-vue/duotone | kubai-icons-vue/line |
| Svelte | kubai-icons-svelte | kubai-icons-svelte/duotone | kubai-icons-svelte/line |
| Solid | kubai-icons-solid | kubai-icons-solid/duotone | kubai-icons-solid/line |
| JavaScript | kubai-icons | kubai-icons/duotone | kubai-icons/line |
| Web component | no icon-style | icon-style="duotone" | icon-style="line" |
| Static SVG | svg/folder.svg | svg-duotone/folder.svg | svg-line/folder.svg |
The static files are in kubai-icons-static. The two-tone and line sets are smaller than the layered one. Most of their icons have a layered icon of the same name; a few exist only in one style. The full lists are in kubai-icons/duotone/icons.json and kubai-icons/line/icons.json, where those few carry only: true. Line icons also take a stroke width and four variants: see the line style.
In SwiftUI, the Swift package draws the two-tone icons natively. Names are the same in camel case, such as KubaiDuotoneIcon(.folderPlus).
Colors
The accent follows color, or currentColor when no color is given. The light tone is the accent mixed at 40% with white. To choose it yourself, for example on a dark background, set --kd-b:
.sidebar .kubai-duotone { --kd-b: #2B3566; }The variant and badgeColor props of the layered icons don't apply. Files in svg-duotone/ use the default colors, #5A76F2 and #BDC8FA.
Motion
Each icon plays its motion on hover, with the same trigger, hover and title props as the layered icons. A lid swings open, a page is torn off, a letter comes out of its envelope. Parts that only appear on hover are hidden in the server-rendered markup, so they never flash before the script runs. With reduced motion turned on, icons go straight to their end pose.
Variants
Variants such as folder-plus, calendar-check, search-sparkle and bell-off add one badge to the same object: a plus, minus, check, cross, sparkle or a slash, always the same size and in the same place.
Drawing more
The two-tone icons are drawn with the kubai-duotone skill, which follows the same rules and checks each icon before it joins the library. Icons you draw with it for your own product belong to you.
Questions
Can I mix the two styles on one page?
Yes, but keep one style per area, such as the two-tone style in the sidebar and the layered style on the marketing pages. Both use the same names, so moving an area from one style to the other is one import.
Why is my icon not in the two-tone set?
The two-tone set covers common interface functions first. Use the layered icon meanwhile, or draw it with the kubai-duotone skill.
Do two-tone icons work without JavaScript?
Yes. The markup renders on the server, and svg-duotone/ has a standalone file for each icon. Only the hover motion needs the script.