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

@simple-svelte-ui/forms

v1.0.1

Published

Simple svelte ui Forms extension

Downloads

7

Readme

Simple svelte ui - Forms components

Native HTML forms component enhanced with design to provide easy integration with Svelte.

Installation

install with npm:

npm install @simple-svelte-ui/forms

install with yarn:

yarn add @simple-svelte-ui/forms

Components and usage

Svelte REPL example is available here.

  • colors avaliable in the library:
 primary    : initial
 secondary  : #6200ee
 success    : #467d32
 info       : #17a2b8
 error      : #b70000
 warning    : #caad1d
 disabled   : #80787c

Note: when disabled color is used element will be also disabled from any further actions

  • sizing avaliable for components
    small:
        font-size: 0.875rem , line-height:1.25rem

    normal:
        font-size: 1rem , line-height:1.5rem

    large:
        font-size: 1.125rem, line-height:1.75rem
  • and when outline is set fo false only a bottom line is visible

1. Input

The input component is a basic input field with customization features.

<script>
    import { Input } from '@simple-svelte-ui/forms';
    let value;
</script>
<input
    bind:value
    width="280px"
    color="primary"
    placeholder="Enter the value"
    icon="bx bx-color"
    size="normal"
    outline="{true}"
/>
  • <i> tag is used to display icons
  • actions avaliable are: on:blur on:change on:click on:focus on:keydown on:keypress on:keyup on:mouseover on:mouseenter on:mouseleave on:paste

2. Float input

Input component feild with floating label

<script>
    import { FloatInput } from '@simple-svelte-ui/forms';
    let value;
</script>
<FloatInput
    bind:value
    width="280px"
    color="primary"
    placeholder="Enter the Name"
    label="Name"
    size="normal"
    outline="{true}"
/>
  • actions avaliable are: on:blur on:change on:click on:focus on:keydown on:keypress on:keyup on:mouseover on:mouseenter on:mouseleave on:paste

3. Checkbox

To recive multipe selected options from the user

<script>
    import { Checkbox } from '@simple-svelte-ui/forms';
    let checked;
</script>
<Checkbox color="primary"> Option 1</Checkbox>
  • actions avaliable are: on:blur on:change on:click on:focus on:keydown on:keypress on:keyup on:mouseover on:mouseenter on:mouseleave on:paste

4. Radio

To select single value from multiple options, it uses flex to align the items.so row and column direction options are avaliable. space option is used to give space between items in column alignment

<script>
    import {Radio} from '@simple-svelte-ui/forms' ;
    let group;
    let options =[
        'radio1',
        'radio2',
        'radio3'
        ]
</script>
<Radio
    bind:group
    list={options}
    direction="column"
    space="auto"
    color="primary"
/>
  • actions avaliable are: on:blur on:change on:click on:focus on:keydown on:keypress on:keyup on:mouseover on:mouseenter on:mouseleave on:paste

5. LayoutRadio

Its an advance radio element with capability fof displaying an image , a heading and a description

<script>
    import {LayoutRadio} from '@simple-svelte-ui/forms'
    let group
    const options=[
        {
            name:"Name",
            desc:"Description",
            img:"Image url or Local image"
        }
    ]
</script>
<LayoutRadio list={options} width="500px" bind:group />
  • actions avaliable are: NIL

6. Range

Single headed range slider to slide for values within a range

<script>
    import {Range} from '@simple-svelte-ui/forms'
    let value
</script>
<Range
    bind:value
    id="range"
    min='1'
    max='10'
    step='1'
    color="primary"
/>
  • actions avaliable are: on:change on:click on:keydown on:keypress on:keyup

7. Toggle

Custom checkbox with toggle switch animation

<script>
    import {Toggle} from '@simple-svelte-ui';
    let checked;
</script>
<Toggle
    bind:checked
    size="normal"
    color="primary"
    duration="100ms"
/>
  • actions avaliable are: on:click