Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/charlyjazz/svelte-credit-card
A svelte component to render a credit card :credit_card:
https://github.com/charlyjazz/svelte-credit-card
css ecommerce javascript mit npm package rollup svelte ui
Last synced: 5 days ago
JSON representation
A svelte component to render a credit card :credit_card:
- Host: GitHub
- URL: https://github.com/charlyjazz/svelte-credit-card
- Owner: CharlyJazz
- License: mit
- Created: 2020-05-12T14:09:13.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-11-19T15:51:28.000Z (2 months ago)
- Last Synced: 2025-01-20T12:04:12.151Z (12 days ago)
- Topics: css, ecommerce, javascript, mit, npm, package, rollup, svelte, ui
- Language: Svelte
- Homepage:
- Size: 1.9 MB
- Stars: 65
- Watchers: 2
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Svelte Credit Card
[![npm version](https://badge.fury.io/js/svelte-credit-cards.svg)](https://badge.fury.io/js/svelte-credit-cards)
![Codecov](https://img.shields.io/codecov/c/github/charlyjazz/svelte-credit-card?label=%20&logo=codecov&logoColor=orange&style=flat-square)
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)[![Credit-card-svelte-test.gif](https://i.postimg.cc/FK2ngjbz/Credit-card-svelte-test.gif)](https://postimg.cc/GBxQbT5n)
A component to render a credit card preview, useful for ecommerces.
Based in [react-credit-cards](https://github.com/amarofashion/react-credit-cards) A react component with beautiful credit cards for your payment forms.
### Prerequisites
You need svelte-loader or a rollup svelte configuration
### Installing
With NPM:
```bash
$ npm install svelte-credit-cards
```With Yarn:
```bash
$ yarn add svelte-credit-cards
```## Example
You can create inputs and send the values as props to the CreditCard component
```javascript
import CreditCard from "svelte-credit-cards"; let number = ""; let name = "";
let cvc = ""; let expiry = "";```
```html
Number
Name
CVC
Exp.
```
## Built With
[react-credit-cards](https://github.com/amarofashion/react-credit-cards) - A react component with beautiful credit cards for your payment forms.
[Svelte Component Template](https://github.com/sveltejs/component-template) - A base for building shareable Svelte components.
[Payment](https://github.com/jessepollak/payment) - A jQuery-free general purpose library for building credit card forms, validating inputs and formatting numbers.
## Contributing
Please read [CONTRIBUTING](CONTRIBUTING.md) for details on our code of conduct, and the process for submitting pull requests to us.
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details