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

@naorah/minipills

v0.0.4

Published

Create minipills with svelte !

Downloads

29

Readme

Minipills

@naorah/minipills is a customizable Svelte component for generating pill-style UI elements. This component allows you to create pills with various texts, colors, and sizes, and can include a logo if desired.

Installation

To install the package, use npm :

npm install @naorah/minipills

Usage

To use the Minipills component in your Svelte application, import it and configure it with the available props.

Basic Usage

<script>
  import Minipills from '@naorah/minipills';

  let premade = "minipills";
</script>

<Minipills premade={premade} />

Utils

Some links to help you !

To REPL

To Website

To Discord

To Github

Customization

The Minipills component can be customized using the following props:

  • firstText (required): The text for the first pill. If it's a double pill, this text appears on the left side.
  • firstTextColor (optional): The color of the first text. Use a hexadecimal color code without the #. Default is ffffff.
  • firstBgColor (optional): The background color of the first pill. Use a hexadecimal color code without the #. Default is 212121.
  • secondText (optional): The text for the second pill.
  • secondTextColor (optional): The color of the second text. Use a hexadecimal color code without the #. Default is ffffff.
  • secondBgColor (optional): The background color of the second pill. Use a hexadecimal color code without the #. Default is a12613.
  • thirdText (optional): The text for the third pill.
  • thirdTextColor (optional): The color of the third text. Use a hexadecimal color code without the #. Default is ffffff.
  • thirdBgColor (optional): The background color of the third pill. Use a hexadecimal color code without the #. Default is 212121.
  • shadows (optional): Enable shadows for the logo and pill text. Set this to true to enable shadows.
  • logo (optional): A logo to appear in the first part of the pill. Use the simplified text found on the logo page.
  • logoColor (optional): The color of the logo. Use a hexadecimal color code without the #. Default is ffffff.
  • scale (optional): The size of the pill. The maximum scale is 10. Default is 1.0.
  • premade (required): Build a premade pill of the given brand. This parameter takes precedence over all others if provided.

Example

<script>
  import Minipills from '@naorah/minipills';

  let firstText = "Let's go";
  let firstTextColor = "ffffff";
  let firstBgColor = "212121";
  let secondText = "on a road";
  let secondTextColor = "ffffff";
  let secondBgColor = "a12613";
  let thirdText = "trip";
  let thirdTextColor = "ffffff";
  let thirdBgColor = "212121";
  let shadows = true;
  let logo = "minipills";
  let logoColor = "ffffff";
  let scale = 2.0;
  let premade = "";
</script>

<Minipills
  {firstText}
  {firstTextColor}
  {firstBgColor}
  {secondText}
  {secondTextColor}
  {secondBgColor}
  {thirdText}
  {thirdTextColor}
  {thirdBgColor}
  {shadows}
  {logo}
  {logoColor}
  {scale}
  {premade}
/>

License

This project is licensed under the CopyLeft License.