Skip to main content

Typography

Ekanos pairs Figtree (body) with Bricolage Grotesque (headings). This package only names them in --font-sans / --font-heading, followed by a system fallback stack; no webfont is bundled or fetched.

Load from Google Fonts

Add to your HTML <head>:

Load from your CDN

Host the font files yourself and define them in your CSS:

Use system fonts

If you don’t load Figtree and Bricolage Grotesque, components still render in your platform’s UI font (the fallback stack includes ui-sans-serif, -apple-system, Segoe UI, Roboto, and system-ui).

Icons (Font Awesome)

Icon renders Font Awesome markup (<i class="fa-solid fa-house">). The package ships no icon font, because Ekanos uses Font Awesome Pro under a commercial licence, so you must supply one. name is a Font Awesome class string:

If you have Font Awesome Pro

Load your own Pro CSS (or kit) and every icon renders exactly as it does in Ekanos.

If you use Font Awesome Free

  1. Install:
  2. Load the stylesheet:
  3. Override the style (Free has no fa-light or fa-duotone):
    Free ships fa-solid, fa-regular, and fa-brands. Setting value="solid" rewrites every icon’s style class to fa-solid (brand icons are left alone). This matters because an unrecognised name falls back to fa-light fa-shapes, and Free has no fa-light family. Accepted values: solid, regular, light, duotone, or null.

Which icons are available in Free?

Free is missing many Pro glyphs. The package carries the list of names Font Awesome Free 7.3.1 ships, and in development Icon, resolveIcon, and renderIcon warn once per distinct name that is not in it (see Icon warnings below).

Fallback behavior

The package CSS draws two placeholders so a missing icon is visible rather than blank:
  • No Font Awesome CSS loaded: each icon renders a placeholder box (□). Set --ekanos-icon-fallback to change it, or --ekanos-icon-fallback: '' to switch it off.
  • Font Awesome loaded, glyph not in it (a Pro-only glyph under Free): the icon falls back to a question mark, --ekanos-icon-fa-fallback (default '\f059', fa-circle-question).

Icon sizing

Icons size by font-size, not width/height. Icon derives font-size from the first h-* / w-* / size-* class:
The size is computed in JS (1 unit = 4px), so it is right even on the no-Tailwind path where those utilities have no CSS rule.

Icon resolution

Use resolveIcon() and renderIcon() to work with icons programmatically:
Both respect IconStyleOverrideProvider.

Icon warnings

In development, Icon, resolveIcon, and renderIcon console.warn once per distinct resolved value that Font Awesome Free does not ship:
The warning never changes what renders, and a Pro host is unaffected. When process.env.NODE_ENV is 'production', it is skipped.

Common icon names

These glyph names are in the package’s Font Awesome Free list:

Troubleshooting

Icons render as placeholder box (□)

No Font Awesome CSS loaded. Load @fortawesome/fontawesome-free/css/all.min.css or your Font Awesome Pro kit.

Icons render as circle question mark (?)

Font Awesome is loaded, but the glyph isn’t in it (often a Pro-only glyph under Free). Check the spelling and the development console warning.

Fonts look like system defaults

Figtree and Bricolage Grotesque aren’t loading. Load them from Google Fonts or your CDN.

Some icons appear but others are boxes

You’re likely using Font Awesome Free with icons in a family it lacks (fa-light or fa-duotone). Wrap the tree in <IconStyleOverrideProvider value="solid"> to force a family Free has, or replace missing names with available ones.