Skip to content

    Iconography

    One icon set, two variants, three sizes. Mixing variants is the fastest way to make a screen look unfinished, so only outline and filled are allowed.

    Icon set

    The docs and registry use Tabler Icons (MIT). If your app already has an icon library, use it first; you can use any icon set or icon font you like.

    Variants

    Outline everywhere. The filled prop only for a selected or on state, with the off state in outline of the same icon.

    VariantUse for
    outlineThe default for every icon.
    filledA selected or on state: the active nav item, a toggled icon button, a filled star.
    filled
    outline

    Never change the stroke width; pick a different icon instead.

    Sizes

    12px next to badge text, 16px in inputs, menus and sm, md and lg controls, 20px in xl controls and navigation.

    SizeWhere
    12pxBadges, next to font-size-xs text.
    16pxInputs, selects, menu items, and sm, md and lg controls.
    20pxxl controls, and navigation such as the sidebar and the tab bar.
    12px
    16px
    20px

    Icon size follows the control's size, not the pointer type or the screen width. Any other size, such as an empty state, needs a design decision and must be a multiple of 4px.

    Color

    Icons take the icon color tokens, or the on-color tokens on a solid fill. Never a hardcoded fill.

    In code

    Always pass size. Import the Icon-prefixed names from @tabler/icons-react; it works in both Server and client components.

    import { IconHome } from "@tabler/icons-react"
    
    <IconHome size={20} aria-hidden />

    Don't rely on the 1.5em default width and height. This is the set the docs and registry use, but any icon set or icon font works: the components take any SVG-capable React node.

    Use your own icons

    If your app already has an icon library, use it. Tabler is only what the registry ships, and nothing else in Werewolf depends on it.

    Props that take an icon, such as icon, leadingIcon and trailingIcon, accept any React node, so pass your library's icon there.

    import { SearchIcon } from "your-icon-library"
    
    <Button leadingIcon={<SearchIcon size={16} aria-hidden />}>Search</Button>

    A few glyphs are drawn inside the component, such as a close button or a chevron. add copies the component into your project, so the file is yours: change its @tabler/icons-react import to your library and keep the size prop.

    - import { IconX } from "@tabler/icons-react"
    + import { CloseIcon } from "your-icon-library"
    
    - <IconX size={16} aria-hidden="true" />
    + <CloseIcon size={16} aria-hidden="true" />

    add installs @tabler/icons-react for components that import it. After you switch every import you can remove the package. Adding another component later brings its Tabler imports back, so swap those too.

    The variants, sizes and color rules above apply to any set. If your set has no filled variant, use a different icon for the on state.