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
Add support for top-down gradient animation (#264)
* feat(svg.tsx): add support for top-down gradient animation
add gradientDirection prop which translates into a rotate transformation applied to the
linearGradient SVG element. Providing the option to animate either from left to right or top to
bottom.
fix#255
* test(gradient-direction): revert change
Co-authored-by: Danilo Woznica <[email protected]>
|**`animate?: boolean`** <br/> Defaults to `true`| React DOM<br/>React Native | Opt-out of animations with `false`|
114
-
|**`title?: string`** <br/> Defaults to `Loading interface...`| React DOM only | It's used to describe what element it is. <br />Use `''` (empty string) to remove. |
115
-
|**`baseUrl?: string`**<br /> Defaults to an empty string | React DOM only | Required if you're using `<base url="/" />` document `<head/>`. <br/>This prop is common used as: <br/>`<ContentLoader baseUrl={window.location.pathname} />` which will fill the SVG attribute with the relative path. Related [#93](https://github.com/danilowoz/react-content-loader/issues/93). |
116
-
|**`speed?: number`** <br /> Defaults to `1.2`| React DOM<br/>React Native | Animation speed in seconds. |
117
-
|**`interval?: number`** <br /> Defaults to `0.25`| React DOM<br/>React Native | Interval of time between runs of the animation, <br/>as a fraction of the animation speed. |
118
-
|**`viewBox?: string`** <br /> Defaults to `undefined`| React DOM<br/>React Native | Use viewBox props to set a custom viewBox value, <br/>for more information about how to use it, <br/>read the article [How to Scale SVG](https://css-tricks.com/scale-svg/). |
119
-
|**`gradientRatio?: number`** <br /> Defaults to `1.2`| React DOM only | Width of the animated gradient as a fraction of the view box width. |
|**`backgroundColor?: string`** <br /> Defaults to `#f5f6f7`| React DOM<br/>React Native | Used as background of animation. |
122
-
|**`foregroundColor?: string`** <br /> Defaults to `#eee`| React DOM<br/>React Native | Used as the foreground of animation. |
123
-
|**`backgroundOpacity?: number`** <br /> Defaults to `1`| React DOM only | Background opacity (0 = transparent, 1 = opaque)<br/>used to solve an issue in [Safari](#safari--ios)|
124
-
|**`foregroundOpacity?: number`** <br /> Defaults to `1`| React DOM only | Animation opacity (0 = transparent, 1 = opaque)<br/>used to solve an issue in [Safari](#safari--ios)|
125
-
|**`style?: React.CSSProperties`** <br /> Defaults to `{}`| React DOM only ||
126
-
|**`uniqueKey?: string`** <br /> Defaults to random unique id | React DOM only | Use the same value of prop key, <br/>that will solve inconsistency on the SSR, see more [here](https://github.com/danilowoz/react-content-loader/issues/78). |
111
+
| <divstyle="width:250px">Prop name and type</div> | Environment | Description |
|**`animate?: boolean`** <br/> Defaults to `true`| React DOM<br/>React Native | Opt-out of animations with `false`|
114
+
|**`title?: string`** <br/> Defaults to `Loading interface...`| React DOM only | It's used to describe what element it is. <br />Use `''` (empty string) to remove. |
115
+
|**`baseUrl?: string`**<br /> Defaults to an empty string | React DOM only | Required if you're using `<base url="/" />` document `<head/>`. <br/>This prop is common used as: <br/>`<ContentLoader baseUrl={window.location.pathname} />` which will fill the SVG attribute with the relative path. Related [#93](https://github.com/danilowoz/react-content-loader/issues/93). |
116
+
|**`speed?: number`** <br /> Defaults to `1.2`| React DOM<br/>React Native | Animation speed in seconds. |
117
+
|**`interval?: number`** <br /> Defaults to `0.25`| React DOM<br/>React Native | Interval of time between runs of the animation, <br/>as a fraction of the animation speed. |
118
+
|**`viewBox?: string`** <br /> Defaults to `undefined`| React DOM<br/>React Native | Use viewBox props to set a custom viewBox value, <br/>for more information about how to use it, <br/>read the article [How to Scale SVG](https://css-tricks.com/scale-svg/). |
119
+
|**`gradientRatio?: number`** <br /> Defaults to `1.2`| React DOM only | Width of the animated gradient as a fraction of the view box width. |
120
+
|**`gradientDirection?: string`** <br /> Defaults to `left-right`| React DOM only | Direction in which the gradient is animated. Useful to implement top-down animations |
|**`backgroundColor?: string`** <br /> Defaults to `#f5f6f7`| React DOM<br/>React Native | Used as background of animation. |
123
+
|**`foregroundColor?: string`** <br /> Defaults to `#eee`| React DOM<br/>React Native | Used as the foreground of animation. |
124
+
|**`backgroundOpacity?: number`** <br /> Defaults to `1`| React DOM only | Background opacity (0 = transparent, 1 = opaque)<br/>used to solve an issue in [Safari](#safari--ios)|
125
+
|**`foregroundOpacity?: number`** <br /> Defaults to `1`| React DOM only | Animation opacity (0 = transparent, 1 = opaque)<br/>used to solve an issue in [Safari](#safari--ios)|
126
+
|**`style?: React.CSSProperties`** <br /> Defaults to `{}`| React DOM only ||
127
+
|**`uniqueKey?: string`** <br /> Defaults to random unique id | React DOM only | Use the same value of prop key, <br/>that will solve inconsistency on the SSR, see more [here](https://github.com/danilowoz/react-content-loader/issues/78). |
127
128
128
129
See all options [live](https://danilowoz.com/react-content-loader/)
0 commit comments