Skip to content

Commit 73b1a16

Browse files
committed
document new children and expanded ParallaxBanner props #22
1 parent 89cf3cf commit 73b1a16

File tree

1 file changed

+15
-13
lines changed

1 file changed

+15
-13
lines changed

README.md

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -32,17 +32,17 @@ yarn add react-scroll-parallax
3232

3333
* [Usage](#usage)
3434
* [`<Parallax>`](#parallax)
35-
* [Parallax Props](#parallax-props)
35+
* [Parallax Props](#parallax-props)
3636
* [`<ParallaxBanner>`](#parallaxbanner)
37-
* [Banner Usage](#banner-usage)
38-
* [Banner Props](#banner-props)
39-
* [Banner Layers Prop](#banner-layers-prop)
37+
* [Banner Usage](#banner-usage)
38+
* [Banner Props](#banner-props)
39+
* [Banner Layers Prop](#banner-layers-prop)
4040
* [`<ParallaxProvider>`](#parallaxprovider)
41-
* [Parallax Controller Context](#parallax-controller-context)
42-
* [Available Methods](#available-methods)
41+
* [Parallax Controller Context](#parallax-controller-context)
42+
* [Available Methods](#available-methods)
4343
* [Browser Support](#browser-support)
4444
* [Optimizations to Reduce Jank](#optimizations-to-reduce-jank)
45-
* [PSA](#psa)
45+
* [PSA](#psa)
4646

4747
## Usage
4848

@@ -147,13 +147,15 @@ The following are all props that can be passed to the `<ParallaxBanner>` compone
147147

148148
### Banner Layers Prop
149149

150-
The `layers` prop takes an array of objects that will represent each image of the parallax banner. The following properties describe a layer object:
150+
The `layers` prop takes an array of objects that will represent each image (or custom children) of the parallax banner. The following properties describe a layer object:
151151

152-
| Name | Type | Description |
153-
| -------------------- | :------: | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
154-
| **amount** | `Number` | A value from `0 – 1` that represents the vertical offset to be applied to the current layer, `0.1` would equal a `10%` offset on the top and bottom. |
155-
| **image** | `String` | Image source that will be applied as a CSS background image on the layer. |
156-
| **slowerScrollRate** | `Number` | Indicates whether the layer should move faster or slower than the default rate of scroll. |
152+
| Name | Type | Default | Description |
153+
| -------------------- | :-------: | :------ | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
154+
| **amount** | `Number` | | A value from `0 – 1` that represents the vertical offset to be applied to the current layer, `0.1` would equal a `10%` offset on the top and bottom. |
155+
| **children** | `Element` | | Custom layer children provided as a React element, for example `<Video />` |
156+
| **expanded** | `Boolean` | `true` | Indicate if the layer should be expanded with negative top/bottom margins so the edges will never be visible. |
157+
| **image** | `String` | | Image source that will be applied as a CSS background image on the layer. |
158+
| **slowerScrollRate** | `Number` | | Indicates whether the layer should move faster or slower than the default rate of scroll. |
157159

158160
## \<ParallaxProvider>
159161

0 commit comments

Comments
 (0)