Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
carbon-icons-svelte
Advanced tools
Svelte components for icons in digital and software products using the Carbon Design System
Svelte components for icons in digital and software products using the Carbon Design System.
This library uses @carbon/icons and @carbon/icon-helpers to build Carbon Design System icons with zero dependencies.
Aligned Version: @carbon/icons@10.6.1
yarn add -D carbon-icons-svelte
# OR
npm install -D carbon-icons-svelte
Supported icon sizes include 16
, 20
, 24
and 32
.
Refer to the Carbon icon library for available icons.
<script>
import { Add16 } from 'carbon-icons-svelte';
</script>
<Add16 />
For faster compiling, import icons individually.
<script>
import Add16 from 'carbon-icons-svelte/lib/Add16';
</script>
<Add16 />
import Icon from 'carbon-icons-svelte/lib/<module-name>';
All props are optional.
Name | Value |
---|---|
aria-label | string |
aria-labelledby | string |
tabindex | string |
focusable | boolean (Default: false ) |
title | string |
class | string |
style | string |
<script>
import Add16 from 'carbon-icons-svelte/lib/Add16';
</script>
<Add16 aria-label="Add" class="custom-class" style="will-change: transform;" />
You can pass a title
as a prop or through the slot.
<Add16 title="Add" />
<!-- OR -->
<Add16>
<title>Add</title>
</Add16>
The following events can be forwarded to the icon:
on:click
on:mouseenter
on:mouseover
on:mouseleave
<script>
import Add16 from 'carbon-icons-svelte/lib/Add16';
</script>
<Add16
on:click="{() => {}}"
on:mouseenter="{() => {}}"
on:mouseover="{() => {}}"
on:mouseleave="{() => {}}"
/>
Currently, the UMD
format is not supported.
This library exports icons in the ES
(ES module) format; use a Webpack or Rollup set-up for consumption (see examples).
FAQs
Carbon Design System SVG icons as Svelte components
The npm package carbon-icons-svelte receives a total of 20,387 weekly downloads. As such, carbon-icons-svelte popularity was classified as popular.
We found that carbon-icons-svelte demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.