Skip to content

Commit b875f5b

Browse files
committed
update formatting for component props in README
1 parent 447e6fc commit b875f5b

File tree

1 file changed

+20
-17
lines changed

1 file changed

+20
-17
lines changed

README.md

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -50,62 +50,65 @@ import { Parallax } from 'react-scroll-parallax';
5050
</Parallax>
5151
```
5252

53-
## Parallax Component API
53+
## Parallax Component Props
54+
55+
The following are all props that can be passed to the React `<Parallax />` component:
5456

5557
**`className`**
5658

57-
- string
59+
- type: `String`
5860

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.
6062

6163
**`disabled`**
6264

63-
- boolean
64-
- default `false`
65+
- type: `Boolean`
66+
- default: `false`
6567

6668
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.
6769

6870
**`offsetXMax`**
6971

70-
- number or string
71-
- default `0`
72+
- type: `Number` or `String`
73+
- default: `0`
7274

7375
Maximum **x** offset in `%` or `px`. If no unit is passed percent is assumed. Percent is based on the elements width.
7476

7577
**`offsetXMin`**
7678

77-
- number or string
78-
- default `0`
79+
- type: `Number` or `String`
80+
- default: `0`
7981

8082
Minimum **x** offset in `%` or `px`. If no unit is passed percent is assumed. Percent is based on the elements width.
8183

8284
**`offsetYMax`**
8385

84-
- number or string
85-
- default `0`
86+
- type: `Number` or `String`
87+
- default: `0`
8688

8789
Maximum **y** offset in `%` or `px`. If no unit is passed percent is assumed. Percent is based on the elements height.
8890

8991
**`offsetYMin`**
9092

91-
- number or string
92-
- default `0`
93+
- type: `Number` or `String`
94+
- default: `0`
9395

9496
Minimum **y** offset in `%` or `px`. If no unit is passed percent is assumed. Percent is based on the elements height.
9597

9698
**`slowerScrollRate`**
9799

98-
- boolean
100+
- type: `Boolean`
99101
- default `false`
100102

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.
102104

103105
**`tag`**
104106

105-
- string
107+
- type: `String`
106108
- default `div`
107109

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" />`.
111+
109112

110113

111114
## Development

0 commit comments

Comments
 (0)