• Stars
    star
    187
  • Rank 202,521 (Top 5 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created about 9 years ago
  • Updated about 5 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Segmented View for React Native (with animation)

react-native-segmented-view

Segmented View for React Native (with animation)

Demo

demo

stretch demo

Example

<SegmentedView
    titles={["First", "Second", "Third"]}
    index={this.state.index}
    stretch
    onPress={index => this.setState({ index })}
/>

API (props)

  • titles: (array) => an array of renderables, or arbitrary data if you specify a renderTitle function
  • index: (number) => the index of the selected title
  • stretch: (bool) => whether or not the titles fill in the space inbetween each other
  • onPress: (function(index:number)) => event when a title is tapped, with the index of the title passed in
  • renderTitle: (function(title: any, index:number)) => if specified, this function will be called for each
  • duration: (number) => the length (in ms) of the animation of the bar from one title to the other when it gets selected
  • onTransitionStart: (function) => called when a transition animation starts
  • onTransitionEnd: (function) => called when a transition animation ends
  • barColor: (string) => the color of the highlight bar
  • barPosition: (string) => the position of the highlight bar.
  • underlayColor: (string) => the underlay color of a title block
  • selectedTitleStyle: (object) => the style of the selected title block
  • titleStyle: (object) => the style of a normal (unselected) title block

More Repositories

1

react-primitives

Primitive React Interfaces Across Targets
JavaScript
3,085
star
2

redux-pack

Sensible promise handling and middleware for redux
JavaScript
1,333
star
3

react-native-parallax-view

Parallax view for vertical scrollview/listviews with a header image and header content
JavaScript
1,284
star
4

redux-injectable-store

Redux store with injectable reducers for use with bundle splitting, large apps, and SPAs.
JavaScript
230
star
5

redux-entity

WIP. An abstraction layer around handling normalized entity storage and data fetching with redux
JavaScript
187
star
6

compose-dogfooding

Code written during the Compose Dogfooding streams
Kotlin
183
star
7

react-native-pan-controller

A react native component to help with common use cases for scrolling/panning/etc
JavaScript
181
star
8

recoil

Swift and Kotlin ports of React (Prototype)
Swift
180
star
9

dolla

A light-weight jQuery clone just cuz
JavaScript
139
star
10

enzyme-example-mocha

Example project with React + Enzyme + Mocha
JavaScript
132
star
11

react-native-safe-module

A safe way to consume React Native NativeModules
JavaScript
118
star
12

enzyme-example-react-native

Example project with React Native + Enzyme
Objective-C
87
star
13

native-navigation-boilerplate

Objective-C
82
star
14

enzyme-example-karma-webpack

Example project with React + Enzyme + Karma + Webpack
JavaScript
82
star
15

react_native_animation_examples

JavaScript
80
star
16

react-native-in-depth

Courseware and material for a class on React Native
Objective-C
74
star
17

react-native-future

Some thoughts on future directions and APIs for React Native
67
star
18

enzyme-example-jest

Example project with React + Enzyme + Jest
JavaScript
45
star
19

BQL

BQL: A Better Query Language, SQL Superset
C#
43
star
20

react-image-magnifier

A react component that accepts a high-res source image and produces a magnifier window on mouse hover over the part of the image the cursor is over
JavaScript
39
star
21

LukeMapper

Lucene.Net Document to Object ORM Mapper inspired by Dapper
C#
36
star
22

react-validators

Enhanced React Shape PropType Validators
JavaScript
36
star
23

knockout-react

A wrapper / bridge for using React.js with Knockout and Knockout with React.js
JavaScript
25
star
24

gestio

Declarative DOM-Based Gesture Responder System
JavaScript
21
star
25

style-equal

An efficient equality algorithm for React Native inline styles
JavaScript
20
star
26

astrobin-compose

Kotlin
20
star
27

knockout-components

A components library for Knockout.js (3.0 and above)
JavaScript
18
star
28

knockout-paged

Knockout Extension/Plugin for common paged-data scenarios
CSS
16
star
29

knuckles.js

A web application framework built on top of Knockout.js
JavaScript
13
star
30

react-native-animated-navigator

React Native's Navigator implemented with the Animated API
JavaScript
9
star
31

thinking-in-react

Courseware and material for a class on React
JavaScript
9
star
32

understanding-javascript

Courseware and material for a class on JavaScript
JavaScript
9
star
33

knockout-oftype

Some Extensions and Helpers for handling the Constructor pattern in Knockout
JavaScript
8
star
34

react-primitives-art

Cross-platform interface for react ART library
JavaScript
8
star
35

lucene-fluent-query-builder

A convenient Fluent-API around building Lucene.Net queries
C#
7
star
36

shallow-element-equals

Efficient shallow equality algorithm that also allows checks for react element equality of children props
JavaScript
7
star
37

babel-preset-react-native

Babel preset for react native... with a few tweaks
JavaScript
6
star
38

enzyme-example-karma

Example project with React + Enzyme + Karma
JavaScript
5
star
39

react-blogger

minimal isomorphic blog engine built on react
JavaScript
3
star
40

mixinjs

A small library to create factories with useful mixins-based inheritence. Inspired by React's createClass method.
JavaScript
3
star
41

murmur2js

An optimized JavaScript implementation of the MurmurHash algorithm.
JavaScript
3
star
42

MiniBlog

Low-Profile blogging framework built in ASP.Net WebPages Framework
JavaScript
3
star
43

keynote-highlight

Tiny web app to help with syntax highlighting code in keynote
HTML
2
star
44

sivi

Automation Software for Siempre Viva Remote Observatory
C++
2
star
45

lelandrichardson.github.io

Source code for intelligiblebabble.com
JavaScript
2
star
46

viki

Viki - The Visual Wiki Platform
JavaScript
2
star
47

funky.js

A functional programming library for JavaScript
JavaScript
1
star
48

gift-wrap

An asset bundler and minifier (CSS, JS, LESS) for ASP.Net MVC projects
C#
1
star
49

native-navigator

A fully "native" and cross platform Navigator for React Native
Objective-C
1
star
50

leap-gesto

JavaScript Gesture API for Leap Motion
JavaScript
1
star
51

Talks

JavaScript
1
star
52

react-native-windowed-listview

Windowed ListView for React Native (experimental)
1
star
53

module-dep-graph

Automatically track a dependency graph of all commonjs modules in an application
JavaScript
1
star
54

relay-global-immutable-store

playing around with a concept of a global store, similar to Relay, with some offline & eventually-consistent features
JavaScript
1
star