Giter VIP home page Giter VIP logo

progress-view's Introduction

@react-native-community/progress-view

Build Status Version Supports iOS MIT License Lean Core Badge

ProgressBar Component for iOS (based on UIProgressView) and Windows.

iOS Windows
>

Getting started

npm install @react-native-community/progress-view --save

or

yarn add @react-native-community/progress-view

Linking

  • React Native 0.60+

The package is automatically linked when building the app. All you need to do is:

npx pod-install
  • React Native <= 0.59

Run the following commands

react-native link @react-native-community/progress-view

Windows

Add the progress-view project to your solution.
  1. Open the solution in Visual Studio 2019
  2. Right-click Solution icon in Solution Explorer > Add > Existing Project Select node_modules\@react-native-community\progress-view\windows\progress-view\progress-view.vcxproj
windows/myapp.sln

Add a reference to progress-view to your main application project. From Visual Studio 2019:

Right-click main application project > Add > Reference... Check progress-view from Solution Projects.

pch.h

Add #include "winrt/progress_view.h".

app.cpp

Add PackageProviders().Append(winrt::progress_view::ReactPackageProvider()); before InitializeComponent();.

Manual installation

IOS

Manually linking the library - iOS
  1. In XCode, in the project navigator, right click LibrariesAdd Files to [your project's name]
  2. Go to node_modules@react-native-community/progress-view and add RNCProgressView.xcodeproj
  3. In XCode, in the project navigator, select your project. Add libRNCProgressView.a to your project's Build PhasesLink Binary With Libraries
  4. Run your project (Cmd+R)

Usage

Import ProgressView from @react-native-community/progress-view

import {ProgressView} from "@react-native-community/progress-view";

Add ProgressView like this

<ProgressView
          progressTintColor="orange"
          trackTintColor="blue"
          progress={0.7}
/>

Running Example App

Windows

  1. Clone branch
  2. cd into progress_view and run yarn install
  3. run yarn add [email protected] --dev (React Native Windows relies on a version of react-native lower than iOS)
  4. Start metro server with yarn start:windows
  5. Open Visual Studios and open example/windows/ProgressViewExample.sln
  6. Set to Debug x64 and start solution

IOS

  1. Clone branch
  2. cd into progress-view and run yarn install
  3. cd into example/ios and run pod install
  4. cd back into progress-view and run yarn ios

Reference

Props


Reference

Props

progress

The progress value (between 0 and 1).

Type Required
number No

progressImage

A stretchable image to display as the progress bar.

Type Required
Image.propTypes.source No

progressTintColor

The tint color of the progress bar itself.

Type Required
string No

progressViewStyle

The progress bar style. Network images only work on Windows.

Type Required
enum('default', 'bar') No

trackImage

A stretchable image to display behind the progress bar. Network images only work on Windows.

Type Required
Image.propTypes.source No

trackTintColor

The tint color of the progress bar track.

Type Required
string No

isIndeterminate

Turns progress bar into an indeterminate progress bar

Type Required Platform
bool No Windows

Contributors

License

The library is released under the MIT license. For more information see LICENSE.

progress-view's People

Contributors

naturalclar avatar kdenz avatar cpojer avatar vonovak avatar tatianakapos avatar amgleitman avatar evanbacon avatar lebedev avatar dependabot[bot] avatar

Stargazers

Jerry avatar

Watchers

James Cloos avatar  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.