0.7.1 • Published 2 months ago

p44 v0.7.1

Weekly downloads
-
License
MIT
Repository
github
Last release
2 months ago

Made to be Plundered Latest version Release date

P44

Svelte package exposing SVG icons crafted using P45.

Icons will be added, removed, and modified before the first version so keep that in mind. Apply custom styles via CSS selectors.

Requires Svelte version 4.

Usage

<script>
	import { Diamond, Star } from 'p44'
</script>

// Accepts <svg> HTML element attributes.
<Diamond width="100" height="100" class="classy" />

// Some icons accept optional props to refine their shape.
<Star leg="6" indent="0.5" class="classy2" />

<style>
	:global(.classy) {
		overflow: hidden;
		border: 1px solid goldenrod;
	}

	:global(.classy2) {
		overflow: hidden;
		border: 1px solid goldenrod;
		width: 100px;
		height: 100px;
	}
</style>

Keywords

A separate file containing icon component names mapped to their keywords is available:

import docs from 'p44/docs'

// To get icon component names.
console.log(Object.keys(docs))
/*
[
  "BrokenTriangle"
  "Chopsticks",
  "Circle",
  "Clock",
  ...
]
*/

// All metadata.
console.log(docs)
/*
{
  "BrokenTriangle": {
    "name": "Broken Triangle",
    "alt": "A simple triangle broken at the top.",
    "keywords": [
      "broken",
      "triangle",
      "musical instrument"
    ]
  },
  "Chopsticks": {
    "name": "Chopsticks",
    "alt": "Two lines crossing to form an image of chopsticks.",
    "keywords": [
      "chopsticks",
      "crossing lines"
    ]
  },
  ...
}
*/

Components

+++(Do not remove: component docs are inserted here!!)+++

0.7.1

2 months ago

0.7.0

2 months ago

0.6.0

4 months ago

0.3.0

4 months ago

0.5.0

4 months ago

0.4.0

4 months ago

0.2.0

5 months ago

0.1.2

5 months ago

0.1.1

5 months ago

0.1.0

5 months ago