├── .changeset ├── README.md └── config.json ├── .eslintrc.js ├── .github ├── CODEOWNERS ├── FUNDING.yml ├── pull_request_template.md └── workflows │ └── release.yaml ├── .gitignore ├── .npmrc ├── LICENSE ├── README.md ├── apps └── website │ ├── .prettierrc.js │ ├── components.json │ ├── next-env.d.ts │ ├── next.config.js │ ├── package.json │ ├── postcss.config.js │ ├── public │ └── og-image.png │ ├── src │ ├── app │ │ ├── api │ │ │ └── page.tsx │ │ ├── icon.tsx │ │ ├── layout.tsx │ │ └── page.tsx │ ├── components │ │ ├── api-hero.tsx │ │ ├── code-block.tsx │ │ ├── hero.tsx │ │ ├── scroll-area.tsx │ │ ├── section.tsx │ │ ├── sections │ │ │ ├── api │ │ │ │ ├── api-introduction.tsx │ │ │ │ ├── api-table.tsx │ │ │ │ └── react-server-component.tsx │ │ │ └── home │ │ │ │ ├── animation.tsx │ │ │ │ ├── arc-priority.tsx │ │ │ │ ├── custom-color-scale.tsx │ │ │ │ ├── custom-secondary-color.tsx │ │ │ │ ├── default-color-scale.tsx │ │ │ │ ├── default.tsx │ │ │ │ ├── installation.tsx │ │ │ │ ├── introduction.tsx │ │ │ │ ├── label.tsx │ │ │ │ ├── playground.tsx │ │ │ │ └── variant.tsx │ │ ├── snippet.tsx │ │ ├── sparkle-svg.tsx │ │ ├── tailwind-indicator.tsx │ │ └── ui │ │ │ ├── button.tsx │ │ │ ├── card.tsx │ │ │ ├── color-picker.tsx │ │ │ ├── input.tsx │ │ │ ├── label.tsx │ │ │ ├── popover.tsx │ │ │ ├── select.tsx │ │ │ ├── sonner.tsx │ │ │ ├── switch.tsx │ │ │ └── table.tsx │ ├── globals.css │ ├── hooks │ │ └── use-replay-animation.ts │ └── lib │ │ ├── constants.ts │ │ └── utils.ts │ ├── tailwind.config.ts │ └── tsconfig.json ├── package.json ├── packages └── gauge │ ├── .prettierrc.js │ ├── package.json │ ├── src │ ├── index.tsx │ ├── index.types.ts │ └── lib │ │ └── utils.ts │ └── tsconfig.json ├── pnpm-lock.yaml ├── pnpm-workspace.yaml ├── renovate.json └── turbo.json /.changeset/README.md: -------------------------------------------------------------------------------- 1 | # Changesets 2 | 3 | Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works 4 | with multi-package repos, or single-package repos to help you version and publish your code. You can 5 | find the full documentation for it [in our repository](https://github.com/changesets/changesets) 6 | 7 | We have a quick list of common questions to get you started engaging with this project in 8 | [our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md) 9 | -------------------------------------------------------------------------------- /.changeset/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://unpkg.com/@changesets/config@3.0.0/schema.json", 3 | "changelog": "@changesets/cli/changelog", 4 | "commit": false, 5 | "linked": [], 6 | "access": "public", 7 | "baseBranch": "main", 8 | "updateInternalDependencies": "patch", 9 | "ignore": ["website"] 10 | } 11 | -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | // This tells ESLint to load the config from the package `eslint-config-custom` 4 | extends: ['custom'], 5 | settings: { 6 | next: { 7 | rootDir: ['apps/*/'] 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | # Learn how to add code owners here: 2 | # https://help.github.com/en/articles/about-code-owners 3 | 4 | * @suyalcinkaya 5 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | github: suyalcinkaya 2 | ko_fi: suyalcinkaya 3 | buy_me_a_coffee: suyalcinkaya 4 | -------------------------------------------------------------------------------- /.github/pull_request_template.md: -------------------------------------------------------------------------------- 1 | ### Description 2 | 3 | Please provide a brief description of what this PR accomplishes. 4 | 5 | If applicable, you should then provide a more detailed description including screenshots (if appropriate) to benefit 6 | everyone. 7 | 8 | #### Type of project(s) 9 | 10 | - [ ] :package: `packages/gauge` 11 | - [ ] :sparkles: `apps/website` 12 | 13 | #### Type of change 14 | 15 | - [ ] :bug: Bug fix 16 | - [ ] :rocket: New feature 17 | - [ ] :boom: Breaking change 18 | 19 | ### How do I test this? 20 | 21 | - Provide clear step-by-step instructions for easy reproduction. 22 | - Highlight the current issue and explain how the change resolves it. 23 | - Preferably provide links from the relevant Vercel Preview URL. 24 | 25 | ### Checklist 26 | 27 | Did you remember to take care of the following? 28 | 29 | - [ ] `pnpm install` – for the new dependencies 30 | - [ ] Verify `pnpm-lock.yaml` file when there is a package addition, deletion, or update 31 | - [ ] Perform a self-review 32 | - [ ] Provide comments, particularly in hard-to-understand areas 33 | -------------------------------------------------------------------------------- /.github/workflows/release.yaml: -------------------------------------------------------------------------------- 1 | name: Release 2 | 3 | on: 4 | workflow_dispatch: 5 | 6 | concurrency: ${{ github.workflow }}-${{ github.ref }} 7 | 8 | jobs: 9 | release: 10 | name: Release 11 | runs-on: ubuntu-latest 12 | if: github.actor == github.repository_owner 13 | 14 | steps: 15 | - name: Checkout Repo 16 | uses: actions/checkout@v4 17 | 18 | - name: Setup pnpm 19 | uses: pnpm/action-setup@v4 20 | with: 21 | version: 9 22 | 23 | - name: Setup Node.js 24 | uses: actions/setup-node@v4 25 | with: 26 | node-version: 20.x 27 | 28 | - name: Install Dependencies 29 | run: pnpm i 30 | 31 | - name: Publish to NPM 32 | id: changesets 33 | uses: changesets/action@v1 34 | with: 35 | publish: pnpm publish-packages 36 | env: 37 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 38 | NPM_TOKEN: ${{ secrets.NPM_TOKEN }} 39 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .vscode 2 | .env 3 | 4 | # next.js 5 | .next 6 | /out/ 7 | .vercel 8 | 9 | # dependencies 10 | node_modules 11 | /.pnp 12 | .pnp.js 13 | 14 | # production 15 | /build 16 | sw.js 17 | workbox-*.js 18 | dist 19 | 20 | # misc 21 | .DS_Store 22 | 23 | # debug 24 | npm-debug.log* 25 | yarn-debug.log* 26 | yarn-error.log* 27 | 28 | # ts 29 | tsconfig.tsbuildinfo 30 | 31 | # turbo 32 | .turbo -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | registry=https://registry.npmjs.org/ 2 | engine-strict=true 3 | auto-install-peers=true -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 Onur Şuyalçınkaya 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ![screenshot](apps/website/public/og-image.png) 2 | 3 | # Gauge [![@suyalcinkaya/gauge minzip package size](https://img.shields.io/bundlephobia/minzip/@suyalcinkaya/gauge)](https://www.npmjs.com/package/@suyalcinkaya/gauge?activeTab=code) [![@suyalcinkaya/gauge package version](https://img.shields.io/npm/v/@suyalcinkaya/gauge.svg?colorB=green)](https://www.npmjs.com/package/@suyalcinkaya/gauge) ![@suyalcinkaya/gauge NPM Downloads](https://img.shields.io/npm/dm/%40suyalcinkaya%2Fgauge) ![@suyalcinkaya/gauge GitHub License](https://img.shields.io/github/license/suyalcinkaya/gauge) 4 | 5 | [Gauge](https://gauge.onur.dev/) is an aesthetic and customizable circular visual component for React. 6 | 7 | Examples and playground: [https://gauge.onur.dev](https://gauge.onur.dev) 8 | 9 | ## Documentation 10 | 11 | Find the full API reference in the [documentation](https://gauge.onur.dev/api). 12 | 13 | ## Install 14 | 15 | ```bash 16 | pnpm install @suyalcinkaya/gauge 17 | ``` 18 | 19 | ## Use 20 | 21 | ```tsx 22 | import { Gauge } from '@suyalcinkaya/gauge' 23 | 24 | export function Component(): JSX.Element { 25 | return 26 | } 27 | ``` 28 | 29 | ## Development 30 | 31 | ### Installation 32 | 33 | The Gauge repository uses [pnpm Workspaces](https://pnpm.io/workspaces) and [Turborepo](https://github.com/vercel/turborepo). To install dependencies, run `pnpm install` in the project root directory. 34 | 35 | ```bash 36 | pnpm install 37 | ``` 38 | 39 | ### Build Gauge 40 | 41 | ```bash 42 | cd packages/gauge 43 | pnpm build 44 | ``` 45 | 46 | Watch mode: `pnpm dev` 47 | 48 | ### Development 49 | 50 | You can also debug it with the website app locally. For instance; to start `apps/website` locally, run the following command in the project root directory. 51 | 52 | ```bash 53 | pnpm dev 54 | ``` 55 | 56 | Check [localhost:3000](http://localhost:3000) to see the website app. 57 | 58 | ## Inspiration & Credits 59 | 60 | Inspired by [Geist Design System](https://vercel.com/geist/gauge) from the Vercel team and by [geist-gauge](https://geist-gauge.vercel.app) from Ajay. 61 | -------------------------------------------------------------------------------- /apps/website/.prettierrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | semi: false, 3 | singleQuote: true, 4 | tabWidth: 2, 5 | useTabs: false, 6 | trailingComma: 'none', 7 | bracketSpacing: true, 8 | jsxBracketSameLine: false, 9 | proseWrap: 'always', 10 | printWidth: 120, 11 | plugins: ['prettier-plugin-tailwindcss'], 12 | tailwindFunctions: ['cn', 'cva'] 13 | } 14 | -------------------------------------------------------------------------------- /apps/website/components.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://ui.shadcn.com/schema.json", 3 | "style": "new-york", 4 | "rsc": true, 5 | "tsx": true, 6 | "tailwind": { 7 | "config": "tailwind.config.js", 8 | "css": "@/globals.css", 9 | "baseColor": "gray", 10 | "cssVariables": false 11 | }, 12 | "aliases": { 13 | "components": "@/components", 14 | "utils": "@/lib/utils" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /apps/website/next-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | /// 3 | 4 | // NOTE: This file should not be edited 5 | // see https://nextjs.org/docs/basic-features/typescript for more information. 6 | -------------------------------------------------------------------------------- /apps/website/next.config.js: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | 3 | /** @type {import('next').NextConfig} */ 4 | const nextConfig = { 5 | trailingSlash: false 6 | } 7 | 8 | module.exports = nextConfig 9 | -------------------------------------------------------------------------------- /apps/website/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "website", 3 | "version": "0.1.0", 4 | "author": { 5 | "name": "Onur Şuyalçınkaya", 6 | "url": "https://onur.dev" 7 | }, 8 | "scripts": { 9 | "dev": "next dev", 10 | "build": "next build", 11 | "start": "next start", 12 | "lint": "next lint", 13 | "type-check": "tsc --noEmit" 14 | }, 15 | "devDependencies": { 16 | "@types/node": "20.12.11", 17 | "@types/react": "18.3.2", 18 | "@types/react-dom": "18.3.0", 19 | "autoprefixer": "10.4.14", 20 | "eslint": "8.45.0", 21 | "eslint-config-next": "14.2.3", 22 | "postcss": "8.4.26", 23 | "prettier-plugin-tailwindcss": "^0.5.14", 24 | "typescript": "5.2.2" 25 | }, 26 | "dependencies": { 27 | "@next/third-parties": "^14.2.3", 28 | "@radix-ui/react-label": "^2.0.2", 29 | "@radix-ui/react-popover": "^1.0.7", 30 | "@radix-ui/react-select": "^2.0.0", 31 | "@radix-ui/react-slot": "^1.0.2", 32 | "@radix-ui/react-switch": "^1.0.3", 33 | "@suyalcinkaya/gauge": "workspace:*", 34 | "class-variance-authority": "^0.7.0", 35 | "classix": "^2.1.37", 36 | "geist": "^1.3.0", 37 | "next": "14.2.3", 38 | "react": "18.3.1", 39 | "react-dom": "18.3.1", 40 | "react-icons": "^5.2.1", 41 | "sonner": "^1.4.41", 42 | "sugar-high": "^0.6.1", 43 | "tailwind-merge": "^2.3.0", 44 | "tailwindcss": "3.4.3" 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /apps/website/postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | 'tailwindcss/nesting': {}, 4 | tailwindcss: {}, 5 | autoprefixer: {} 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /apps/website/public/og-image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suyalcinkaya/gauge/14262941c77514022dc5ae03e162d532ad7c5426/apps/website/public/og-image.png -------------------------------------------------------------------------------- /apps/website/src/app/api/page.tsx: -------------------------------------------------------------------------------- 1 | import { ApiHero } from '@/components/api-hero' 2 | 3 | export default function Api() { 4 | return ( 5 | <> 6 | 7 | 8 | ) 9 | } 10 | -------------------------------------------------------------------------------- /apps/website/src/app/icon.tsx: -------------------------------------------------------------------------------- 1 | import { ImageResponse } from 'next/og' 2 | 3 | export const size = { 4 | width: 32, 5 | height: 32 6 | } 7 | export const contentType = 'image/png' 8 | 9 | export default function Icon() { 10 | return new ImageResponse( 11 | ( 12 |
19 | 20 | 24 | 25 |
26 | ), 27 | size 28 | ) 29 | } 30 | -------------------------------------------------------------------------------- /apps/website/src/app/layout.tsx: -------------------------------------------------------------------------------- 1 | import '@/globals.css' 2 | import { GeistMono } from 'geist/font/mono' 3 | import { GeistSans } from 'geist/font/sans' 4 | import Script from 'next/script' 5 | import { GoogleAnalytics } from '@next/third-parties/google' 6 | import type { Metadata, Viewport } from 'next' 7 | 8 | import { Button } from '@/components/ui/button' 9 | import { Toaster } from '@/components/ui/sonner' 10 | import { TailwindIndicator } from '@/components/tailwind-indicator' 11 | 12 | export default function RootLayout({ 13 | children 14 | }: Readonly<{ 15 | children: React.ReactNode 16 | }>) { 17 | return ( 18 | 19 | 20 |
21 |
{children}
22 |
23 | 51 | 56 | 57 | 58 |