You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+20-17Lines changed: 20 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -50,62 +50,65 @@ import { Parallax } from 'react-scroll-parallax';
50
50
</Parallax>
51
51
```
52
52
53
-
## Parallax Component API
53
+
## Parallax Component Props
54
+
55
+
The following are all props that can be passed to the React `<Parallax />` component:
54
56
55
57
**`className`**
56
58
57
-
-string
59
+
-type: `String`
58
60
59
-
Optionally pass additional class names to be added to the parallax element.
61
+
Optionally pass additional class names to be added to the outer parallax element.
60
62
61
63
**`disabled`**
62
64
63
-
-boolean
64
-
- default `false`
65
+
-type: `Boolean`
66
+
- default:`false`
65
67
66
68
Determines if the component will have parallax offsets applied. If `true` parallax styles are completely removed from the element and it is no longer updated.
67
69
68
70
**`offsetXMax`**
69
71
70
-
-number or string
71
-
- default `0`
72
+
-type: `Number`or `String`
73
+
- default:`0`
72
74
73
75
Maximum **x** offset in `%` or `px`. If no unit is passed percent is assumed. Percent is based on the elements width.
74
76
75
77
**`offsetXMin`**
76
78
77
-
-number or string
78
-
- default `0`
79
+
-type: `Number`or `String`
80
+
- default:`0`
79
81
80
82
Minimum **x** offset in `%` or `px`. If no unit is passed percent is assumed. Percent is based on the elements width.
81
83
82
84
**`offsetYMax`**
83
85
84
-
-number or string
85
-
- default `0`
86
+
-type: `Number`or `String`
87
+
- default:`0`
86
88
87
89
Maximum **y** offset in `%` or `px`. If no unit is passed percent is assumed. Percent is based on the elements height.
88
90
89
91
**`offsetYMin`**
90
92
91
-
-number or string
92
-
- default `0`
93
+
-type: `Number`or `String`
94
+
- default:`0`
93
95
94
96
Minimum **y** offset in `%` or `px`. If no unit is passed percent is assumed. Percent is based on the elements height.
95
97
96
98
**`slowerScrollRate`**
97
99
98
-
-boolean
100
+
-type: `Boolean`
99
101
- default `false`
100
102
101
-
Determines whether the scroll rate of the component will move faster or slower than the default rate of scroll.
103
+
Determines whether the scroll rate of the parallax component will move faster or slower than the default rate of scroll.
102
104
103
105
**`tag`**
104
106
105
-
-string
107
+
-type: `String`
106
108
- default `div`
107
109
108
-
Optionally pass a tag name to be applied to the outer most parallax element.
110
+
Optionally pass a tag name to be applied to the outer most parallax element. For example: `<Parallax tag="figure" />`.
0 commit comments