@hugocxl/icons Browse Docs GitHub

Use @hugocxl/icons

Install, import and style on every platform

@hugocxl/icons is a family of rounded icons for websites, apps and designs. Every icon is a plain SVG file, and the same names ship as packages for JavaScript, React, React Native and Swift. Choose how you build below.

Choose an integration

Need Start here
Use an SVG in a web page, design, or native app Raw SVGs
Use icons in SwiftUI, UIKit, or AppKit Swift / SwiftUI
Use SVG strings in JavaScript or on the server JavaScript
Use icons in a React app React
Use icons in React Native or Expo React Native / Expo

All integrations use the same icon names and source artwork. The default icon size is 16, and icons use currentColor or an explicit platform tint.

Raw SVGs

Download or clone the repository and copy the SVGs you need from icons/. No dependencies or build step are required to use the artwork.

git clone https://github.com/hugocxl/stack.git   # the icons are in stack/icons/icons

The icons use currentColor and filled vector geometry. New UI symbols use a 16 × 16 canvas; preserve the viewBox and aspect ratio when sizing legacy assets. The default uses duotone only for meaningful surfaces or depth. Linear symbols such as arrows and chevrons use one opaque tint; Pencil and Trash retain their secondary body fill. Existing default and /duotone imports select this treatment. Solid and Stroke artwork lives in icons/styles/solid and icons/styles/stroke.

Inline an SVG in HTML to inherit CSS color. When loading SVGs through an <img> tag, parent CSS color does not propagate into the file. Native apps can load them as template images and apply their own tint.

Use the icon browser to search by name or category, switch styles, preview sizes, and copy or download an SVG. Each icon also shows its import for every platform. The complete catalog lists every available name.

Swift / SwiftUI

The Swift package exposes the Icons library for Swift 6+, macOS 12+, iOS 15+, tvOS 15+, and watchOS 8+. It ships in the hugocxlStack package at the root of the stack monorepo, together with Vectors. Add the repository as a Swift Package Manager dependency using a release tag, or add it as a local package while developing. Then add Icons to your app target. For a Package.swift dependency:

.package(url: "https://github.com/hugocxl/stack.git", from: "0.1.0")

Add .product(name: "Icons", package: "stack") to your target's dependencies.

import Icons
import SwiftUI

Icon.search.image
    .resizable()
    .scaledToFit()
    .frame(width: 24, height: 24)
    .foregroundStyle(.secondary)
    .accessibilityLabel("Search")

Use Icon.search.uiImage in UIKit or Icon.search.nsImage in AppKit. Images come from the package's vector asset catalog and use template rendering. Icon.allCases and Icon(rawValue: "search") support dynamic selection.

JavaScript (no framework)

All JavaScript integrations come from one npm package, @hugocxl/icons. Choose /js, /react, or /react-native; per-icon imports are available too. React and React Native dependencies are optional, so a plain JavaScript install adds no framework dependencies.

npm install @hugocxl/icons
import { SearchIcon } from '@hugocxl/icons/js';
// Or: import { SearchIcon } from '@hugocxl/icons/js/search';
// The package root also exports the plain JavaScript adapter.
document.querySelector('#search-icon').innerHTML = SearchIcon;

The JS adapter exports SVG strings, usable in the browser or server-side. These are the trusted, bundled artwork strings. Use CSS to size and tint inline SVGs (#search-icon svg { width: 24px; height: 24px; color: rebeccapurple; }). Add accessible labels on the containing control when used as button icons.

React

The React package provides typed ESM components with per-icon exports and tree shaking. Install it from npm:

npm install @hugocxl/icons
import { SearchIcon } from '@hugocxl/icons/react';
// Per-icon imports are also supported:
import { TerminalIcon } from '@hugocxl/icons/react/terminal';

<SearchIcon size={24} color="currentColor" aria-label="Search" />
<TerminalIcon size={16} />

Components support React 18 and 19, SVG props, and forwarded SVG refs. Unlabelled icons are decorative (aria-hidden). Supply aria-label or aria-labelledby for meaningful icons; explicit aria-hidden takes precedence. For icon-only buttons, label the button and leave the icon decorative.

React Native / Expo

The React Native package provides the same typed, per-icon API for React Native and Expo. Install it from npm along with its peer dependency:

npm install @hugocxl/icons
npx expo install react-native-svg
# Or, in a bare React Native app:
npm install react-native-svg
import { SearchIcon } from '@hugocxl/icons/react-native';

<SearchIcon size={24} color="#64748b" accessibilityLabel="Search" />

Native components accept react-native-svg props and refs. No SVG transformer or custom Metro configuration is needed. Install iOS pods using your app's normal workflow.

Both framework adapters ship typed ESM with per-icon exports and tree shaking. The peer ranges are compatibility declarations; CI checks the versions in the lockfile, not every older React Native release.

Choose a drawing style

Rounded Duotone remains the default, including all 81 retained brand marks. The 2,381 original UI icons also support Rounded Solid and Rounded Stroke. Brands are intentionally absent from those two style namespaces.

import { SearchIcon } from '@hugocxl/icons/react'; // Duotone
import { SearchIcon as SolidSearchIcon } from '@hugocxl/icons/react/solid';
import { SearchIcon as StrokeSearchIcon } from '@hugocxl/icons/react/stroke/search';

The same style paths work under /js and /react-native. Explicit /duotone and /duotone/search imports are aliases of the default artwork. Use @hugocxl/icons/catalog.json to inspect names, categories, keywords, provenance, supported styles, and defaultTone (monochrome or duotone). Style namespaces remain tree-shakeable.

Icon.search.image         // Rounded Duotone
SolidIcon.search.image    // Rounded Solid
StrokeIcon.search.image   // Rounded Stroke

All three Swift enums expose allCases, rawValue, image, uiImage (UIKit), and nsImage (AppKit). Existing names and imports remain available; the UI artwork has been redrawn, including historical *-fill names, so upgrading changes their appearance. This release does not include Hugeicons or SF Symbols artwork.

Use an assigned color

Icons inherit the surrounding text color by default. In a file tree or tool list, you can opt into the library’s assigned color. Folders use yellow, terminals use green, and React uses sky. A name has the same hue in every supported drawing style. Keep action icons in the surrounding tint.

Choose Color → Assigned in the icon browser to see the available names. Copy or download the SVG in your chosen style. The file includes its light and dark colors and also picks up the matching --ds-<hue> token when inlined.

import { FolderIcon } from '@hugocxl/icons/react/stroke/folder';
import { defaultColor } from '@hugocxl/icons/colors';

<FolderIcon color={defaultColor('folder')} />

On the web, the helper returns a CSS color that uses the design-system token when present and otherwise follows the element’s CSS color-scheme. Set color-scheme: light dark on your page to follow the system preference. For plain JavaScript SVG strings, set the inline SVG element’s style.color. For React Native, pass the active appearance to get an sRGB hex value.

import { useColorScheme } from 'react-native';
import { TerminalIcon } from '@hugocxl/icons/react-native/terminal';
import { defaultColor } from '@hugocxl/icons/colors';

function TerminalMark() {
  const mode = useColorScheme() === 'dark' ? 'dark' : 'light';
  return <TerminalIcon color={defaultColor('terminal', mode)} />;
}
StrokeIcon.folder.image.foregroundColor(StrokeIcon.folder.defaultColor)

Swift resolves the color through the asset catalog as the appearance changes. An icon without an assignment returns undefined from the JavaScript helper and nil in Swift. The optional defaultColor field in @hugocxl/icons/catalog.json contains the hue name, such as yellow.

License and attribution

Original @hugocxl/icons artwork, Tab contributions and tooling are MIT licensed. The collection includes artwork adapted from Pierre Icons (Apache 2.0), Pierre's file icons (MIT), Simple Icons (CC0 1.0), LobeHub Icons (MIT), and Devicon (MIT). Upstream artwork retains its original license, so the collection is not solely MIT licensed. Keep NOTICE, the upstream license texts, and applicable copyright notices with redistributed artwork. @hugocxl/icons/catalog.json records the provenance of every icon.

Brand marks remain the trademarks of their owners. Inclusion does not imply endorsement or grant trademark rights.