Icons
Phosphor by default, with the freedom to use any icon pack.
Zenos uses Phosphor Icons by default in its documentation and examples. This is a starting point, not a requirement: you can use any icon pack you like, or your own SVGs.
Icons are supplied by your application. Zenos does not require Phosphor as a core dependency or wrap icons in a pack-specific API.
Default icon set
Section titled “Default icon set”Phosphor provides a consistent visual language for navigation, actions, and feedback. These are a few of the icons used in product interfaces:
-
HouseIcon -
MagnifyingGlassIcon -
PlusIcon -
ArrowRightIcon -
UserIcon -
GearIcon -
BellIcon -
CalendarIcon -
CheckCircleIcon -
HeartIcon -
StarIcon -
TrashIcon
Install Phosphor
Section titled “Install Phosphor”Add the React package to your application if you want to use the default set:
pnpm add @phosphor-icons/reactImport individual icon components and compose them with Zenos controls:
import { PlusIcon, TrashIcon } from "@phosphor-icons/react";import { Button, IconButton } from "@zentara-co/zenos-ui"; function ProjectActions() { return ( <> <Button startIcon={<PlusIcon aria-hidden="true" />}>Create project</Button> <IconButton aria-label="Delete project"> <TrashIcon aria-hidden="true" /> </IconButton> </> );}Use startIcon or endIcon for Button labels, and place the icon inside IconButton for icon-only actions.
Weights
Section titled “Weights”Phosphor supports six weights. Start with regular for everyday interface icons and keep the treatment consistent across a feature. A filled icon can distinguish a selected or saved state, but should not be the only indication of that state.
-
thin -
light -
regular -
bold -
fill -
duotone
import { StarIcon } from "@phosphor-icons/react"; <StarIcon size={32} weight="regular" aria-hidden="true" />;The same icon can use thin, light, regular, bold, fill, or duotone. Weight is an icon-library option, not a Zenos component prop.
Use any icon pack
Section titled “Use any icon pack”Replace the Phosphor component with an icon from your preferred library. The Zenos composition stays the same; only the icon import and any library-specific props change. You do not need to install Phosphor alongside another pack.
Custom SVG components work too:
import type { SVGProps } from "react";import { IconButton } from "@zentara-co/zenos-ui"; function AddIcon(props: SVGProps<SVGSVGElement>) { return ( <svg viewBox="0 0 24 24" width="1em" height="1em" fill="none" stroke="currentColor" strokeWidth={1.5} {...props} > <path d="M12 5v14M5 12h14" /> </svg> );} function AddAction() { return ( <IconButton aria-label="Add item"> <AddIcon aria-hidden="true" /> </IconButton> );}Size and color
Section titled “Size and color”- Let Zenos controls handle their icon sizing where possible; use your icon library’s sizing props for standalone icons.
- Prefer
currentColorso icons inherit the surrounding foreground, including hover, disabled, and dark-mode treatments. - Use semantic color roles such as
--icon-default,--icon-subtle, or--icon-dangerfor standalone icons rather than fixed colors. - Keep stroke weight, optical size, and alignment consistent. Different icon packs can have different view boxes and proportions.
Accessibility
Section titled “Accessibility”- Hide decorative icons with
aria-hidden="true"when visible text already explains their meaning. - Give every icon-only control an accessible name, such as
aria-label="Delete project", on the control rather than only on its icon. - Pair status icons with text. Do not rely on an icon shape or color alone to communicate success, warning, or error.
- For a meaningful standalone SVG without accompanying text, provide
role="img"and an accessible name. - Mirror directional icons for right-to-left layouts only when their meaning is directional; do not mirror logos or universal symbols indiscriminately.