|
6 | 6 | </p>
|
7 | 7 | <div align="center">
|
8 | 8 | <a href="https://github.com/yuvalkarif/gradient-blob/actions/workflows/main.yml" target="__blank"><img alt="GitHub Actions Workflow Status" src="https://img.shields.io/github/actions/workflow/status/yuvalkarif/gradient-blob/main.yml?color=blue" /></a>
|
| 9 | + <a href="https://www.npmjs.com/package/@yuvalkarif/gradient-blob" target="__blank"><img alt="NPM Version" src="https://img.shields.io/npm/v/%40yuvalkarif%2Fgradient-blob?color=lavender"></a> |
9 | 10 | <a href="https://yuvalkarif.github.io/gradient-blob/" target="__blank"><img alt="Website" src="https://img.shields.io/website?url=https%3A%2F%2Fgradient-blob.yuvalkarif.com%2F" /></a>
|
10 | 11 | </div>
|
11 | 12 | </p>
|
12 | 13 |
|
| 14 | +> [!NOTE] |
| 15 | +> This project was created mainly for learning purposes such as repo management, CI/CD, monorepo, package maintenance, etc. |
| 16 | +
|
13 | 17 | ## Features π
|
14 | 18 | - **Customizable Blobs** π : Adjust the size, color, and complexity of your blobs.
|
15 | 19 | - **Live Preview** π: See changes in real-time as you customize your blob.
|
16 |
| -- **Copy CSS** π: With one click, copy the CSS of your customized blob to your clipboard. |
| 20 | +- **Copy CSS** π: Easily copy the CSS of your customized blob to your clipboard. |
17 | 21 | - **Nuxt 3 Powered** π₯: Enjoy the latest features and optimizations of Nuxt 3.
|
18 | 22 | - **TypeScript Support** π: Reliable and maintainable codebase with TypeScript.
|
| 23 | +- **Fully Tested** π§ͺ: Unit and E2E tests utilizing Vitest and Playwright. |
| 24 | +- **Formatted and Linted** π§Ή: The entire repo is formatted and linted using ESLint. |
| 25 | +- **Published Package** π¦: A package that powers the interactive website. |
| 26 | + |
| 27 | +## Package |
| 28 | +### Installation |
| 29 | +```bash |
| 30 | +npm i @yuvalkarif/gradient-blob |
| 31 | +``` |
19 | 32 |
|
20 |
| -## Getting Started π |
| 33 | +### Usage Example |
| 34 | +```ts |
| 35 | +import { gb, gbc } from '@yuvalkarif/gradient-blob' |
| 36 | + |
| 37 | +// Basic Usage |
| 38 | +const gradientBlob = gb(10) |
| 39 | +// ^ -> "96% 25%, 19% 32%, 42% 91%, 82% 3%, 46% 52%, 35% 19%, 17% 24%, 83% 88%, 78% 86%, 26% 18%" |
| 40 | + |
| 41 | +// Complicated Usage |
| 42 | +const { gb } = gbc({ cacheChance: 50 }) |
| 43 | +const gradientBlob = gb(10, { clipPathProperty: true }) |
| 44 | +// ^ -> "clip-path: polygon(96% 25%, 19% 32%, 42% 91%, 82% 3%, 46% 52%, 35% 19%, 17% 24%, 83% 88%, 78% 86%, 26% 18%)" |
| 45 | +``` |
| 46 | +## Local Development π |
21 | 47 | To run CSS Blobs Generator locally, clone the repository and install the dependencies:
|
22 | 48 |
|
23 | 49 | ```bash
|
24 |
| -pnpm install && pnpm dev |
| 50 | +npm install && npm run dev |
25 | 51 | ```
|
0 commit comments