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-forge-ui

v0.5.5-alpha

Published

It's a component library for Svelte. These component designs are lightweight and flexible.

Downloads

7

Readme

[!WARNING] This library is currently in the creation phase and it is not recommended to implement it in productive environments, but we will soon release our version 1.0.0 which will be the stable version. Likewise, we appreciate that you use our lib for testing while our stable version is available..

Table of Contents

The Problem

We require a collection of simple components that have flexibility to be modified. We require this to avoid always creating several components of the same thing, avoiding duplicating code, in addition to already having different style formats for each component.

This Solution

svelte-forge-ui is a lightweight and easy-to-use solution, which seeks to give its users the different components that exist with different style formats, in addition to allowing flexibility when modifying certain parameters of the components.

[!NOTE] These collections of components below use tailwind to help with a much faster design to implement.

Installation

The component package is distributed through npm, which is included with node. You should install it as a dependencies.

npm:

npm install svelte-forge-ui

Yarn:

yarn add svelte-forge-ui

Example How to use

We import the library into the <script></script> tags and create a variable that will take the data from InputFloat.

import { InputFloat } from 'svelte-forge-ui';
let inputFloat = '';

Now let's call the <InputFloat/> component and set the required properties nameInput, labelText and valueInput.

<InputFloat
	type="text"
	className=""
	nameInput="input-float"
	labelText="Input Float"
	textSize="sm"
	rounded="none"
	colorHex={'#2980B9'}
	bind:valueInput={inputFloat}
/>

You can also use CSS variables to place your own colors. The first thing will be to create the name of your theme, by default it is called primary but you can change it with the theme property.

After choosing the name or thinking about whether to leave it as default, you will have to create the css variables in :root so that your components have colors. The format that should be used for these variables should be the name of the topic that you chose followed by a hyphen and the numbers from 100 to 900 of 100 in 100. Below we will see an example taking into account that our theme is called primary:

:root {
	--primary-100: #d0dde2;
	--primary-200: #a0bbc5;
	--primary-300: #7199a8;
	--primary-400: #41778b;
	--primary-500: #12556e;
	--primary-600: #0e4458;
	--primary-700: #0b3342;
	--primary-800: #07222c;
	--primary-900: #041116;
}

Now in the component to activate the CSS variables you must use the useCss property and the component would look like this:

<InputFloat
	type="text"
	className=""
	nameInput="input-float"
	labelText="Input Float"
	textSize="sm"
	rounded="none"
	useCss
	bind:valueInput={inputFloat}
/>

The other properties found are not mandatory but are properties that allow you to modify the style of the component.

LICENSE

MIT