Browse Source

Add Astro support for Tabler Icons (#1559)

* Add Astro package support and update dependencies

* Update build script to use ES module for icon building

* Add new Open Graph images for Astro package

* Add imports check script to package.json and create .gitkeep in icons directory

* Update README and documentation to use 'main' branch for image sources and adjust package.json for Astro icons

* Correct capitalization of 'GitHub' in documentation and configuration files

* Add color toggle functionality and new icons in various frameworks

* Update documentation to reference 'main' branch for license links across all packages

* Apply suggestions from code review

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
pull/1562/head
Paweł Kuna 3 months ago
committed by GitHub
parent
commit
4a4b287666
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 2
      .build/iconfont.scss
  2. 1
      .github/ISSUE_TEMPLATE/02-bug_report.yml
  3. 8
      .github/labeler.yml
  4. BIN
      .github/packages/og-package-astro-dark.png
  5. BIN
      .github/packages/og-package-astro.png
  6. 20
      README.md
  7. 39
      docs/icons/astro.mdx
  8. 4
      docs/icons/eps.mdx
  9. 4
      docs/icons/pdf.mdx
  10. 4
      docs/icons/png.mdx
  11. 4
      docs/icons/preact.mdx
  12. 4
      docs/icons/react-native.mdx
  13. 4
      docs/icons/react.mdx
  14. 4
      docs/icons/solidjs.mdx
  15. 4
      docs/icons/sprite.mdx
  16. 4
      docs/icons/svelte-runes.mdx
  17. 4
      docs/icons/svelte.mdx
  18. 4
      docs/icons/svg.mdx
  19. 4
      docs/icons/vue.mdx
  20. 4
      docs/icons/webfont.mdx
  21. 3
      package.json
  22. 6
      packages/icons-angular/README.md
  23. 2
      packages/icons-astro/.gitignore
  24. 88
      packages/icons-astro/README.md
  25. 43
      packages/icons-astro/build.mjs
  26. 49
      packages/icons-astro/package.json
  27. 43
      packages/icons-astro/rollup.config.mjs
  28. 72
      packages/icons-astro/src/createTablerIcon.ts
  29. 25
      packages/icons-astro/src/defaultAttributes.ts
  30. 0
      packages/icons-astro/src/icons/.gitkeep
  31. 7
      packages/icons-astro/src/tabler-icons-astro.ts
  32. 20
      packages/icons-astro/src/types.ts
  33. 68
      packages/icons-astro/test.spec.ts
  34. 15
      packages/icons-astro/tsconfig.json
  35. 8
      packages/icons-astro/vitest.config.ts
  36. 8
      packages/icons-eps/README.md
  37. 8
      packages/icons-pdf/README.md
  38. 8
      packages/icons-png/README.md
  39. 8
      packages/icons-preact/README.md
  40. 8
      packages/icons-react-native/README.md
  41. 8
      packages/icons-react/README.md
  42. 8
      packages/icons-solidjs/README.md
  43. 8
      packages/icons-sprite/README.md
  44. 6
      packages/icons-svelte-runes/README.md
  45. 8
      packages/icons-svelte/README.md
  46. 8
      packages/icons-vue/README.md
  47. 2
      packages/icons-webfont/.build/iconfont.scss
  48. 8
      packages/icons-webfont/README.md
  49. 8
      packages/icons/README.md
  50. 2655
      pnpm-lock.yaml
  51. 1
      pnpm-workspace.yaml
  52. 3
      test/test-angular/src/app/app.component.html
  53. 11
      test/test-angular/src/app/app.component.ts
  54. 3
      test/test-astro/.gitignore
  55. 4
      test/test-astro/astro.config.mjs
  56. 18
      test/test-astro/package.json
  57. 45
      test/test-astro/src/pages/index.astro
  58. 31
      test/test-astro/src/styles/app.css
  59. 71
      test/test-astro/src/styles/index.css
  60. 3
      test/test-astro/tsconfig.json
  61. 36
      test/test-preact/src/app.css
  62. 11
      test/test-preact/src/app.tsx
  63. 1
      test/test-preact/src/index.css
  64. 28
      test/test-react-native/src/App.css
  65. 12
      test/test-react-native/src/App.tsx
  66. 1
      test/test-react-native/src/index.css
  67. 28
      test/test-react/src/App.css
  68. 12
      test/test-react/src/App.tsx
  69. 1
      test/test-react/src/index.css
  70. 14
      test/test-svelte/src/App.svelte
  71. 43
      test/test-svelte/src/app.css
  72. 24
      test/test-vue/src/App.vue
  73. 43
      test/test-vue/src/style.css

2
.build/iconfont.scss

@ -1,7 +1,7 @@
@charset "UTF-8";
/*!
* Tabler Icons <%= v %> by tabler - https://tabler.io
* License - https://github.com/tabler/tabler-icons/blob/master/LICENSE
* License - https://github.com/tabler/tabler-icons/blob/main/LICENSE
*/
@use "sass:string";

1
.github/ISSUE_TEMPLATE/02-bug_report.yml

@ -29,6 +29,7 @@ body:
- label: "@tabler/icons-preact"
- label: "@tabler/icons-react"
- label: "@tabler/icons-react-native"
- label: "@tabler/icons-astro"
- label: "@tabler/icons-solid"
- label: "@tabler/icons-svelte"
- label: "@tabler/icons-svelte-runes"

8
.github/labeler.yml

@ -23,7 +23,7 @@
- any-glob-to-any-file:
- 'icons/**/*.svg'
# For Github Actions
# For GitHub Actions
🤖 github-actions:
- changed-files:
- any-glob-to-any-file:
@ -68,6 +68,12 @@
- any-glob-to-any-file:
- 'packages/icons-solidjs/*'
# For Astro package
🔗 astro package:
- changed-files:
- any-glob-to-any-file:
- 'packages/icons-astro/**'
# For Webfont package
🔗 webfont package:
- changed-files:

BIN
.github/packages/og-package-astro-dark.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

BIN
.github/packages/og-package-astro.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 81 KiB

20
README.md

@ -41,9 +41,9 @@
<p align="center">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/tabler/tabler-icons/master/.github/preview/icons-outline-dark.png">
<source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/tabler/tabler-icons/master/.github/preview/icons-outline.png">
<img src="https://raw.githubusercontent.com/tabler/tabler-icons/master/.github/preview/icons-outline.png" alt="Tabler Icons preview" width="838">
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/tabler/tabler-icons/main/.github/preview/icons-outline-dark.png">
<source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/tabler/tabler-icons/main/.github/preview/icons-outline.png">
<img src="https://raw.githubusercontent.com/tabler/tabler-icons/main/.github/preview/icons-outline.png" alt="Tabler Icons preview" width="838">
</picture>
</p>
@ -51,9 +51,9 @@
<p align="center">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/tabler/tabler-icons/master/.github/preview/icons-filled-dark.png">
<source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/tabler/tabler-icons/master/.github/preview/icons-filled.png">
<img src="https://raw.githubusercontent.com/tabler/tabler-icons/master/.github/preview/icons-filled.png" alt="Tabler Icons preview" width="838">
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/tabler/tabler-icons/main/.github/preview/icons-filled-dark.png">
<source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/tabler/tabler-icons/main/.github/preview/icons-filled.png">
<img src="https://raw.githubusercontent.com/tabler/tabler-icons/main/.github/preview/icons-filled.png" alt="Tabler Icons preview" width="838">
</picture>
</p>
@ -378,14 +378,14 @@ For Android or Desktop you can use [`compose-icons`](https://github.com/DevSrSou
All icons in this repository have been created with the value of the `stroke-width` property, so if you change the value, you can get different icon variants that will fit in well with your design.
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/tabler/tabler-icons/master/.github/icons-stroke-dark.png">
<source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/tabler/tabler-icons/master/.github/icons-stroke.png">
<img src="https://raw.githubusercontent.com/tabler/tabler-icons/master/.github/icons-stroke.png" alt="Tabler Icons preview" width="838">
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/tabler/tabler-icons/main/.github/icons-stroke-dark.png">
<source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/tabler/tabler-icons/main/.github/icons-stroke.png">
<img src="https://raw.githubusercontent.com/tabler/tabler-icons/main/.github/icons-stroke.png" alt="Tabler Icons preview" width="838">
</picture>
## License
Tabler Icons is licensed under the [MIT License](https://github.com/tabler/tabler-icons/blob/master/LICENSE).
Tabler Icons is licensed under the [MIT License](https://github.com/tabler/tabler-icons/blob/main/LICENSE).
## Sponsor Tabler

39
docs/icons/astro.mdx

@ -0,0 +1,39 @@
---
title: Tabler Icons for Astro
---
![](https://raw.githubusercontent.com/tabler/tabler-icons/main/.github/packages/og-package-astro.png)
## Installation
<TabsPackage name="@tabler/icons-astro" />
or just [download from GitHub](https://github.com/tabler/tabler-icons/releases).
## How to use
It's built with ES modules so it's completely tree-shakable. Each icon can be imported as an Astro component.
```astro
---
import { IconArrowRight } from '@tabler/icons-astro';
---
<IconArrowRight />
```
You can pass additional props to adjust the icon.
```astro
<IconArrowRight color="red" size={48} />
```
Any valid SVG attribute is forwarded to the rendered `<svg>` element.
### Props
| name | type | default |
| ------------- | -------- | ------------ |
| `size` | _Number_ | 24 |
| `color` | _String_ | currentColor |
| `stroke` | _Number_ | 2 |

4
docs/icons/eps.mdx

@ -2,12 +2,12 @@
title: EPS version
---
![](https://raw.githubusercontent.com/tabler/tabler-icons/master/.github/packages/og-package-eps.png)
![](https://raw.githubusercontent.com/tabler/tabler-icons/main/.github/packages/og-package-eps.png)
## Installation
<TabsPackage name="@tabler/icons-eps" />
or just [download from Github](https://github.com/tabler/tabler-icons/releases).
or just [download from GitHub](https://github.com/tabler/tabler-icons/releases).
All EPS files are stored in `icons` subdirectory.

4
docs/icons/pdf.mdx

@ -2,12 +2,12 @@
title: PDF version
---
![](https://raw.githubusercontent.com/tabler/tabler-icons/master/.github/packages/og-package-pdf.png)
![](https://raw.githubusercontent.com/tabler/tabler-icons/main/.github/packages/og-package-pdf.png)
## Installation
<TabsPackage name="@tabler/icons-pdf" />
or just [download from Github](https://github.com/tabler/tabler-icons/releases).
or just [download from GitHub](https://github.com/tabler/tabler-icons/releases).
All PDF files are stored in `icons` subdirectory.

4
docs/icons/png.mdx

@ -2,13 +2,13 @@
title: PNG version
---
![](https://raw.githubusercontent.com/tabler/tabler-icons/master/.github/packages/og-package-png.png)
![](https://raw.githubusercontent.com/tabler/tabler-icons/main/.github/packages/og-package-png.png)
## Installation
<TabsPackage name="@tabler/icons-png" />
or just [download from Github](https://github.com/tabler/tabler-icons/releases).
or just [download from GitHub](https://github.com/tabler/tabler-icons/releases).
All PNG files are stored in `icons` subdirectory.

4
docs/icons/preact.mdx

@ -2,13 +2,13 @@
title: Tabler Icons for Preact
---
![](https://raw.githubusercontent.com/tabler/tabler-icons/master/.github/packages/og-package-preact.png)
![](https://raw.githubusercontent.com/tabler/tabler-icons/main/.github/packages/og-package-preact.png)
## Installation
<TabsPackage name="@tabler/icons-preact" />
or just [download from Github](https://github.com/tabler/tabler-icons/releases).
or just [download from GitHub](https://github.com/tabler/tabler-icons/releases).
## How to use

4
docs/icons/react-native.mdx

@ -2,13 +2,13 @@
title: Tabler Icons for React Native
---
![](https://raw.githubusercontent.com/tabler/tabler-icons/master/.github/packages/og-package-react-native.png)
![](https://raw.githubusercontent.com/tabler/tabler-icons/main/.github/packages/og-package-react-native.png)
## Installation
<TabsPackage name="@tabler/icons-react-native" />
or just [download from Github](https://github.com/tabler/tabler-icons/releases).
or just [download from GitHub](https://github.com/tabler/tabler-icons/releases).
## How to use

4
docs/icons/react.mdx

@ -2,13 +2,13 @@
title: Tabler Icons for React
---
![](https://raw.githubusercontent.com/tabler/tabler-icons/master/.github/packages/og-package-react.png)
![](https://raw.githubusercontent.com/tabler/tabler-icons/main/.github/packages/og-package-react.png)
## Installation
<TabsPackage name="@tabler/icons-react" />
or just [download from Github](https://github.com/tabler/tabler-icons/releases).
or just [download from GitHub](https://github.com/tabler/tabler-icons/releases).
## How to use

4
docs/icons/solidjs.mdx

@ -2,13 +2,13 @@
title: Tabler Icons for SolidJS
---
![](https://raw.githubusercontent.com/tabler/tabler-icons/master/.github/packages/og-package-solidjs.png)
![](https://raw.githubusercontent.com/tabler/tabler-icons/main/.github/packages/og-package-solidjs.png)
## Installation
<TabsPackage name="@tabler/icons-solidjs" />
or just [download from Github](https://github.com/tabler/tabler-icons/releases).
or just [download from GitHub](https://github.com/tabler/tabler-icons/releases).
## How to use

4
docs/icons/sprite.mdx

@ -2,13 +2,13 @@
title: SVG sprite version
---
![](https://raw.githubusercontent.com/tabler/tabler-icons/master/.github/packages/og-package-sprite.png)
![](https://raw.githubusercontent.com/tabler/tabler-icons/main/.github/packages/og-package-sprite.png)
## Installation
<TabsPackage name="@tabler/icons-sprite" />
or just [download from Github](https://github.com/tabler/tabler-icons/releases).
or just [download from GitHub](https://github.com/tabler/tabler-icons/releases).
## Usage

4
docs/icons/svelte-runes.mdx

@ -2,13 +2,13 @@
title: Tabler Icons for Svelte 5
---
![](https://raw.githubusercontent.com/tabler/tabler-icons/master/.github/packages/og-package-svelte.png)
![](https://raw.githubusercontent.com/tabler/tabler-icons/main/.github/packages/og-package-svelte.png)
## Installation
<TabsPackage name="@tabler/icons-svelte-runes" />
or just [download from Github](https://github.com/tabler/tabler-icons/releases).
or just [download from GitHub](https://github.com/tabler/tabler-icons/releases).
## How to use

4
docs/icons/svelte.mdx

@ -2,13 +2,13 @@
title: Tabler Icons for Svelte
---
![](https://raw.githubusercontent.com/tabler/tabler-icons/master/.github/packages/og-package-svelte.png)
![](https://raw.githubusercontent.com/tabler/tabler-icons/main/.github/packages/og-package-svelte.png)
## Installation
<TabsPackage name="@tabler/icons-svelte" />
or just [download from Github](https://github.com/tabler/tabler-icons/releases).
or just [download from GitHub](https://github.com/tabler/tabler-icons/releases).
## How to use

4
docs/icons/svg.mdx

@ -2,13 +2,13 @@
title: SVG version
---
![](https://raw.githubusercontent.com/tabler/tabler-icons/master/.github/packages/og-package-svg.png)
![](https://raw.githubusercontent.com/tabler/tabler-icons/main/.github/packages/og-package-svg.png)
## Installation
<TabsPackage name="@tabler/icons" />
or just [download from Github](https://github.com/tabler/tabler-icons/releases).
or just [download from GitHub](https://github.com/tabler/tabler-icons/releases).
## Usage

4
docs/icons/vue.mdx

@ -2,13 +2,13 @@
title: Tabler Icons for Vue
---
![](https://raw.githubusercontent.com/tabler/tabler-icons/master/.github/packages/og-package-vue.png)
![](https://raw.githubusercontent.com/tabler/tabler-icons/main/.github/packages/og-package-vue.png)
## Installation
<TabsPackage name="@tabler/icons-vue" />
or just [download from Github](https://github.com/tabler/tabler-icons/releases).
or just [download from GitHub](https://github.com/tabler/tabler-icons/releases).
## How to use

4
docs/icons/webfont.mdx

@ -2,7 +2,7 @@
title: Webfont
---
![](https://raw.githubusercontent.com/tabler/tabler-icons/master/.github/packages/og-package-webfont.png)
![](https://raw.githubusercontent.com/tabler/tabler-icons/main/.github/packages/og-package-webfont.png)
## Installation
@ -22,7 +22,7 @@ or
pnpm install @tabler/icons-webfont
```
or just [download from Github](https://github.com/tabler/tabler-icons/releases).
or just [download from GitHub](https://github.com/tabler/tabler-icons/releases).
### CDN

3
package.json

@ -33,13 +33,14 @@
"validate": "node ./.build/validate-icons.mjs",
"release": "git pull && release-it --verbose",
"build:copy": "rm -rf ./icons && mkdir ./icons && cp ./_site/tags.json tags.json && cp ./_site/icons/* ./icons/ && rm -rf ./_site/",
"build:packages": "pnpm run build:icons && pnpm run build:sprite && pnpm run build:react && pnpm run build:react-native && pnpm run build:preact && pnpm run build:solidjs && pnpm run build:svelte && pnpm run build:svelte-runes && pnpm run build:vue && pnpm run build:angular && pnpm run build:png && pnpm run build:pdf && pnpm run build:esp && pnpm run build:webfont",
"build:packages": "pnpm run build:icons && pnpm run build:sprite && pnpm run build:react && pnpm run build:react-native && pnpm run build:preact && pnpm run build:solidjs && pnpm run build:astro && pnpm run build:svelte && pnpm run build:svelte-runes && pnpm run build:vue && pnpm run build:angular && pnpm run build:png && pnpm run build:pdf && pnpm run build:esp && pnpm run build:webfont",
"build:icons": "pnpm --filter @tabler/icons build",
"build:angular": "pnpm --filter @tabler/icons-angular build",
"build:react": "pnpm --filter @tabler/icons-react build",
"build:react-native": "pnpm --filter @tabler/icons-react-native build",
"build:preact": "pnpm --filter @tabler/icons-preact build",
"build:solidjs": "pnpm --filter @tabler/icons-solidjs build",
"build:astro": "pnpm --filter @tabler/icons-astro build",
"build:svelte": "pnpm --filter @tabler/icons-svelte build",
"build:svelte-runes": "pnpm --filter @tabler/icons-svelte-runes build",
"build:vue": "pnpm --filter @tabler/icons-vue build",

6
packages/icons-angular/README.md

@ -14,7 +14,7 @@
<p align="center">
<a href="https://github.com/tabler/tabler-icons/releases"><img src="https://img.shields.io/npm/v/@tabler/icons" alt="Latest Release"></a>
<a href="https://github.com/tabler/tabler-icons/blob/master/LICENSE"><img src="https://img.shields.io/npm/l/@tabler/icons.svg" alt="License"></a>
<a href="https://github.com/tabler/tabler-icons/blob/main/LICENSE"><img src="https://img.shields.io/npm/l/@tabler/icons.svg" alt="License"></a>
</p>
## Sponsors
@ -200,11 +200,11 @@ provideTablerIconConfig({ size: 40 })
For more info on how to contribute please see the [contribution guidelines](https://github.com/tabler/tabler-icons/blob/main/CONTRIBUTING.md).
Caught a mistake or want to contribute to the documentation? [Edit this page on Github](https://github.com/tabler/tabler-icons/blob/main/packages/icons-angular/README.md)
Caught a mistake or want to contribute to the documentation? [Edit this page on GitHub](https://github.com/tabler/tabler-icons/blob/main/packages/icons-angular/README.md)
## License
Tabler Icons is licensed under the [MIT License](https://github.com/tabler/tabler-icons/blob/master/LICENSE).
Tabler Icons is licensed under the [MIT License](https://github.com/tabler/tabler-icons/blob/main/LICENSE).
## Sponsor Tabler

2
packages/icons-astro/.gitignore

@ -0,0 +1,2 @@
src/aliases.ts
src/icons-list.ts

88
packages/icons-astro/README.md

@ -0,0 +1,88 @@
# Tabler Icons for Astro
<p align="center">
<a href="https://tabler.io/icons?ref=tabler-icons-readme"><img src="https://raw.githubusercontent.com/tabler/tabler-icons/main/.github/packages/og-package-astro.png" alt="Tabler Icons" width="838"></a>
</p>
<p align="center">
Implementation of the Tabler Icons library for Astro applications.
</p>
<p align="center">
<a href="https://tabler.io/icons"><strong>Browse all icons at tabler.io &rarr;</strong></a>
</p>
<p align="center">
<a href="https://github.com/tabler/tabler-icons/releases"><img src="https://img.shields.io/npm/v/@tabler/icons" alt="Latest Release"></a>
<a href="https://github.com/tabler/tabler-icons/blob/main/LICENSE"><img src="https://img.shields.io/npm/l/@tabler/icons.svg" alt="License"></a>
</p>
## Sponsors
**If you want to support my project and help me grow it, you can [become a sponsor on GitHub](https://github.com/sponsors/codecalm) or just [donate on PayPal](https://paypal.me/codecalm) :)**
<a href="https://github.com/sponsors/codecalm">
<img src="https://cdn.jsdelivr.net/gh/tabler/sponsors@latest/sponsors.svg" alt="Tabler sponsors">
</a>
## Installation
```
yarn add @tabler/icons-astro
```
or
```
npm install @tabler/icons-astro
```
or
```
pnpm install @tabler/icons-astro
```
or just [download from GitHub](https://github.com/tabler/tabler-icons/releases).
## How to use
It's built with ES modules so it's completely tree-shakable. Each icon can be imported as an Astro component.
```astro
---
import { IconArrowRight } from '@tabler/icons-astro';
---
<IconArrowRight />
```
You can pass additional props to adjust the icon.
```astro
<IconArrowRight color="red" size={48} />
```
Any valid SVG attribute is forwarded to the rendered `<svg>` element.
### Props
| name | type | default |
| ------------- | -------- | ------------ |
| `size` | _Number_ | 24 |
| `color` | _String_ | currentColor |
| `stroke` | _Number_ | 2 |
## Contributing
For more info on how to contribute please see the [contribution guidelines](https://github.com/tabler/tabler-icons/blob/main/CONTRIBUTING.md).
Caught a mistake or want to contribute to the documentation? [Edit this page on GitHub](https://github.com/tabler/tabler-icons/blob/main/packages/icons-astro/README.md)
## License
Tabler Icons is licensed under the [MIT License](https://github.com/tabler/tabler-icons/blob/main/LICENSE).
## Sponsor Tabler
<a href="https://github.com/sponsors/codecalm" target="_blank"><img src="https://github.com/tabler/tabler/raw/dev/src/static/sponsor-banner-readme.png?raw=true" alt="Sponsor Tabler" /></a>

43
packages/icons-astro/build.mjs

@ -0,0 +1,43 @@
#!/usr/bin/env node
import { buildJsIcons, buildIconsList } from '../../.build/build-icons.mjs'
const componentTemplate = ({
type,
name,
namePascal,
children
}) => `\
import createTablerIcon from '../createTablerIcon';
import type { AstroComponent } from '../types';
/**
* @component @name Icon${namePascal}
* @description Tabler SVG icon component, renders SVG Element with children.
*
* @param {import('../types').IconProps} props - Tabler icons props and any valid SVG attribute
* @returns {any} Astro Component
*/
const Icon${namePascal} = createTablerIcon('${name}', ${JSON.stringify(children)}, '${type}') as AstroComponent;
export default Icon${namePascal};`;
const indexItemTemplate = ({
name,
namePascal
}) => `export { default as Icon${namePascal} } from './${name}';`
const aliasTemplate = ({ fromPascal, to }) => `export { default as Icon${fromPascal} } from './icons/${to}';\n`
buildJsIcons({
name: 'icons-astro',
componentTemplate,
indexItemTemplate,
aliasTemplate,
key: false,
extension: 'ts',
indexFile: 'index.ts',
pascalName: false
})
buildIconsList('icons-astro')

49
packages/icons-astro/package.json

@ -0,0 +1,49 @@
{
"name": "@tabler/icons-astro",
"version": "3.44.0",
"license": "MIT",
"author": "codecalm",
"description": "A set of free MIT-licensed high-quality SVG icons for you to use in your web projects.",
"homepage": "https://tabler.io/icons",
"bugs": {
"url": "https://github.com/tabler/tabler-icons/issues"
},
"funding": {
"type": "github",
"url": "https://github.com/sponsors/codecalm"
},
"repository": {
"type": "git",
"url": "git+https://github.com/tabler/tabler-icons.git",
"directory": "packages/icons-astro"
},
"sideEffects": false,
"amdName": "TablerIconsAstro",
"main": "./dist/cjs/tabler-icons-astro.cjs",
"module": "./dist/esm/tabler-icons-astro.mjs",
"types": "./dist/tabler-icons-astro.d.ts",
"files": [
"dist"
],
"scripts": {
"build": "pnpm run clean && pnpm run copy:license && pnpm run build:icons && pnpm typecheck && pnpm run build:bundles",
"build:icons": "node build.mjs",
"build:bundles": "rollup -c ./rollup.config.mjs",
"copy:license": "cp ../../LICENSE ./LICENSE",
"clean": "find dist -mindepth 1 -delete 2>/dev/null; rm -rf dist && find . ! -name '.gitkeep' -path '*/src/icons/*' -exec rm -rf {} +",
"test": "vitest run",
"typecheck": "tsc",
"imports-check": "attw $(npm pack)"
},
"dependencies": {
"@tabler/icons": "workspace:"
},
"peerDependencies": {
"astro": ">=4.0.0"
},
"devDependencies": {
"astro": "catalog:",
"typescript": "catalog:",
"vitest": "catalog:"
}
}

43
packages/icons-astro/rollup.config.mjs

@ -0,0 +1,43 @@
import fs from 'fs'
import { getRollupConfig } from '../../.build/rollup-plugins.mjs'
import dts from 'rollup-plugin-dts'
const pkg = JSON.parse(fs.readFileSync('package.json', 'utf-8'))
const outputFileName = 'tabler-icons-astro'
const inputs = ['./src/tabler-icons-astro.ts']
// Astro's runtime helpers stay external — they are resolved by the
// consumer's Astro/Vite pipeline via the `astro` peer dependency.
const external = [/^astro(\/|$)/]
const bundles = [
{
format: 'cjs',
extension: 'cjs',
inputs,
external,
},
{
format: 'esm',
inputs,
preserveModules: true,
extension: 'mjs',
external,
},
]
export default [
{
input: inputs[0],
external,
output: [
{
file: `dist/${outputFileName}.d.ts`,
format: 'es',
},
],
plugins: [dts()],
},
...getRollupConfig(pkg, outputFileName, bundles, {}),
]

72
packages/icons-astro/src/createTablerIcon.ts

@ -0,0 +1,72 @@
import {
createComponent,
render as renderTemplate,
renderSlot,
spreadAttributes,
unescapeHTML,
} from 'astro/compiler-runtime';
import defaultAttributes from './defaultAttributes';
import type { AstroComponent, IconNode, IconProps, SVGAttributes } from './types';
/**
* Creates an Astro component factory for a Tabler icon.
*
* Astro compiles a `.astro` file down to a `createComponent()` call whose
* render function returns a `renderTemplate` tagged-template result. We build
* the same shape by hand so every icon can be shipped as a plain `.ts` module.
*
* @param name Kebab-case icon name (e.g. `wallet`, `accessible-filled`)
* @param iconNode Serialized SVG children as `[tag, attributes]` tuples
* @param type `outline` (default) or `filled`
*/
const createTablerIcon = (
name: string,
iconNode: IconNode,
type: 'outline' | 'filled' = 'outline',
): AstroComponent => {
const base = defaultAttributes[type];
// Serialize the icon paths once at module init — they never change per render.
const nodeHtml = iconNode
.map(([tag, attrs]) => `<${tag}${String(spreadAttributes(attrs as SVGAttributes))}></${tag}>`)
.join('');
return createComponent(
(result: any, props: IconProps, slots: any) => {
const {
size = 24,
color,
stroke,
strokeWidth,
title,
class: className,
...rest
} = props ?? {};
const colorAttributes: SVGAttributes =
type === 'filled'
? { fill: color ?? 'currentColor' }
: {
stroke: color ?? 'currentColor',
'stroke-width': stroke ?? strokeWidth ?? base['stroke-width'],
};
const attributes: SVGAttributes = {
...base,
...colorAttributes,
width: size,
height: size,
class: `tabler-icon tabler-icon-${name}${className ? ` ${className}` : ''}`,
...rest,
};
return renderTemplate`<svg${spreadAttributes(attributes)}>${
title != null ? renderTemplate`<title>${title}</title>` : ''
}${unescapeHTML(nodeHtml)}${slots?.default ? renderSlot(result, slots.default) : ''}</svg>`;
},
'tabler-icon',
undefined,
) as AstroComponent;
};
export default createTablerIcon;

25
packages/icons-astro/src/defaultAttributes.ts

@ -0,0 +1,25 @@
import { SVGAttributes } from './types';
const defaultAttributes: Record<'outline' | 'filled', SVGAttributes> = {
outline: {
xmlns: 'http://www.w3.org/2000/svg',
width: 24,
height: 24,
viewBox: '0 0 24 24',
fill: 'none',
stroke: 'currentColor',
'stroke-width': 2,
'stroke-linecap': 'round',
'stroke-linejoin': 'round',
},
filled: {
xmlns: 'http://www.w3.org/2000/svg',
width: 24,
height: 24,
viewBox: '0 0 24 24',
fill: 'currentColor',
stroke: 'none',
},
};
export default defaultAttributes;

0
packages/icons-astro/src/icons/.gitkeep

7
packages/icons-astro/src/tabler-icons-astro.ts

@ -0,0 +1,7 @@
export * from './icons/index';
export * as icons from './icons/index';
export * as iconsList from './icons-list';
export * from './aliases';
export { default as createTablerIcon } from './createTablerIcon';
export type { IconNode, IconProps, AstroComponent } from './types';

20
packages/icons-astro/src/types.ts

@ -0,0 +1,20 @@
export type IconNode = [elementName: string, attrs: Record<string, string | number>][];
export type SVGAttributes = Record<string, string | number | boolean | undefined>;
export interface IconProps extends Record<string, any> {
size?: string | number;
color?: string;
stroke?: string | number;
strokeWidth?: string | number;
title?: string;
class?: string;
}
/**
* Structural type for an Astro component factory. The runtime marker
* `isAstroComponentFactory` is attached by Astro's `createComponent`.
*/
export type AstroComponent = ((result: any, props: IconProps, slots: any) => any) & {
isAstroComponentFactory: true;
};

68
packages/icons-astro/test.spec.ts

@ -0,0 +1,68 @@
import { describe, it, expect, beforeAll } from 'vitest';
import { experimental_AstroContainer as AstroContainer } from 'astro/container';
import { IconAccessible, IconAccessibleFilled } from './src/tabler-icons-astro';
describe('Astro Icon component', () => {
let container: Awaited<ReturnType<typeof AstroContainer.create>>;
beforeAll(async () => {
container = await AstroContainer.create();
});
const openingTag = (html: string) => html.slice(0, html.indexOf('>') + 1);
it('should render an svg element', async () => {
const html = await container.renderToString(IconAccessible as any);
expect(html).toContain('<svg');
expect(html).toContain('</svg>');
});
it('should apply default attributes', async () => {
const tag = openingTag(await container.renderToString(IconAccessible as any));
expect(tag).toContain('width="24"');
expect(tag).toContain('height="24"');
expect(tag).toContain('stroke="currentColor"');
expect(tag).toContain('stroke-width="2"');
expect(tag).toContain('class="tabler-icon tabler-icon-accessible"');
});
it('should update svg attributes from props', async () => {
const tag = openingTag(
await container.renderToString(IconAccessible as any, {
props: { size: 48, color: 'red', stroke: 4 },
}),
);
expect(tag).toContain('width="48"');
expect(tag).toContain('height="48"');
expect(tag).toContain('stroke="red"');
expect(tag).toContain('stroke-width="4"');
});
it('should render the filled variant', async () => {
const tag = openingTag(
await container.renderToString(IconAccessibleFilled as any, {
props: { size: 48, color: 'red' },
}),
);
expect(tag).toContain('width="48"');
expect(tag).toContain('fill="red"');
expect(tag).toContain('stroke="none"');
expect(tag).not.toContain('stroke-width');
});
it('should append a custom class', async () => {
const tag = openingTag(
await container.renderToString(IconAccessible as any, {
props: { class: 'test-class' },
}),
);
expect(tag).toContain('class="tabler-icon tabler-icon-accessible test-class"');
});
it('should render a title element', async () => {
const html = await container.renderToString(IconAccessible as any, {
props: { title: 'Accessible icon' },
});
expect(html).toContain('<title>Accessible icon</title>');
});
});

15
packages/icons-astro/tsconfig.json

@ -0,0 +1,15 @@
{
"compilerOptions": {
"strict": true,
"target": "ESNext",
"module": "ESNext",
"moduleResolution": "Bundler",
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"skipLibCheck": true,
"noEmit": true,
"isolatedModules": true,
"types": ["astro/client"]
},
"include": ["src", "test.spec.ts"]
}

8
packages/icons-astro/vitest.config.ts

@ -0,0 +1,8 @@
import { getViteConfig } from 'astro/config';
export default getViteConfig({
test: {
globals: true,
environment: 'node',
},
});

8
packages/icons-eps/README.md

@ -14,7 +14,7 @@
<p align="center">
<a href="https://github.com/tabler/tabler-icons/releases"><img src="https://img.shields.io/npm/v/@tabler/icons" alt="Latest Release"></a>
<a href="https://github.com/tabler/tabler-icons/blob/master/LICENSE"><img src="https://img.shields.io/npm/l/@tabler/icons.svg" alt="License"></a>
<a href="https://github.com/tabler/tabler-icons/blob/main/LICENSE"><img src="https://img.shields.io/npm/l/@tabler/icons.svg" alt="License"></a>
</p>
## Sponsors
@ -43,7 +43,7 @@ or
pnpm install @tabler/icons-eps
```
or just [download from Github](https://github.com/tabler/tabler-icons/releases).
or just [download from GitHub](https://github.com/tabler/tabler-icons/releases).
All EPS files are stored in `icons` subdirectory.
@ -51,11 +51,11 @@ All EPS files are stored in `icons` subdirectory.
For more info on how to contribute please see the [contribution guidelines](https://github.com/tabler/tabler-icons/blob/main/CONTRIBUTING.md).
Caught a mistake or want to contribute to the documentation? [Edit this page on Github](https://github.com/tabler/tabler-icons/blob/main/packages/icons-eps/README.md)
Caught a mistake or want to contribute to the documentation? [Edit this page on GitHub](https://github.com/tabler/tabler-icons/blob/main/packages/icons-eps/README.md)
## License
Tabler Icons is licensed under the [MIT License](https://github.com/tabler/tabler-icons/blob/master/LICENSE).
Tabler Icons is licensed under the [MIT License](https://github.com/tabler/tabler-icons/blob/main/LICENSE).
## Sponsor Tabler

8
packages/icons-pdf/README.md

@ -14,7 +14,7 @@
<p align="center">
<a href="https://github.com/tabler/tabler-icons/releases"><img src="https://img.shields.io/npm/v/@tabler/icons" alt="Latest Release"></a>
<a href="https://github.com/tabler/tabler-icons/blob/master/LICENSE"><img src="https://img.shields.io/npm/l/@tabler/icons.svg" alt="License"></a>
<a href="https://github.com/tabler/tabler-icons/blob/main/LICENSE"><img src="https://img.shields.io/npm/l/@tabler/icons.svg" alt="License"></a>
</p>
## Sponsors
@ -43,7 +43,7 @@ or
pnpm install @tabler/icons-pdf
```
or just [download from Github](https://github.com/tabler/tabler-icons/releases).
or just [download from GitHub](https://github.com/tabler/tabler-icons/releases).
All PDF files are stored in `icons` subdirectory.
@ -51,11 +51,11 @@ All PDF files are stored in `icons` subdirectory.
For more info on how to contribute please see the [contribution guidelines](https://github.com/tabler/tabler-icons/blob/main/CONTRIBUTING.md).
Caught a mistake or want to contribute to the documentation? [Edit this page on Github](https://github.com/tabler/tabler-icons/blob/main/packages/icons-pdf/README.md)
Caught a mistake or want to contribute to the documentation? [Edit this page on GitHub](https://github.com/tabler/tabler-icons/blob/main/packages/icons-pdf/README.md)
## License
Tabler Icons is licensed under the [MIT License](https://github.com/tabler/tabler-icons/blob/master/LICENSE).
Tabler Icons is licensed under the [MIT License](https://github.com/tabler/tabler-icons/blob/main/LICENSE).
## Sponsor Tabler

8
packages/icons-png/README.md

@ -14,7 +14,7 @@
<p align="center">
<a href="https://github.com/tabler/tabler-icons/releases"><img src="https://img.shields.io/npm/v/@tabler/icons" alt="Latest Release"></a>
<a href="https://github.com/tabler/tabler-icons/blob/master/LICENSE"><img src="https://img.shields.io/npm/l/@tabler/icons.svg" alt="License"></a>
<a href="https://github.com/tabler/tabler-icons/blob/main/LICENSE"><img src="https://img.shields.io/npm/l/@tabler/icons.svg" alt="License"></a>
</p>
## Sponsors
@ -43,7 +43,7 @@ or
pnpm install @tabler/icons-png
```
or just [download from Github](https://github.com/tabler/tabler-icons/releases).
or just [download from GitHub](https://github.com/tabler/tabler-icons/releases).
All PNG files are stored in `icons` subdirectory.
@ -57,11 +57,11 @@ All PNG files are stored in `icons` subdirectory.
For more info on how to contribute please see the [contribution guidelines](https://github.com/tabler/tabler-icons/blob/main/CONTRIBUTING.md).
Caught a mistake or want to contribute to the documentation? [Edit this page on Github](https://github.com/tabler/tabler-icons/blob/main/packages/icons-png/README.md)
Caught a mistake or want to contribute to the documentation? [Edit this page on GitHub](https://github.com/tabler/tabler-icons/blob/main/packages/icons-png/README.md)
## License
Tabler Icons is licensed under the [MIT License](https://github.com/tabler/tabler-icons/blob/master/LICENSE).
Tabler Icons is licensed under the [MIT License](https://github.com/tabler/tabler-icons/blob/main/LICENSE).
## Sponsor Tabler

8
packages/icons-preact/README.md

@ -14,7 +14,7 @@ Implementation of the Tabler Icons library for Preact applications.
<p align="center">
<a href="https://github.com/tabler/tabler-icons/releases"><img src="https://img.shields.io/npm/v/@tabler/icons" alt="Latest Release"></a>
<a href="https://github.com/tabler/tabler-icons/blob/master/LICENSE"><img src="https://img.shields.io/npm/l/@tabler/icons.svg" alt="License"></a>
<a href="https://github.com/tabler/tabler-icons/blob/main/LICENSE"><img src="https://img.shields.io/npm/l/@tabler/icons.svg" alt="License"></a>
</p>
## Sponsors
@ -43,7 +43,7 @@ or
pnpm install @tabler/icons-preact
```
or just [download from Github](https://github.com/tabler/tabler-icons/releases).
or just [download from GitHub](https://github.com/tabler/tabler-icons/releases).
## How to use
@ -77,11 +77,11 @@ You can pass additional props to adjust the icon.
For more info on how to contribute please see the [contribution guidelines](https://github.com/tabler/tabler-icons/blob/main/CONTRIBUTING.md).
Caught a mistake or want to contribute to the documentation? [Edit this page on Github](https://github.com/tabler/tabler-icons/blob/main/packages/icons-preact/README.md)
Caught a mistake or want to contribute to the documentation? [Edit this page on GitHub](https://github.com/tabler/tabler-icons/blob/main/packages/icons-preact/README.md)
## License
Tabler Icons is licensed under the [MIT License](https://github.com/tabler/tabler-icons/blob/master/LICENSE).
Tabler Icons is licensed under the [MIT License](https://github.com/tabler/tabler-icons/blob/main/LICENSE).
## Sponsor Tabler

8
packages/icons-react-native/README.md

@ -14,7 +14,7 @@ Implementation of the Tabler Icons library for React applications.
<p align="center">
<a href="https://github.com/tabler/tabler-icons/releases"><img src="https://img.shields.io/npm/v/@tabler/icons" alt="Latest Release"></a>
<a href="https://github.com/tabler/tabler-icons/blob/master/LICENSE"><img src="https://img.shields.io/npm/l/@tabler/icons.svg" alt="License"></a>
<a href="https://github.com/tabler/tabler-icons/blob/main/LICENSE"><img src="https://img.shields.io/npm/l/@tabler/icons.svg" alt="License"></a>
</p>
## Sponsors
@ -43,7 +43,7 @@ or
pnpm install @tabler/icons-react-native
```
or just [download from Github](https://github.com/tabler/tabler-icons/releases).
or just [download from GitHub](https://github.com/tabler/tabler-icons/releases).
## How to use
@ -77,11 +77,11 @@ You can pass additional props to adjust the icon.
For more info on how to contribute please see the [contribution guidelines](https://github.com/tabler/tabler-icons/blob/main/CONTRIBUTING.md).
Caught a mistake or want to contribute to the documentation? [Edit this page on Github](https://github.com/tabler/tabler-icons/blob/main/packages/icons-react-native/README.md)
Caught a mistake or want to contribute to the documentation? [Edit this page on GitHub](https://github.com/tabler/tabler-icons/blob/main/packages/icons-react-native/README.md)
## License
Tabler Icons is licensed under the [MIT License](https://github.com/tabler/tabler-icons/blob/master/LICENSE).
Tabler Icons is licensed under the [MIT License](https://github.com/tabler/tabler-icons/blob/main/LICENSE).
## Sponsor Tabler

8
packages/icons-react/README.md

@ -14,7 +14,7 @@ Implementation of the Tabler Icons library for React applications.
<p align="center">
<a href="https://github.com/tabler/tabler-icons/releases"><img src="https://img.shields.io/npm/v/@tabler/icons" alt="Latest Release"></a>
<a href="https://github.com/tabler/tabler-icons/blob/master/LICENSE"><img src="https://img.shields.io/npm/l/@tabler/icons.svg" alt="License"></a>
<a href="https://github.com/tabler/tabler-icons/blob/main/LICENSE"><img src="https://img.shields.io/npm/l/@tabler/icons.svg" alt="License"></a>
</p>
## Sponsors
@ -43,7 +43,7 @@ or
pnpm install @tabler/icons-react
```
or just [download from Github](https://github.com/tabler/tabler-icons/releases).
or just [download from GitHub](https://github.com/tabler/tabler-icons/releases).
## How to use
@ -77,11 +77,11 @@ You can pass additional props to adjust the icon.
For more info on how to contribute please see the [contribution guidelines](https://github.com/tabler/tabler-icons/blob/main/CONTRIBUTING.md).
Caught a mistake or want to contribute to the documentation? [Edit this page on Github](https://github.com/tabler/tabler-icons/blob/main/packages/icons-react/README.md)
Caught a mistake or want to contribute to the documentation? [Edit this page on GitHub](https://github.com/tabler/tabler-icons/blob/main/packages/icons-react/README.md)
## License
Tabler Icons is licensed under the [MIT License](https://github.com/tabler/tabler-icons/blob/master/LICENSE).
Tabler Icons is licensed under the [MIT License](https://github.com/tabler/tabler-icons/blob/main/LICENSE).
## Sponsor Tabler

8
packages/icons-solidjs/README.md

@ -14,7 +14,7 @@ Implementation of the Tabler Icons library for SolidJS applications.
<p align="center">
<a href="https://github.com/tabler/tabler-icons/releases"><img src="https://img.shields.io/npm/v/@tabler/icons" alt="Latest Release"></a>
<a href="https://github.com/tabler/tabler-icons/blob/master/LICENSE"><img src="https://img.shields.io/npm/l/@tabler/icons.svg" alt="License"></a>
<a href="https://github.com/tabler/tabler-icons/blob/main/LICENSE"><img src="https://img.shields.io/npm/l/@tabler/icons.svg" alt="License"></a>
</p>
## Sponsors
@ -43,7 +43,7 @@ or
pnpm install @tabler/icons-solidjs
```
or just [download from Github](https://github.com/tabler/tabler-icons/releases).
or just [download from GitHub](https://github.com/tabler/tabler-icons/releases).
## How to use
@ -77,11 +77,11 @@ You can pass additional props to adjust the icon.
For more info on how to contribute please see the [contribution guidelines](https://github.com/tabler/tabler-icons/blob/main/CONTRIBUTING.md).
Caught a mistake or want to contribute to the documentation? [Edit this page on Github](https://github.com/tabler/tabler-icons/blob/main/packages/icons-solidjs/README.md)
Caught a mistake or want to contribute to the documentation? [Edit this page on GitHub](https://github.com/tabler/tabler-icons/blob/main/packages/icons-solidjs/README.md)
## License
Tabler Icons is licensed under the [MIT License](https://github.com/tabler/tabler-icons/blob/master/LICENSE).
Tabler Icons is licensed under the [MIT License](https://github.com/tabler/tabler-icons/blob/main/LICENSE).
## Sponsor Tabler

8
packages/icons-sprite/README.md

@ -14,7 +14,7 @@
<p align="center">
<a href="https://github.com/tabler/tabler-icons/releases"><img src="https://img.shields.io/npm/v/@tabler/icons-sprite" alt="Latest Release"></a>
<a href="https://github.com/tabler/tabler-icons/blob/master/LICENSE"><img src="https://img.shields.io/npm/l/@tabler/icons-sprite.svg" alt="License"></a>
<a href="https://github.com/tabler/tabler-icons/blob/main/LICENSE"><img src="https://img.shields.io/npm/l/@tabler/icons-sprite.svg" alt="License"></a>
</p>
## Sponsors
@ -43,7 +43,7 @@ or
pnpm install @tabler/icons-sprite
```
or just [download from Github](https://github.com/tabler/tabler-icons/releases).
or just [download from GitHub](https://github.com/tabler/tabler-icons/releases).
## Usage
@ -59,11 +59,11 @@ Add an icon to be displayed on your page with the following markup (`activity` i
For more info on how to contribute please see the [contribution guidelines](https://github.com/tabler/tabler-icons/blob/main/CONTRIBUTING.md).
Caught a mistake or want to contribute to the documentation? [Edit this page on Github](https://github.com/tabler/tabler-icons/blob/main/packages/icons/README.md)
Caught a mistake or want to contribute to the documentation? [Edit this page on GitHub](https://github.com/tabler/tabler-icons/blob/main/packages/icons/README.md)
## License
Tabler Icons is licensed under the [MIT License](https://github.com/tabler/tabler-icons/blob/master/LICENSE).
Tabler Icons is licensed under the [MIT License](https://github.com/tabler/tabler-icons/blob/main/LICENSE).
## Sponsor Tabler

6
packages/icons-svelte-runes/README.md

@ -14,7 +14,7 @@ Implementation of the Tabler Icons library for Svelte 5+ using the new runes rea
<p align="center">
<a href="https://github.com/tabler/tabler-icons/releases"><img src="https://img.shields.io/npm/v/@tabler/icons-svelte-runes" alt="Latest Release"></a>
<a href="https://github.com/tabler/tabler-icons/blob/master/LICENSE"><img src="https://img.shields.io/npm/l/@tabler/icons.svg" alt="License"></a>
<a href="https://github.com/tabler/tabler-icons/blob/main/LICENSE"><img src="https://img.shields.io/npm/l/@tabler/icons.svg" alt="License"></a>
</p>
## Why This Package?
@ -196,11 +196,11 @@ Internally, this package uses Svelte 5's new features:
For more info on how to contribute please see the [contribution guidelines](https://github.com/tabler/tabler-icons/blob/main/CONTRIBUTING.md).
Caught a mistake or want to contribute to the documentation? [Edit this page on Github](https://github.com/tabler/tabler-icons/blob/main/packages/icons-svelte-runes/README.md)
Caught a mistake or want to contribute to the documentation? [Edit this page on GitHub](https://github.com/tabler/tabler-icons/blob/main/packages/icons-svelte-runes/README.md)
## License
Tabler Icons is licensed under the [MIT License](https://github.com/tabler/tabler-icons/blob/master/LICENSE).
Tabler Icons is licensed under the [MIT License](https://github.com/tabler/tabler-icons/blob/main/LICENSE).
## Sponsor Tabler

8
packages/icons-svelte/README.md

@ -14,7 +14,7 @@ Implementation of the Tabler Icons library for Svelte applications.
<p align="center">
<a href="https://github.com/tabler/tabler-icons/releases"><img src="https://img.shields.io/npm/v/@tabler/icons" alt="Latest Release"></a>
<a href="https://github.com/tabler/tabler-icons/blob/master/LICENSE"><img src="https://img.shields.io/npm/l/@tabler/icons.svg" alt="License"></a>
<a href="https://github.com/tabler/tabler-icons/blob/main/LICENSE"><img src="https://img.shields.io/npm/l/@tabler/icons.svg" alt="License"></a>
</p>
## Sponsors
@ -43,7 +43,7 @@ or
pnpm install @tabler/icons-svelte
```
or just [download from Github](https://github.com/tabler/tabler-icons/releases).
or just [download from GitHub](https://github.com/tabler/tabler-icons/releases).
## How to use
@ -78,11 +78,11 @@ You can pass additional props to adjust the icon.
For more info on how to contribute please see the [contribution guidelines](https://github.com/tabler/tabler-icons/blob/main/CONTRIBUTING.md).
Caught a mistake or want to contribute to the documentation? [Edit this page on Github](https://github.com/tabler/tabler-icons/blob/main/packages/icons-svelte/README.md)
Caught a mistake or want to contribute to the documentation? [Edit this page on GitHub](https://github.com/tabler/tabler-icons/blob/main/packages/icons-svelte/README.md)
## License
Tabler Icons is licensed under the [MIT License](https://github.com/tabler/tabler-icons/blob/master/LICENSE).
Tabler Icons is licensed under the [MIT License](https://github.com/tabler/tabler-icons/blob/main/LICENSE).
## Sponsor Tabler

8
packages/icons-vue/README.md

@ -14,7 +14,7 @@
<p align="center">
<a href="https://github.com/tabler/tabler-icons/releases"><img src="https://img.shields.io/npm/v/@tabler/icons" alt="Latest Release"></a>
<a href="https://github.com/tabler/tabler-icons/blob/master/LICENSE"><img src="https://img.shields.io/npm/l/@tabler/icons.svg" alt="License"></a>
<a href="https://github.com/tabler/tabler-icons/blob/main/LICENSE"><img src="https://img.shields.io/npm/l/@tabler/icons.svg" alt="License"></a>
</p>
## Sponsors
@ -43,7 +43,7 @@ or
pnpm install @tabler/icons-vue
```
or just [download from Github](https://github.com/tabler/tabler-icons/releases).
or just [download from GitHub](https://github.com/tabler/tabler-icons/releases).
## How to use
@ -108,11 +108,11 @@ You can pass additional attribute `stroke-width="1"` alongside the props to adju
For more info on how to contribute please see the [contribution guidelines](https://github.com/tabler/tabler-icons/blob/main/CONTRIBUTING.md).
Caught a mistake or want to contribute to the documentation? [Edit this page on Github](https://github.com/tabler/tabler-icons/blob/main/packages/icons-vue/README.md)
Caught a mistake or want to contribute to the documentation? [Edit this page on GitHub](https://github.com/tabler/tabler-icons/blob/main/packages/icons-vue/README.md)
## License
Tabler Icons is licensed under the [MIT License](https://github.com/tabler/tabler-icons/blob/master/LICENSE).
Tabler Icons is licensed under the [MIT License](https://github.com/tabler/tabler-icons/blob/main/LICENSE).
## Sponsor Tabler

2
packages/icons-webfont/.build/iconfont.scss

@ -1,7 +1,7 @@
@charset "UTF-8";
/*!
* Tabler Icons <%= it.v %> by tabler - https://tabler.io
* License - https://github.com/tabler/tabler-icons/blob/master/LICENSE
* License - https://github.com/tabler/tabler-icons/blob/main/LICENSE
*/
@use "sass:string";

8
packages/icons-webfont/README.md

@ -14,7 +14,7 @@
<p align="center">
<a href="https://github.com/tabler/tabler-icons/releases"><img src="https://img.shields.io/npm/v/@tabler/icons" alt="Latest Release"></a>
<a href="https://github.com/tabler/tabler-icons/blob/master/LICENSE"><img src="https://img.shields.io/npm/l/@tabler/icons.svg" alt="License"></a>
<a href="https://github.com/tabler/tabler-icons/blob/main/LICENSE"><img src="https://img.shields.io/npm/l/@tabler/icons.svg" alt="License"></a>
</p>
## Sponsors
@ -43,7 +43,7 @@ or
pnpm install @tabler/icons-webfont
```
or just [download from Github](https://github.com/tabler/tabler-icons/releases).
or just [download from GitHub](https://github.com/tabler/tabler-icons/releases).
### CDN
@ -73,11 +73,11 @@ content: $ti-icon-brand-tabler;
For more info on how to contribute please see the [contribution guidelines](https://github.com/tabler/tabler-icons/blob/main/CONTRIBUTING.md).
Caught a mistake or want to contribute to the documentation? [Edit this page on Github](https://github.com/tabler/tabler-icons/blob/main/packages/icons-vue/README.md)
Caught a mistake or want to contribute to the documentation? [Edit this page on GitHub](https://github.com/tabler/tabler-icons/blob/main/packages/icons-vue/README.md)
## License
Tabler Icons is licensed under the [MIT License](https://github.com/tabler/tabler-icons/blob/master/LICENSE).
Tabler Icons is licensed under the [MIT License](https://github.com/tabler/tabler-icons/blob/main/LICENSE).
## Sponsor Tabler

8
packages/icons/README.md

@ -14,7 +14,7 @@
<p align="center">
<a href="https://github.com/tabler/tabler-icons/releases"><img src="https://img.shields.io/npm/v/@tabler/icons" alt="Latest Release"></a>
<a href="https://github.com/tabler/tabler-icons/blob/master/LICENSE"><img src="https://img.shields.io/npm/l/@tabler/icons.svg" alt="License"></a>
<a href="https://github.com/tabler/tabler-icons/blob/main/LICENSE"><img src="https://img.shields.io/npm/l/@tabler/icons.svg" alt="License"></a>
</p>
## Sponsors
@ -43,7 +43,7 @@ or
pnpm install @tabler/icons
```
or just [download from Github](https://github.com/tabler/tabler-icons/releases).
or just [download from GitHub](https://github.com/tabler/tabler-icons/releases).
## Usage
@ -96,11 +96,11 @@ Thanks to that, you can change the size, color and the `stroke-width` of the ico
For more info on how to contribute please see the [contribution guidelines](https://github.com/tabler/tabler-icons/blob/main/CONTRIBUTING.md).
Caught a mistake or want to contribute to the documentation? [Edit this page on Github](https://github.com/tabler/tabler-icons/blob/main/packages/icons/README.md)
Caught a mistake or want to contribute to the documentation? [Edit this page on GitHub](https://github.com/tabler/tabler-icons/blob/main/packages/icons/README.md)
## License
Tabler Icons is licensed under the [MIT License](https://github.com/tabler/tabler-icons/blob/master/LICENSE).
Tabler Icons is licensed under the [MIT License](https://github.com/tabler/tabler-icons/blob/main/LICENSE).
## Sponsor Tabler

2655
pnpm-lock.yaml

File diff suppressed because it is too large

1
pnpm-workspace.yaml

@ -3,6 +3,7 @@ packages:
- "test/*"
catalog:
typescript: 5.9.3
astro: ^7.0.0
vite: ^7.3.0
vitest: ^4.0.16
jest-serializer-html: ^7.1.0

3
test/test-angular/src/app/app.component.html

@ -46,6 +46,9 @@
[svgAttributes]="{ 'aria-label': 'Home', role: 'button' }"
/>
</button>
<button (click)="toggleColor()" style="cursor: pointer" type="button" aria-label="Change color">
<tabler-icon [icon]="iconHeartFilled" [size]="32" [color]="currentColor()" />
</button>
</div>
</div>

11
test/test-angular/src/app/app.component.ts

@ -1,12 +1,15 @@
import { ChangeDetectionStrategy, Component, signal } from '@angular/core';
import {
IconAd,
IconHeartFilled,
IconHome,
IconHomeOff,
TablerIcon,
TablerIconComponent
} from '@tabler/icons-angular';
const colors = ['#e64980', '#4dabf7', '#51cf66', '#ffd43b', '#845ef7'];
@Component({
selector: 'app-root',
imports: [TablerIconComponent],
@ -19,10 +22,13 @@ export class AppComponent {
iconAd = IconAd;
iconHome = IconHome;
iconHomeOff = IconHomeOff;
iconHeartFilled = IconHeartFilled;
toggledIcon = signal<TablerIcon>(IconHome);
mySize = signal(56);
stroke = signal(1);
colorIndex = signal(0);
currentColor = signal(colors[0]);
toggleIcon() {
this.toggledIcon.update(value => value === IconHome ? IconHomeOff : IconHome);
@ -35,4 +41,9 @@ export class AppComponent {
toggleActive() {
this.active.update(value => !value);
}
toggleColor() {
this.colorIndex.update(value => (value + 1) % colors.length);
this.currentColor.set(colors[this.colorIndex()]);
}
}

3
test/test-astro/.gitignore

@ -0,0 +1,3 @@
dist
.astro
.output

4
test/test-astro/astro.config.mjs

@ -0,0 +1,4 @@
import { defineConfig } from 'astro/config';
// https://astro.build/config
export default defineConfig({});

18
test/test-astro/package.json

@ -0,0 +1,18 @@
{
"name": "test-astro",
"private": true,
"version": "3.37.1",
"type": "module",
"scripts": {
"dev": "astro dev",
"build": "astro build",
"preview": "astro preview",
"clean": "rm -rf dist .astro"
},
"dependencies": {
"@tabler/icons-astro": "workspace:*",
"astro": "catalog:"
},
"peerDependencies": {},
"optionalDependencies": {}
}

45
test/test-astro/src/pages/index.astro

@ -0,0 +1,45 @@
---
import { IconAd, IconAdOff, IconAdFilled, IconHeartFilled } from '@tabler/icons-astro';
import '../styles/index.css';
import '../styles/app.css';
---
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Tabler Icons for Astro — test</title>
</head>
<body>
<div class="App">
<button type="button" class="toggle" aria-label="Toggle icon" aria-pressed="false">
<IconAd size={48} class="icon-default" />
<IconAdOff size={48} class="icon-active" />
</button>
<IconAd size={48} stroke={1} />
<IconAdOff size={48} stroke={1.5} />
<IconAdFilled size={48} stroke={2} />
<button type="button" class="color-toggle" aria-label="Change color" title="Change color">
<IconHeartFilled size={48} />
</button>
</div>
<script>
const toggle = document.querySelector('.toggle');
toggle?.addEventListener('click', () => {
const active = toggle.classList.toggle('is-active');
toggle.setAttribute('aria-pressed', String(active));
});
// Colored icon — cycle its color on click (icon uses `currentColor`).
const colors = ['#e64980', '#4dabf7', '#51cf66', '#ffd43b', '#845ef7'];
const colorToggle = document.querySelector('.color-toggle');
let colorIndex = 0;
colorToggle?.addEventListener('click', () => {
colorIndex = (colorIndex + 1) % colors.length;
colorToggle.style.color = colors[colorIndex];
});
</script>
</body>
</html>

31
test/test-astro/src/styles/app.css

@ -0,0 +1,31 @@
.App {
max-width: 1280px;
margin: 0 auto;
padding: 2rem;
display: flex;
gap: 1rem;
align-items: center;
justify-content: center;
}
.toggle,
.color-toggle {
display: inline-flex;
padding: 0.6em;
}
.color-toggle {
color: #e64980;
transition: color 0.2s;
}
/* astro renders both toggle icons and swaps via CSS; harmless elsewhere */
.toggle .icon-active {
display: none;
}
.toggle.is-active .icon-default {
display: none;
}
.toggle.is-active .icon-active {
display: inline-flex;
}

71
test/test-astro/src/styles/index.css

@ -0,0 +1,71 @@
:root {
font-family: Inter, Avenir, Helvetica, Arial, sans-serif;
font-size: 16px;
line-height: 24px;
font-weight: 400;
color-scheme: light dark;
color: rgba(255, 255, 255, 0.87);
background-color: #242424;
font-synthesis: none;
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
-webkit-text-size-adjust: 100%;
}
a {
font-weight: 500;
color: #646cff;
text-decoration: inherit;
}
a:hover {
color: #535bf2;
}
body {
margin: 0;
display: flex;
place-items: center;
justify-content: center;
min-width: 320px;
min-height: 100vh;
}
h1 {
font-size: 3.2em;
line-height: 1.1;
}
button {
border-radius: 8px;
border: 1px solid transparent;
padding: 0.6em 1.2em;
font-size: 1em;
font-weight: 500;
font-family: inherit;
background-color: #1a1a1a;
cursor: pointer;
transition: border-color 0.25s;
}
button:hover {
border-color: #646cff;
}
button:focus,
button:focus-visible {
outline: 4px auto -webkit-focus-ring-color;
}
@media (prefers-color-scheme: light) {
:root {
color: #213547;
background-color: #ffffff;
}
a:hover {
color: #747bff;
}
button {
background-color: #f9f9f9;
}
}

3
test/test-astro/tsconfig.json

@ -0,0 +1,3 @@
{
"extends": "astro/tsconfigs/base"
}

36
test/test-preact/src/app.css

@ -1,25 +1,31 @@
#app {
.App {
max-width: 1280px;
margin: 0 auto;
padding: 2rem;
text-align: center;
display: flex;
gap: 1rem;
align-items: center;
justify-content: center;
}
.logo {
height: 6em;
padding: 1.5em;
}
.logo:hover {
filter: drop-shadow(0 0 2em #646cffaa);
}
.logo.preact:hover {
filter: drop-shadow(0 0 2em #673ab8aa);
.toggle,
.color-toggle {
display: inline-flex;
padding: 0.6em;
}
.card {
padding: 2em;
.color-toggle {
color: #e64980;
transition: color 0.2s;
}
.read-the-docs {
color: #888;
/* astro renders both toggle icons and swaps via CSS; harmless elsewhere */
.toggle .icon-active {
display: none;
}
.toggle.is-active .icon-default {
display: none;
}
.toggle.is-active .icon-active {
display: inline-flex;
}

11
test/test-preact/src/app.tsx

@ -1,20 +1,25 @@
import { useState } from 'preact/hooks'
import './app.css'
import { IconAd, IconAdOff, IconAdFilled } from '@tabler/icons-preact';
import { IconAd, IconAdOff, IconAdFilled, IconHeartFilled } from '@tabler/icons-preact';
const colors = ['#e64980', '#4dabf7', '#51cf66', '#ffd43b', '#845ef7']
export function App() {
const [active, setActive] = useState(false)
const [colorIndex, setColorIndex] = useState(0)
return (
<div className="App">
<a onClick={() => setActive(!active)}>
<button type="button" className="toggle" aria-label="Toggle icon" aria-pressed={active} onClick={() => setActive(!active)}>
{active ? <IconAdOff size={48} /> : <IconAd size={48} />}
</a>
</button>
<IconAd size={48} stroke={1} />
<IconAdOff size={48} stroke={1.5} />
<IconAdFilled size={48} stroke={2} />
<button type="button" className="color-toggle" aria-label="Change color" onClick={() => setColorIndex((colorIndex + 1) % colors.length)}>
<IconHeartFilled size={48} color={colors[colorIndex]} />
</button>
</div>
);
}

1
test/test-preact/src/index.css

@ -28,6 +28,7 @@ body {
margin: 0;
display: flex;
place-items: center;
justify-content: center;
min-width: 320px;
min-height: 100vh;
}

28
test/test-react-native/src/App.css

@ -1,7 +1,31 @@
#root {
.App {
max-width: 1280px;
margin: 0 auto;
padding: 2rem;
text-align: center;
display: flex;
gap: 1rem;
align-items: center;
justify-content: center;
}
.toggle,
.color-toggle {
display: inline-flex;
padding: 0.6em;
}
.color-toggle {
color: #e64980;
transition: color 0.2s;
}
/* astro renders both toggle icons and swaps via CSS; harmless elsewhere */
.toggle .icon-active {
display: none;
}
.toggle.is-active .icon-default {
display: none;
}
.toggle.is-active .icon-active {
display: inline-flex;
}

12
test/test-react-native/src/App.tsx

@ -1,18 +1,24 @@
import { useState } from 'react'
import './App.css'
import { IconAd, IconAdOff, IconAdFilled } from '@tabler/icons-react-native';
import { IconAd, IconAdOff, IconAdFilled, IconHeartFilled } from '@tabler/icons-react-native';
const colors = ['#e64980', '#4dabf7', '#51cf66', '#ffd43b', '#845ef7']
function App() {
const [active, setActive] = useState(false)
const [colorIndex, setColorIndex] = useState(0)
return (
<div className="App">
<a onClick={() => setActive(!active)}>
<button type="button" className="toggle" aria-label="Toggle icon" aria-pressed={active} onClick={() => setActive(!active)}>
{active ? <IconAdOff size={48} /> : <IconAd size={48} />}
</a>
</button>
<IconAd size={48} strokeWidth={1} />
<IconAdOff size={48} strokeWidth={1.5} />
<IconAdFilled size={48} strokeWidth={2} />
<button type="button" className="color-toggle" aria-label="Change color" onClick={() => setColorIndex((colorIndex + 1) % colors.length)}>
<IconHeartFilled size={48} color={colors[colorIndex]} />
</button>
</div>
);
}

1
test/test-react-native/src/index.css

@ -28,6 +28,7 @@ body {
margin: 0;
display: flex;
place-items: center;
justify-content: center;
min-width: 320px;
min-height: 100vh;
}

28
test/test-react/src/App.css

@ -1,7 +1,31 @@
#root {
.App {
max-width: 1280px;
margin: 0 auto;
padding: 2rem;
text-align: center;
display: flex;
gap: 1rem;
align-items: center;
justify-content: center;
}
.toggle,
.color-toggle {
display: inline-flex;
padding: 0.6em;
}
.color-toggle {
color: #e64980;
transition: color 0.2s;
}
/* astro renders both toggle icons and swaps via CSS; harmless elsewhere */
.toggle .icon-active {
display: none;
}
.toggle.is-active .icon-default {
display: none;
}
.toggle.is-active .icon-active {
display: inline-flex;
}

12
test/test-react/src/App.tsx

@ -1,18 +1,24 @@
import { useState } from 'react'
import './App.css'
import { IconAd, IconAdOff, IconAdFilled } from '@tabler/icons-react';
import { IconAd, IconAdOff, IconAdFilled, IconHeartFilled } from '@tabler/icons-react';
const colors = ['#e64980', '#4dabf7', '#51cf66', '#ffd43b', '#845ef7']
function App() {
const [active, setActive] = useState(false)
const [colorIndex, setColorIndex] = useState(0)
return (
<div className="App">
<a onClick={() => setActive(!active)}>
<button type="button" className="toggle" aria-label="Toggle icon" aria-pressed={active} onClick={() => setActive(!active)}>
{active ? <IconAdOff size={48} /> : <IconAd size={48} />}
</a>
</button>
<IconAd size={48} stroke={1} />
<IconAdOff size={48} stroke={1.5} />
<IconAdFilled size={48} stroke={2} />
<button type="button" className="color-toggle" aria-label="Change color" onClick={() => setColorIndex((colorIndex + 1) % colors.length)}>
<IconHeartFilled size={48} color={colors[colorIndex]} />
</button>
</div>
);
}

1
test/test-react/src/index.css

@ -28,6 +28,7 @@ body {
margin: 0;
display: flex;
place-items: center;
justify-content: center;
min-width: 320px;
min-height: 100vh;
}

14
test/test-svelte/src/App.svelte

@ -1,12 +1,15 @@
<script lang="ts">
import IconAd from "@tabler/icons-svelte/icons/ad";
import IconAdOff from "@tabler/icons-svelte/icons/ad-off";
import { IconAdFilled } from "@tabler/icons-svelte";
import { IconAdFilled, IconHeartFilled } from "@tabler/icons-svelte";
let active = false;
const colors = ['#e64980', '#4dabf7', '#51cf66', '#ffd43b', '#845ef7'];
let colorIndex = 0;
</script>
<main>
<button on:click={() => (active = !active)}>
<div class="App">
<button type="button" class="toggle" aria-label="Toggle icon" aria-pressed={active} on:click={() => (active = !active)}>
{#if active}
<IconAdOff size={48} />
{:else}
@ -16,4 +19,7 @@
<IconAd size={48} stroke={1} />
<IconAdOff size={48} stroke={1.5} />
<IconAdFilled size={48} stroke={2} />
</main>
<button type="button" class="color-toggle" aria-label="Change color" on:click={() => (colorIndex = (colorIndex + 1) % colors.length)}>
<IconHeartFilled size={48} color={colors[colorIndex]} />
</button>
</div>

43
test/test-svelte/src/app.css

@ -28,6 +28,7 @@ body {
margin: 0;
display: flex;
place-items: center;
justify-content: center;
min-width: 320px;
min-height: 100vh;
}
@ -37,17 +38,6 @@ h1 {
line-height: 1.1;
}
.card {
padding: 2em;
}
#app {
max-width: 1280px;
margin: 0 auto;
padding: 2rem;
text-align: center;
}
button {
border-radius: 8px;
border: 1px solid transparent;
@ -79,3 +69,34 @@ button:focus-visible {
background-color: #f9f9f9;
}
}
.App {
max-width: 1280px;
margin: 0 auto;
padding: 2rem;
display: flex;
gap: 1rem;
align-items: center;
justify-content: center;
}
.toggle,
.color-toggle {
display: inline-flex;
padding: 0.6em;
}
.color-toggle {
color: #e64980;
transition: color 0.2s;
}
/* astro renders both toggle icons and swaps via CSS; harmless elsewhere */
.toggle .icon-active {
display: none;
}
.toggle.is-active .icon-default {
display: none;
}
.toggle.is-active .icon-active {
display: inline-flex;
}

24
test/test-vue/src/App.vue

@ -1,17 +1,25 @@
<script setup lang="ts">
import { ref } from "vue"
import { IconAd, IconAdOff, IconAdFilled } from '@tabler/icons-vue'
import { IconAd, IconAdOff, IconAdFilled, IconHeartFilled } from '@tabler/icons-vue'
const active = ref(false)
const colors = ['#e64980', '#4dabf7', '#51cf66', '#ffd43b', '#845ef7']
const colorIndex = ref(0)
</script>
<template>
<a @click="active = !active">
<IconAdOff v-if="active" size="48" />
<IconAd v-else size="48" />
</a>
<IconAd size="48" stroke="1" />
<IconAdOff size="48" stroke="1.5" />
<IconAdFilled size="48" stroke="2" />
<div class="App">
<button type="button" class="toggle" aria-label="Toggle icon" :aria-pressed="active" @click="active = !active">
<IconAdOff v-if="active" size="48" />
<IconAd v-else size="48" />
</button>
<IconAd size="48" stroke="1" />
<IconAdOff size="48" stroke="1.5" />
<IconAdFilled size="48" stroke="2" />
<button type="button" class="color-toggle" aria-label="Change color" @click="colorIndex = (colorIndex + 1) % colors.length">
<IconHeartFilled size="48" :color="colors[colorIndex]" />
</button>
</div>
</template>

43
test/test-vue/src/style.css

@ -28,6 +28,7 @@ body {
margin: 0;
display: flex;
place-items: center;
justify-content: center;
min-width: 320px;
min-height: 100vh;
}
@ -56,17 +57,6 @@ button:focus-visible {
outline: 4px auto -webkit-focus-ring-color;
}
.card {
padding: 2em;
}
#app {
max-width: 1280px;
margin: 0 auto;
padding: 2rem;
text-align: center;
}
@media (prefers-color-scheme: light) {
:root {
color: #213547;
@ -79,3 +69,34 @@ button:focus-visible {
background-color: #f9f9f9;
}
}
.App {
max-width: 1280px;
margin: 0 auto;
padding: 2rem;
display: flex;
gap: 1rem;
align-items: center;
justify-content: center;
}
.toggle,
.color-toggle {
display: inline-flex;
padding: 0.6em;
}
.color-toggle {
color: #e64980;
transition: color 0.2s;
}
/* astro renders both toggle icons and swaps via CSS; harmless elsewhere */
.toggle .icon-active {
display: none;
}
.toggle.is-active .icon-default {
display: none;
}
.toggle.is-active .icon-active {
display: inline-flex;
}

Loading…
Cancel
Save