npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

svelte-shopify-polaris-icons

v0.0.18

Published

Svelte Shopify Polaris Icons

Downloads

23

Readme

Svelte Shopify Polaris Icons

image

Original icons in Shopify docs. Inspired by Flowbite Svelte Icons.

Installing

If you're seeing this, you've probably already done this step. Congrats!

pnpm i -D svelte-shopify-polaris-icons

Usage

In a svelte file:

<script>
	import { AbandonedCartFilledMajor } from 'svelte-shopify-polaris-icons';
</script>

<AbandonedCartFilledMajor />

Props

Outline

  • size: 'xs' | 'sm' | 'md' | 'lg' | 'xl' = 'md';
  • role: string = 'img';
  • strokeLinecap: 'round' | 'inherit' | 'butt' | 'square' | null | undefined = 'round';
  • strokeLinejoin: 'round' | 'inherit' | 'miter' | 'bevel' | null | undefined = 'round';
  • strokeWidth = '2';
  • ariaLabel = 'icon file name';

Solid

  • size: 'xs' | 'sm' | 'md' | 'lg' | 'xl' = 'md';
  • role: string = 'img';
  • ariaLabel = 'icon file name';

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.

Size

The following table provides details about the available sizes for icons:

| Size | CSS Classes | | ---- | ----------- | | xs | 'w-3 h-3' | | sm | 'w-4 h-4' | | md | 'w-5 h-6' | | lg | 'w-6 h-6' | | xl | 'w-8 h-8' |

To change the size of an icon, use the size prop and specify the desired size. For example:

<AbandonedCartFilledMajor size="md" />

If you want to override the preconfigured size, you can add a custom size using Tailwind CSS by including the desired classes in the class prop. For example:

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

Color

You can apply Tailwind CSS color directly to the icon component or its parent tag using the class prop.

<AbandonedCartFilledMajor size="md" class="text-red-700 dark:text-green-300 inline m-1" />

<div class="text-red-700 dark:text-green-300 inline m-1">
	<AbandonedCartFilledMajor size="md" />
</div>

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.

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

aria-label

All icons have aria-label. For example BxAbacus has aria-label="bx abacus". Use ariaLabel prop to modify the aria-label value.

<AbandonedCartFilledMajor ariaLabel="address card solid" />

Unfocusable icon

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

<AbandonedCartFilledMajor tabindex="-1" />

Using svelte:component

<script>
	import { AbandonedCartFilledMajor } from 'svelte-shopify-polaris-icons';
</script>

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

Using onMount

<script>
	import { AbandonedCartFilledMajor } from 'svelte-shopify-polaris-icons';
	import { onMount } from 'svelte';
	const props = {
		size: '50',
		color: '#ff0000'
	};
	onMount(() => {
		const icon = new AbandonedCartFilledMajor({ target: document.body, props });
	});
</script>

👍 Contribute

If you want to say thank you and/or support the active development this project:

  1. Add a GitHub Star to the project.
  2. Write a review or tutorial on Medium, Dev.to or personal blog.
  3. Support the project by donating a cup of coffee.

☕ Supporters

If you want to support Personal Portfolio, you can ☕ buy a coffee here

⚠️ Copyright and license

Code and documentation copyright 2020-2030 the Authors and Code released under the MIT License. Docs released under Creative Commons.