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 guideAXIcons setup prompt
- Claude
- ChatGPT
- Grok
- Cursor
Read the prompt
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
- IntroductionWhat AXIcons is, what it includes and where it runs.
- InstallationPick your framework and package manager, install, and render a first icon.
- Quick startInstall AXIcons, import an icon, render it and style it in about a minute.
- AI agentsSet up AXIcons with one prompt for Claude, ChatGPT, Grok or Cursor.
- Choosing an icon styleWhen to use outline, filled or duotone icons, and how to switch between them.
Integrations
- ReactUse AXIcons components in React: imports, props, Tailwind and the brand registry.
- Next.jsUse AXIcons in the Next.js App Router, in Server and Client Components, with no configuration.
- React NativeUse AXIcons in React Native with react-native-svg: props, colour and native styling.
- ExpoAdd AXIcons to an Expo app with expo install, in Expo Go or a development build.
- Vanilla JavaScriptRender AXIcons to SVG strings with toSvg, for any framework, SSR or email.
- SVG and HTMLUse AXIcons as inline SVG or static files in plain HTML.
- CDNLoad single icons from jsDelivr or unpkg, or self-host the composite SVG server.
Customization
- Icon sizesSet icon size with the size prop or CSS, and which sizes render crispest.
- Icon coloursColour icons through currentColor, the color prop or CSS.
- Stroke widthChange the 1.75 stroke per icon or across your whole app.
- Outline, filled and duotoneHow the three styles are built and how to style duotone layers.
- CSS and TailwindStyle icons with Tailwind utilities, global classes and CSS variables.
- Dark modeAXIcons follow your theme automatically through currentColor.
- AccessibilityDecorative versus meaningful icons, accessible names and icon buttons.
Advanced
- Dynamic icon renderingChoose an icon at runtime without bundling the whole set.
- Tree shaking and bundle sizeHow AXIcons stays small in your bundle, with measured sizes.
- TypeScriptTypes exported by each package and how to type props that take an icon.
- Server-side renderingRender icons on the server with components or toSvg.
- Reusable icon componentsWrap icons with your own defaults, or build components from icon data with createIcon.
- Performance best practicesKeep icons cheap to download and render.
Resources
- Icon naming conventionsHow file names map to export names, and what suffixes and prefixes mean.
- Brand iconsThe 413 brand marks in the UI set and the seven full-colour brand logos.
- FAQLicensing, frameworks, AI agents, hosting and icon requests.
- TroubleshootingFixes for import errors, missing peers, colour problems and bundle size.
- ChangelogRelease history of the AXIcons packages, from the repository and npm.
- ContributingAdd icons, fix bugs and improve AXIcons through pull requests.
- LicenseAXIcons is MIT licensed; adapted artwork keeps its original notices.