Git Product home page Git Product logo

frogress's Introduction

Frogress

NPM version Package size

โ„๏ธ The ultimate Line Progress Bar UI for React

@frogress/line

๐Ÿ“ฆ Installation

# Install peer depedencies
yarn add react react-dom styled-components framer-motion

# Install Frogress's Line Progress Bar component
yarn add @frogress/line
  • styled-components will be replaced soon by React's internal StyleSheet(to reduce depedencies).
  • framer-motion should be an optional depedency of those who wish to use AnimatedLineProgressBar of #3. Will be fixed soon!

๐Ÿš€ Usage

import { LineProgressBar } from '@frogress/line'

<LineProgressBar percent={65} />

percent is the percentage of the progress bar(number type value with a range of 0 to 100). This property is required in TypeScript, but it will default to 0 if you ignore it.

๐Ÿ’ก What problem does this solve?

Examples of common traditional interfaces

When progress indicator is short When progress indicator is long
Toss Mission Point Toss Mission Point

Comparison

Compared

Lots of existing line progress bar UIs do not support color gradients or rounded edges.

Most implementations it wrong. The upper-left image is the most common mistake with inconsistent behavior; Gradients are shrunk with the progress width, border-radius is working strangely with small values.

๐Ÿ‘“ Compile-time Type checking

- <LineProgressBar percent={-32} />
- <LineProgressBar percent={-1} />

+ <LineProgressBar percent={0} />
+ <LineProgressBar percent={45} />
+ <LineProgressBar percent={100} />

- <LineProgressBar percent={101} />
- <LineProgressBar percent={9999} />

The type is enforced so that only integers within the correct range are allowed.

๐ŸŒธ Styling

TBD

Size

Color

Rounding

Direction

@frogress/docs

website-preview

๐Ÿ“– Documentation

Development

# ๐Ÿ–จ Clone git repository
git clone https://github.com/junhoyeo/frogress
cd frogress

# ๐Ÿ“ฆ Install depedencies
yarn install

# ๐Ÿ”จ Build @frogress/line
yarn workspace @frogress/line build

# ๐Ÿƒโ€โ™€๏ธ Run development server for @frogress/docs
yarn workspace @frogress/docs dev

# ๐Ÿš€ Build & Deploy
git commit -m "@frogress/[email protected]"
git tag x.y.z
yarn workspace @frogress/line build
yarn workspace @frogress/line npm publish --access=public
git push --tags
git push

frogress's People

Contributors

junhoyeo avatar imgbot[bot] avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.