Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

svelte-bootstrap-icons

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

svelte-bootstrap-icons

Bootstrap SVG icons as Svelte components

  • 1.8.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
7.2K
increased by115.44%
Maintainers
1
Weekly downloads
 
Created
Source

svelte-bootstrap-icons

NPM

Bootstrap SVG icons as Svelte components.

Try it in the Svelte REPL.


Installation

Yarn

yarn add -D svelte-bootstrap-icons

NPM

npm i -D svelte-bootstrap-icons

pnpm

pnpm i -D svelte-bootstrap-icons

Usage

Refer to ICON_INDEX.md for a full list of supported icons.

Base import

<script>
  import {
    Alarm,
    Bank,
    CloudMoon,
    Github,
    PaintBucket,
    Wrench,
  } from "svelte-bootstrap-icons";
</script>

<Alarm />
<Bank />
<CloudMoon />
<Github />
<PaintBucket />
<Wrench />

Import the icon directly for faster compiling during development.

Note: even if using the base import method, unused imports are still tree shakeable by application bundlers like Rollup or webpack.

<script>
  import Alarm from "svelte-bootstrap-icons/lib/Alarm";
  // OR
  import Alarm from "svelte-bootstrap-icons/lib/Alarm/Alarm.svelte";
</script>

API

$$restProps are forwarded to the svg element.

Forwarded events

  • on:click
  • on:mouseover
  • on:mouseenter
  • on:mouseout
  • on:keydown

Usage with svelte:component

<script>
  import * as icons from "svelte-bootstrap-icons";
</script>

{#each Object.keys(icons) as icon}
  <div>
    <svelte:component this={icons[icon]} title={icon} />
    {icon}
  </div>
{/each}

TypeScript

Svelte version 3.31 or greater is required to use this library with TypeScript.

Changelog

Changelog

Contributing

See the contributing guidelines.

License

MIT

Keywords

FAQs

Package last updated on 08 Feb 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc