On this page
Reusable icon components
Wrap icons with your own defaults, or build components from icon data with createIcon.
A wrapper with your defaults
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.
import { createIcon } from "@axcore/xicons-react";
import { IconRocket } from "@axcore/xicons";
export const LaunchIcon = createIcon("launch", IconRocket);Something wrong or missing?Open an issue