All Projects → ihym → ngx-card

ihym / ngx-card

Licence: MIT license
Angular 2+ wrapper for https://github.com/jessepollak/card

Programming Languages

javascript
184084 projects - #8 most used programming language
typescript
32286 projects

Projects that are alternatives of or similar to ngx-card

alarmo-card
Home Assistant card for controlling the Alarmo component
Stars: ✭ 59 (-19.18%)
Mutual labels:  card
nova-algolia-card
A Laravel Nova card for Algolia
Stars: ✭ 22 (-69.86%)
Mutual labels:  card
PyFlashAero
Python scripts for using the Toshiba® FlashAir® Wifi SD Cards on Linux, you may also have a look at my other JavaScript based project https://github.com/cyborg-x1/JSFlashAero which can be installed on the card and used in browser, but it is not that advanced right now.
Stars: ✭ 34 (-53.42%)
Mutual labels:  card
esp-idf-rc522
C library for interfacing ESP32 with MFRC522 RFID card reader, packaged as ESP-IDF component
Stars: ✭ 60 (-17.81%)
Mutual labels:  card
Unity-Trello
☑️️ Generate Trello cards directly from Unity
Stars: ✭ 34 (-53.42%)
Mutual labels:  card
Margoulineur2000
NFC
Stars: ✭ 24 (-67.12%)
Mutual labels:  card
credit-card-prompt
Credit card prompt with validation and address lookup
Stars: ✭ 13 (-82.19%)
Mutual labels:  card
react-native-gesture-flip-card
A card flipping animation component using gesture for react-native.
Stars: ✭ 93 (+27.4%)
Mutual labels:  card
KoiCatalog
A card manager for Koikatu. View, search, and sort your collection of character cards.
Stars: ✭ 18 (-75.34%)
Mutual labels:  card
MTG-Card-Reader
Reads a Magic: The Gathering card in front of a webcam and identifies it in an existing database of cards of a user-specified set.
Stars: ✭ 32 (-56.16%)
Mutual labels:  card
curl-worker
No description or website provided.
Stars: ✭ 42 (-42.47%)
Mutual labels:  card
SpiderCard
蜘蛛纸牌 for mac
Stars: ✭ 29 (-60.27%)
Mutual labels:  card
CircularCardsStackView
CircularCardsStackView is an Android library for dealing with swipeable card views.
Stars: ✭ 30 (-58.9%)
Mutual labels:  card
Android-Material-Design-Template
Android Material Design UI Template , with Google Design support , card view , butterknife , CoordinateLayout , CollapsingToolbar .
Stars: ✭ 56 (-23.29%)
Mutual labels:  card
react-native-card-button
Fully customizable Card Button via Paraboly for React Native.
Stars: ✭ 16 (-78.08%)
Mutual labels:  card
oseid
Microchip AVR based smartcard/token with ECC and RSA cryptography
Stars: ✭ 17 (-76.71%)
Mutual labels:  card
fullscreen-card
Make your Home Assistant browser fullscreen with one tap.
Stars: ✭ 23 (-68.49%)
Mutual labels:  card
dotacard
You are at FODA artwork repository. Play now for free
Stars: ✭ 22 (-69.86%)
Mutual labels:  card
Flashcard-Maker-Android
Flashcard Maker is a study app that helps to create e-flashcards. It is more convenient to have flashcards on your phone so that you don't carry all the paperwork. You can prepare flashcards in your PC as CSV file and import it from the app.
Stars: ✭ 55 (-24.66%)
Mutual labels:  card
atomic-calendar-revive
An advanced calendar card for Home Assistant Lovelace.
Stars: ✭ 218 (+198.63%)
Mutual labels:  card

ngx-card npm version npm License: MIT

Build Status Codacy Badge

Angular 2+ wrapper for card.js

card

https://ihym.github.io/ngx-card/

Installation

Install through npm:

npm install --save ngx-card

If you use SystemJS to load your files, you should adjust your configuration to point our UMD bundle:

map: {
  ...
  'ngx-card/ngx-card': 'node_modules/ngx-card/bundles/ngx-card.umd.js'
}

Dependencies

This library depends on https://github.com/jessepollak/card (tested with 2.3.0). We don't ship with the library, but you have to take care of including it in your page. There are various ways to achieve this, for example by adding this at the end of your <body>:

<script src="https://unpkg.com/[email protected]/dist/card.js"></script>

API

[card]

Input

  • container: any: A selector or DOM element for the form where users will be entering their information

  • card-width: number: default 350px

  • messages: any = {validDate: 'valid\ndate', monthYear: 'mm/yyyy'}: Strings for translation

  • placeholders: any = {number: '•••• •••• •••• ••••', name: 'Full Name', expiry: '••/••', cvc: '•••'}: Placeholders for rendered fields

  • masks: any;

  • formatting: boolean = true;

  • debug: boolean = false: If true, will log helpful messages for setting up Card

[card-number]

[card-name]

[card-expiry]

[card-cvc]

Usage

Once installed you need to import our main module into yours. You should end up with code similar to this:

import {MyComponent} from '...';
import {CardModule} from 'ngx-card/ngx-card';

@NgModule({
  imports: [..., CardModule],
  declarations: [MyComponent, ...],
})
export class MyModule {}

Modify slightly your form by adding the correct directives in your form elements.

You can have multiple form elements that render to a single field (i.e. you have a first and last name input).

To use ngx-card with this functionality, just rearrange your form elements in the correct order and add the proper directives. For example,

<div class="card-container"></div>
<form card
  container=".card-container"
  card-width="500"
  [messages]="messages"
  [placeholders]="placeholders"
  [masks]="masks"
  formatting="false"
  debug="true">

  <input type="text" name="number" card-number/>
  <input type="text" name="first-name" card-name/>
  <input type="text" name="last-name" card-name/>
  <input type="text" name="expiry" card-expiry/>
  <input type="text" name="cvc" card-cvc/>
</form>

Contribute

Build

npm run build

If you want to watch your source files for changes and build every time use:

npm start

Note: Generated output is placed into the node_modules/ngx-card folder.

Demo

The best way to see your changes in action, is to use our demo page locally. Run:

npm run demo

which will create a development server accessible through http:localhost:1111. In conjunction with npm start in another command tab you have a fully working environment!

All demo resources can be found in the /demo folder.


MIT © Vasilis Diakomanolis

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].