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

ngx-formly-components

v1.0.40

Published

[![GitHub issues](https://img.shields.io/github/issues/penrique/ngx-formly-components.svg)](https://github.com/penrique/ngx-formly-components/issues) [![GitHub stars](https://img.shields.io/github/stars/penrique/ngx-formly-components.svg)](https://github

Downloads

98

Readme

GitHub issues GitHub stars GitHub license Twitter

Notice:

This is still a work in progress, not to be used in production environments... yet.

Table of contents

  1. Getting Started
  2. Installation instructions
  3. Running the demo
  4. Components
  5. Wrappers
  6. Demo Code

Getting Started

Ngx-formly-components is an Angular 4+ module which contains a set of ready-to-use, easily configurable components to aid those who seek to create and mantain forms on the fly almost effortlessly. It is designed to work along with @angular/material and ng-formly, which means you'll get really cool looking JSON configurable forms.

To get started there's a couple of steps required by angular material you'll have to complete before being able to use any components properly:

1. Include a theme

Including a theme is required to apply all of the core and theme styles to your application. To get started with a prebuilt theme, include one of Angular Material's prebuilt themes globally in your application. If you're using the Angular CLI, you can add this to your styles.css:

@import "~@angular/material/prebuilt-themes/indigo-pink.css";

If you are not using the Angular CLI, you can include a prebuilt theme via a element in your index.html. For more information on theming and instructions on how to create a custom theme, see the theming guide.

2. Add material icons

Include this line in your index.html if you don't plan on hosting the icons yourself:

<link href="https://fonts.googleapis.com/icon?family=Material+Icons"rel="stylesheet">

Otherwise you first have to download the icon font:

npm install material-design-icons --save

Once that's done downloading browse your node_modules folder and copy the iconfont folder from inside the material-design-icons folder to your project's assets folder. Afterwards include assets/material/iconfont/material-icons.css to your project and you're set.

Installation instructions

Install ngx-formly-components from npm

npm install ngx-formly-components@latest --save

Import FormlyComponentsModule

import { BrowserModule } from '@angular/platform-browser';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { NgModule } from '@angular/core';
import { AppComponent } from './app.component';

import { FormlyComponentsModule } from 'ngx-formly-components';

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    FormlyComponentsModule.forRoot(),
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }

Running the demo

> npm install
> ng serve
>>> Open your browser on `http://localhost:4200`

Components

Input


| Input | Type | |---------------|-----------------------| | placeholder | string | | disabled | boolean | | format | (e: string) => string | | source | Observable<string[]> | | keydown | (e: any)=>void | | password | boolean | | maxLength | number |

@source: A list which enables autocomplete capabilities

Textarea

| Input | Type | |---------------|----------------------------------| | placeholder | string | | disabled | boolean | | format | (e: string) => string | | keydown | (e: any, shift: boolean)=>void | | maxLength | number | | minRows | number | | maxRows | number |

Select


| Input | Type | |---------------|-----------------------| | placeholder | string | | disabled | boolean | | format | (e: string) => string | | nonull | boolean | | maxRows | number | | minRows | number | | maxLength | number | | changed | (e: any) => void |

Select-Autocomplete


| Input | Type
|------------------|---------------------------------------------------------| | placeholder | string | | disabled | boolean | | source | Observable<{ name: string, value: string | number }[]> | | nonull | boolean | | tooltip | 'before'|'after'|'above'|'below'|'left'|'right' | | debounceTime | number | | changed | (e: any) => void |

Autocomplete


| Input | Type | |------------------|-------------------------------------------------------------------------| | placeholder | string | | disabled | boolean | | source | (e: string)=>Observable<{ name: string, value: string |value: 2 }])} | | tooltip | 'before'|'after'|'above'|'below'|'left'|'right' | | debounceTime | number | | changed | (e: any) => void |

Checklist

| Input | Type | Example | |------------|---------|--------------| | text | string | 'I agree' | | disabled | boolean | true |

Datetime

| Input | Type | |---------------|----------------------| | placeholder | string | | disabled | boolean | | format | string | | tooltip | string | | mask | (string | RegExp)[] |

Chips

| Input | Type | |--------------------|----------------------| | placeholder | string | | disabled | boolean | | source | Observable<string[]> | | onlyAutocomplete | boolean | | maxItems | number | | changed | (e: any) => void |

Address-Picker

Not yet documented

Repeated-Section

Not yet documented

Blank

Just a blank, can be useful. Might want to check out app.component.ts

Wrappers

  • Section
  • Split
  • Card

Demo code

All available components are being used in the demo code, check out app.component.ts for more detailed information on how to use each.

Issues

Feel free to submit any issues or features you want to see in the future! Happy coding!