JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 18374
  • Score
    100M100P100Q148091F
  • License MIT

Package Exports

  • @steeze-ui/svelte-icon
  • @steeze-ui/svelte-icon/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@steeze-ui/svelte-icon) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

READ THIS FIRST

This project is still in experimental development. Expect bugs and breaking changes!

Overview

Effortless Svelte Icon Component

  • Made for SvelteKit & Vite environments
  • Usable with all official Icon Packs
  • Dynamically change theme on runtime

Installation

npm i -D @steeze-ui/svelte-icon

Usage

<script>
  //import icon component
  import {Icon} from '@steeze-ui/svelte-icon'

  //import as many icons from a Icon Pack
  import {LightningBolt} from '@steeze-ui/heroicons'
</script>

<!-- Set Icon Theme via the attribute -->
<Icon src={LightningBolt} theme='solid' class='color-gray-900'>

Documentation

Icon attributes

Attribute Default Description
src - (required) The source of a icon coming from an Icon Pack
theme default Configures to use a Icon Theme if available (otherwise use default)
size 100% Configures width and height
class - Configures width and height
* - Any html attribute that is valid (e.g aria-hidden)

Icon Packs

For all available Icon Packs visit steeze-ui/icons

Development

This repo uses pnpm. To build a new version of the package just run:

pnpm install && pnpm package