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
* feat(api): updates background and foreground
BREAKING CHANGE: Rename `primaryColor` to `backgroundColor` and `secondaryColor` to
`foregroundColor`.
* feat(api): updates uniqueKey
BREAKING CHANGE: Renamed prop key `uniquekey` to `uniqueKey`
* fix(svg): removes unnecessary keys
* fix(web svg): adds display name
* feat(a11y): improves attrs
BREAKING CHANGE: Shift `ariaLabel` to `title` prop, the value remains
* refactor(codebase): reestructure
* test(web native): updates with new structure
* test(native): sets animate false on tests
* fix(svg): removes viewBox, width and height from api
* fix(presets): updates to new api and some design updates
* feat(content loader): sets new default as facebook instead of a box
* docs(readme storybook): updates to new api
* test(web native): updates
Defaults to `true`. Opt-out of animations with `false`
117
117
118
-
#### **`ariaLabel?: string`** - _Web only_
118
+
#### **`title?: string`** - _Web only_
119
119
120
120
Defaults to `Loading interface...`. It's used to describe what element it is. Use ''(empty string) to remove.
121
121
@@ -126,61 +126,45 @@ Defaults to an empty string. This prop is common used as: `<ContentLo
126
126
127
127
#### **`speed?: number`**
128
128
129
-
Defaults to `2`. Animation speed in seconds.
129
+
Defaults to `1.2`. Animation speed in seconds.
130
130
131
131
#### **`interval?: number`** - _Web only_
132
132
133
133
Defaults to `0.25`. Interval of time between runs of the animation, as a fraction of the animation speed.
134
134
135
-
#### **`className?: string`**
136
-
137
-
Defaults to an empty string. The classname will be set in the `<svg />` element.
138
-
139
-
#### **`width?: number`**
140
-
141
-
Defaults to `400`. It will be set in the viewbox attr in the `<svg />`.
142
-
143
-
#### **`height?: number`**
144
-
145
-
Defaults to `130`. It will be set in the viewbox attr in the `<svg />`.
146
-
147
135
#### **`viewBox?: string`**
148
136
149
-
Use viewBox props to set a custom viewBox value. Additionally, pass viewBox props as empty string to remove viewBox.
137
+
Use viewBox props to set a custom viewBox value, for more information about how to use it, read the article [How to Scale SVG](https://css-tricks.com/scale-svg/).
150
138
151
139
#### **`gradientRatio?: number`** - _Web only_
152
140
153
-
Defaults to `2`. Width of the animated gradient as a fraction of the viewbox width.
141
+
Defaults to `1.2`. Width of the animated gradient as a fraction of the viewbox width.
154
142
155
143
#### **`rtl?: boolean`**
156
144
157
145
Defaults to `false`. Content right-to-left.
158
146
159
-
#### **`preserveAspectRatio?: string`**
160
-
161
-
Defaults to `xMidYMid meet`. Aspect ratio option of `<svg/>`. See the available options [here](https://github.com/danilowoz/react-content-loader/blob/master/src/interface.ts#L7).
162
-
163
-
#### **`primaryColor?: string`**
147
+
#### **`backgroundColor?: string`**
164
148
165
-
Defaults to `#f3f3f3` which is used as background of animation.
149
+
Defaults to `#f5f6f7` which is used as background of animation.
166
150
167
-
#### **`secondaryColor?: string`**
151
+
#### **`foregroundColor?: string`**
168
152
169
-
Defaults to `#ecebeb` which is used as the foreground of animation.
153
+
Defaults to `#eee` which is used as the foreground of animation.
Defaults to `1`. Animation opacity (0 = transparent, 1 = opaque) used to solve a issue in [Safari](#safari--ios)
178
162
179
163
#### **`style?: React.CSSProperties`**
180
164
181
165
Defaults to an empty object.
182
166
183
-
#### **`uniquekey?: string`** - _Web only_
167
+
#### **`uniqueKey?: string`** - _Web only_
184
168
185
169
Defaults to random unique id. Use the same value of prop key, that will solve inconsistency on the SSR, see more [here](https://github.com/danilowoz/react-content-loader/issues/78).
@@ -306,21 +287,21 @@ Commit messages should follow the [commit message convention](https://con
306
287
307
288
##### **Alpha is not working: Safari / iOS**
308
289
309
-
When using `rgba` as a `primaryColor` or `secondaryColor` value, [Safari does not respect the alpha channel](https://github.com/w3c/svgwg/issues/180), meaning that the color will be opaque. To prevent this, instead of using an `rgba` value for `primaryColor`/`secondaryColor`, use the `rgb` equivalent and move the alpha channel value to the `primaryOpacity`/`secondaryOpacity` props.
290
+
When using `rgba` as a `backgroundColor` or `foregroundColor` value, [Safari does not respect the alpha channel](https://github.com/w3c/svgwg/issues/180), meaning that the color will be opaque. To prevent this, instead of using an `rgba` value for `backgroundColor`/`foregroundColor`, use the `rgb` equivalent and move the alpha channel value to the `backgroundOpacity`/`foregroundOpacity` props.
0 commit comments