> For AI agents: the complete documentation index is available at https://rspress.rs/llms.txt, the full documentation bundle is available at https://rspress.rs/llms-full.txt.

# Built-in icons

When Rspress uses icons, it uses a `SvgWrapper` component to render icons. It supports icon as a URL or an svgr React component:

```ts
type Icon = React.FC<React.SVGProps<SVGSVGElement>> | string;
```

The following code is an example of how Rspress uses `IconGithub`:

```mdx preview
import { SvgWrapper, IconGithub } from '@rspress/core/theme';

<SvgWrapper icon={IconGithub} width={24} height={24} />
```

## Usage

When you want to replace Rspress built-in icons, use [Custom Theme - Re-export](https://rspress.rs/guide/basic/custom-theme.md#reexport) for replacement.

```tsx title="theme/index.tsx"
export { IconGithub } from './my-icons';
export * from '@rspress/core/theme-original';
```

All icons used by Rspress are as follows:


[Source Code](https://github.com/web-infra-dev/rspress/blob/main/packages/core/src/theme/icons.ts)

```tsx preview
import {
  SvgWrapper,
  IconAnthropic,
  IconArrowDown,
  IconArrowRight,
  IconClose,
  IconCopy,
  IconDeprecated,
  IconDown,
  IconEdit,
  IconEmpty,
  IconExperimental,
  IconExternalLink,
  IconFile,
  IconGithub,
  IconGitlab,
  IconHeader,
  IconJump,
  IconLoading,
  IconMenu,
  IconMoon,
  IconOpenAI,
  IconOpenInChat,
  IconScrollToTop,
  IconSearch,
  IconSmallMenu,
  IconSuccess,
  IconSun,
  IconTitle,
  IconWrap,
  IconWrapped,
  IconLink,
} from '@rspress/core/theme';

export default () => {
  return (
    <div style={{ display: 'flex', gap: 8, flexWrap: 'wrap', fontSize: 12 }}>
      {[
        IconAnthropic,
        IconArrowDown,
        IconArrowRight,
        IconClose,
        IconCopy,
        IconDeprecated,
        IconDown,
        IconEdit,
        IconEmpty,
        IconExperimental,
        IconExternalLink,
        IconFile,
        IconGithub,
        IconGitlab,
        IconHeader,
        IconJump,
        IconLoading,
        IconMenu,
        IconMoon,
        IconOpenAI,
        IconOpenInChat,
        IconScrollToTop,
        IconSearch,
        IconSmallMenu,
        IconSuccess,
        IconSun,
        IconTitle,
        IconWrap,
        IconWrapped,
        IconLink,
      ].map((Icon, idx) => (
        <SvgWrapper icon={Icon} key={idx} width={24} height={24} />
      ))}
    </div>
  );
};
```
