Skip to content
AXIcons
AXIcons
Theme

Documentation

Everything you need to put AXIcons in a React, React Native or plain HTML project, written against the published 0.2.0 packages. Coding with an agent? Copy the setup prompt below.

For AI agents

Read the guide

AXIcons setup prompt

  • Claude
  • ChatGPT
  • Grok
  • Cursor
Read the prompt
prompt.md
Set up AXIcons in this project, then follow its rules whenever you add or change icons.

AXIcons (https://icons.alienxstudio.com) is an open-source icon set from AlienX Studio: 12,333 tree-shakable icons on one 24px grid with a 1.75 stroke, for React, React Native and plain SVG, published on npm under @axcore. This prompt is enough on its own. For more, read https://icons.alienxstudio.com/llms.txt (docs index) or https://icons.alienxstudio.com/llms-full.txt (every page in one file).

## 1. Detect the project

- Package manager, from the lockfile: `pnpm-lock.yaml` → pnpm, `yarn.lock` → yarn, `bun.lock` or `bun.lockb` → bun, otherwise npm. In a monorepo, install in the app that renders the icons, not the workspace root.
- Framework, from package.json: `expo` → Expo; `react-native` → React Native; `react` (Next.js, Vite, Remix, React Router) → React; anything else (Vue, Svelte, Angular, Astro, plain HTML, Node) → core.

## 2. Install exactly one package

| Project | Command |
| --- | --- |
| React, Next.js | `pnpm add @axcore/xicons-react` |
| React Native | `pnpm add @axcore/xicons-react-native react-native-svg`, then rebuild the native app (`cd ios && pod install` first on iOS) |
| Expo | `npx expo install @axcore/xicons-react-native react-native-svg` |
| Anything else | `pnpm add @axcore/xicons` |

Use the detected package manager (`npm install`, `yarn add`, `bun add`) in place of `pnpm add`.

- Both component packages need `react ^19.3.1`; React Native also needs `react-native >=0.78` and `react-native-svg >=15`. If the project is older, stop and ask me whether to upgrade React or use `@axcore/xicons` with `toSvg`. Never use `--force` or `--legacy-peer-deps`.
- The packages are ES modules only: use `import`, never `require()`.
- No configuration is needed: no bundler, Babel, Next.js, Metro or Tailwind changes.

## 3. Use icons correctly

- Names are `Icon` + the PascalCase file name: `camera` → `IconCamera`, `arrow-up-right` → `IconArrowUpRight`, `a-b-2` → `IconAB2`, `brand-github` → `IconBrandGithub`. The same names work in all three packages.
- Styles are suffixes: `IconBell` (outline), `IconBellFilled`, `IconBellDuotone`. Not every icon has every style. Use outline by default and filled for active or selected states.
- Never guess a name; check that it exists first:
  `grep -rhoE "Icon[A-Za-z0-9]*Camera[A-Za-z0-9]*" node_modules/@axcore/xicons-react/ --include='*.d.ts' | sort -u`
  Swap in the package you installed, or search https://icons.alienxstudio.com/icons.txt (one icon per line, with every style and alias).
- Import by name only: `import { IconCamera } from "@axcore/xicons-react"`. Never `import * as Icons` or `Icons[name]`: it bundles all 12,333 icons. For icons chosen at runtime, map values to components in a static object.
- React props: `size` (default 24), `strokeWidth` (default 1.75, outline icons only), `color`, `title`, `className`, plus every `<svg>` prop. Icons paint with `currentColor`, so they follow the text colour and dark mode. Classes beat the attributes, so Tailwind utilities like `size-5 text-zinc-500` work.
- Accessibility: icons are `aria-hidden` unless you pass `title`. Name icon-only buttons with `aria-label` on the button.
- Next.js: icons render in Server Components; they don't need `"use client"`.
- React Native: there is no CSS cascade and no `className`. Pass `color` and `size` on each icon, and put `accessibilityLabel` on the pressable wrapper.
- Other frameworks: `toSvg(IconCamera, { width: 20, height: 20 })` from `@axcore/xicons` returns an SVG string.
- Full-colour brand logos (aws, github, javascript, nextjs, node, react, typescript): `<Icon name="react" variant="original" />`. Every other brand mark is a normal icon such as `IconBrandGithub`.

## 4. Save the rules for later sessions

Add this section to the project's agent instructions: `AGENTS.md` (create it if missing), or `CLAUDE.md` or `.cursor/rules` if that's what the project already uses. Keep only the package line that applies.

## Icons: AXIcons

This project uses AXIcons for every icon. Agent docs: https://icons.alienxstudio.com/llms.txt

- Package: `@axcore/xicons-react` (React, Next.js), `@axcore/xicons-react-native` (React Native, Expo) or `@axcore/xicons` (anything else). Use the one in package.json; don't add another icon library.
- Import icons by name: `import { IconCamera } from "@axcore/xicons-react"`. Never `import * as Icons` or `Icons[name]`: that bundles all 12,333 icons. For icons picked at runtime, use a static object map.
- Names are `Icon` + the PascalCase file name (`arrow-up-right` → `IconArrowUpRight`). Styles are suffixes: `IconBell`, `IconBellFilled`, `IconBellDuotone`; not every icon has all three.
- Never guess a name. Check it first: `grep -rhoE "Icon[A-Za-z0-9]*Bell[A-Za-z0-9]*" node_modules/@axcore/xicons-react/ --include='*.d.ts' | sort -u` (swap in the package you use), or search https://icons.alienxstudio.com/icons.txt.
- Icons paint with `currentColor` and default to 24px with a 1.75 stroke. Prefer classes (`size-5 text-zinc-500`) or `size`, `strokeWidth` and `color` props.
- Decorative icons need nothing. Give meaningful icons a `title`, and icon-only buttons an `aria-label`. In React Native, pass `color` on every icon and put `accessibilityLabel` on the pressable.

## 5. Verify and report

- Don't add demo icons, and don't replace another icon library unless I ask. If I ask you to migrate (lucide-react, react-icons, heroicons, @tabler/icons-react…), map every icon to the closest AXIcons name, check each name, and keep the existing sizes and colours.
- Run the project's typecheck, lint and build, whichever exist, and fix anything you broke.
- Finish with: the package you installed, the files you changed, and anything you couldn't do.

Start here

Getting started

Integrations

Customization

Advanced

Resources

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