Skip to content
AXIcons
AXIcons
Theme

Reusable icon components

Wrap icons with your own defaults, or build components from icon data with createIcon.

A wrapper with your defaults

app-icon.tsx
import type { XIcon, XIconProps } from "@axcore/xicons-react";

export function AppIcon({ icon: Icon, ...props }: XIconProps & { icon: XIcon }) {
  return <Icon size={18} strokeWidth={1.5} {...props} />;
}

createIcon

createIcon builds a component from icon data, the same way the package builds its own. Use it to rename an icon or adopt core data.

React
import { createIcon } from "@axcore/xicons-react";
import { IconRocket } from "@axcore/xicons";

export const LaunchIcon = createIcon("launch", IconRocket);

Something wrong or missing?Open an issue

Jump to
Browse all iconsIcon library
InstallationGetting started
Quick startGetting started
ReactIntegrations
React NativeIntegrations
↑↓ navigateopen⌘K toggle