TypeScript icon, indicating that this package has built-in type declarations

0.4.4 • Public • Published

Svelte Radix


PWA Shield npm Created by Shin Okada License npm

310+ SVG Radix icons components for Svelte. Svelte-Radix support major CSS frameworks using the class props.

Thank you for considering my open-source package. If you use it in a commercial project, please support me by sponsoring me on GitHub: Your support helps me maintain and improve this package for the benefit of the community.


npm i -D svelte-radix

Icon name list

Icon list




In a svelte file:

  import { Accessibility, ActivityLog, AlignBaseline } from 'svelte-radix';

<Accessibility />
<ActivityLog />
<AlignBaseline />

Faster compiling

If you need only a few icons from this library in your Svelte app, import them directly. This can optimize compilation speed and improve performance by reducing the amount of code processed during compilation.

  import ActivityLog from 'svelte-radix/ActivityLog.svelte';

<ActivityLog />

If you are a TypeScript user, install typescript version 5.0.0 or above.

As of March 2023, the typescript@beta version is now available:

pnpm i -D typescript@beta

To avoid any complaints from the editor, add node16 or nodenext to moduleResolution in your tsconfig.json file.

  "compilerOptions": {
    // ...
    "moduleResolution": "nodenext"


  • size = '16';
  • role = 'img';
  • color = 'currentColor';
  • ariaLabel = 'accessibility 16';

IDE support

If you are using an LSP-compatible editor, such as VSCode, Atom, Sublime Text, or Neovim, hovering over a component name will display a documentation link, features, props, events, and an example.


Use the size prop to change the size of icons.

<Accessibility size="40" />
<ActivityLog size="50" />
<AlignBaseline size="60" />

CSS HEX Colors

Use the color prop to change colors with HEX color code.

<Accessibility color="#c61515" />
<ActivityLog color="#3759e5" />
<AlignBaseline color="#3fe537" />

CSS framworks suport

Use the class prop to change size, colors and add additional css.

Tailwind CSS example:

<Accessibility class="h-24 w-24 text-blue-700 mr-4" />

Bootstrap examples:

<Accessibility class="position-absolute top-0 px-1" />

Dark mode

If you are using the dark mode on your website with Tailwind CSS, add your dark mode class to the class prop.

Let's use dark for the dark mode class as an example.

<Accessibility class="text-blue-700 dark:text-red-500" />


All icons have aria-label. For example Accessibility has aria-label="accessibility". Use ariaLabel prop to modify the aria-label value.

<Accessibility ariaLabel="accessibility icon" />

Unfocusable icon

If you want to make an icon unfocusable, add tabindex="-1".

<Accessibility tabindex="-1" />

Passing down other attributes

You can pass other attibutes as well.

<Accessibility tabindex="0" />

Using svelte:component

  import { Accessibility } from 'svelte-radix';

<svelte:component this="{Accessibility}" />

Using onMount

  import { Accessibility } from 'svelte-radix';
  import { onMount } from 'svelte';
  const props = {
    size: '50',
    color: '#ff0000'
  onMount(() => {
    const icon = new Accessibility({ target: document.body, props });

Import all

Use import * as Icon from 'svelte-radix.

  import * as Icon from 'svelte-radix';

<Icon.Accessibility />
<Icon.ActivityLog />

<Icon.Accessibility size="30" />
<Icon.ActivityLog size="40" />

<h1>CSS HEX color</h1>
<Icon.Accessibility color="#c61515" size="40" />

<h1>Tailwind CSS</h1>
<Icon.Accessibility class="text-blue-500" />
<Icon.ActivityLog class="text-pink-700" />


All icons have the following events:

  • on:click
  • on:keydown
  • on:keyup
  • on:focus
  • on:blur
  • on:mouseenter
  • on:mouseleave
  • on:mouseover
  • on:mouseout

Other icons

Experience lightning-fast browsing and offline access with Our PWA

This website can be downloaded and installed on your device for offline access as a Progressive Web App.

To install a PWA, look for the "Add to Home Screen" option in the browser's menu or settings. On most mobile devices, this option can be found by visiting the website, then selecting the "Options" or "Menu" button in the browser, and looking for the "Add to Home Screen" option. On some desktop browsers, right-click on the page and select "Install".


npm i svelte-radix

DownloadsWeekly Downloads






Unpacked Size

1.04 MB

Total Files


Last publish


  • shinichiokada