Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: jcoreio/react-view-slider
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v4.0.0
Choose a base ref
...
head repository: jcoreio/react-view-slider
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v4.1.0
Choose a head ref
  • 2 commits
  • 6 files changed
  • 1 contributor

Commits on Apr 17, 2019

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    0567c8b View commit details
  2. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    fd3aa5b View commit details
Showing with 88 additions and 3,290 deletions.
  1. +25 −0 README.md
  2. +1 −3,281 demo/bundle.js
  3. +37 −2 demo/examples/SignupDemo.js
  4. +1 −1 demo/index.html
  5. +17 −4 src/index.js
  6. +7 −2 src/simple.js
25 changes: 25 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -69,6 +69,31 @@ only render the active view.
The index of the view that should be showing. Whenever you change this, `ViewSlider` will animate a horizontal slide
transition to the view at the new index.

##### `spacing: number` (default: `1`)

How much horizontal space to put between the views. `spacing={1.5}` will space
the views apart by 50% of the width, `spacing={2}` will space the views apart
by 100% of the width, etc.

Views without much horizontal padding or margin of their own will look jammed
together during transitions with a default `spacing` of 1, so in that case
you'll want to increase the `spacing`.

A negative number will reverse the view order;
`spacing={-1.5}` will arrange views from right to left with 50% width view
spacing. You can also use the `rtl` property for this, especially if you want
the views to inherit `direction: rtl` for their own content layout.

##### `rtl: boolean` (default: false)

Whether to use right-to-left layout. This will reverse the view order and apply
`direction: rtl` to the viewport style, and each view will inherit that layout
direction for its own content as well.

To reverse the view order without
changing layout direction of each view's content, you can use a negative number
for `spacing`.

##### `keepViewsMounted: boolean` (default: `false`)

If `true`, `ViewSlider` will keep all views mounted after transitioning, not just the active view.
Loading