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

stepper-library

v1.0.9

Published

A simple stepper form component for angular projects to display content in the form of steps that also checks for validity of the current step form and only then aloows to move to next next. This is usefull for forms with many fields for example, sign-up

Downloads

11

Readme

ng-stepper-library

A simple stepper form component for angular projects to display content in the form of steps that also checks for validity of the current step form and only then allows to move to the next step. This is usefull for forms with many fields for example, sign-up forms. On mobile it displays a circular progress bar and a horizontal progress bar on desktop screens.

Installation

  1. Install npm module:

    npm install stepper-library --save

Usage

Import StepsetModule in your app and start using a component:

Sample

Mobile Screen

ScreenShots

Desktop Screen

####1. ScreenShots

####2. ScreenShots

#Input (all are optional) name | description | default | type | options ------------ | ------------- | ------------- | ------------- | ------------- containerPos | sets the position of the step container | left | string | left, right, center strokeColor | sets the progress-bar color | green | string | - title | sets the step title | green | string | - btnPos | sets the position of the buttons container (back, next,finish) | left | string | btn-left, btn-right, btn-center, btn-apart [finishBtn] | sets the finish button styles | - | object |-

#Output name | description | type ------------ | ------------- | ------------- | ------------- submitEvent | emits an event when finish button is clicked | boolean next | emits an event everytime next button is clicked | boolean

  • <stepset> is a container for all steps

  • containerPos="center" sets the position of the step container.

  • strokeColor="rgb(201, 82, 230)" sets the progress-bar color.

    • [finishBtn]="customClass" pass a class object defined in your component.ts file to customise finish button.
    • (submitEvent)="doSomethingonsubmit($event)" Callback to be called when finish button in the final step has been clicked.
    • (next)="doSomethingonnext($event)" next is emitted everytime the next button is clicked.
    • btnPos="btn-right" position the button set using btn-right, btn-left, btn-center, btn-apart.
  • <step> is a single step item

    • title Simple step title.
import {Component} from "@angular/core";
import {StepsetModule} from "stepper-library";

@Component({
    selector: "app",
    template: `
<stepset [finishBtn]="buttonClass" btnPos="btn-right" containerPos="center" strokeColor="rgb(201, 82, 230)" (submitEvent)="submit()">
  <step title="Personal Info">
    <form #form1="ngForm">
      <div class="form-group">
        <label>Name</label>
        <input placeholder="Name" name="form11" [(ngModel)]="dummyform.fname" required>
      </div>
      <div class="form-group">
        <label>Email</label>
        <input placeholder="Email" name="email" [(ngModel)]="dummyform.email" required>
      </div>
    </form>
  </step>
</stepset>
`
})
export class App {

}

@NgModule({
    imports: [
        // ...
        StepsetModule
    ],
    declarations: [
        App
    ],
    bootstrap: [
        App
    ]
})
export class AppModule {

}