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: Add customizable highlight and animation to Skeleton
- Introduces new props to Skeleton and SkeletonTheme components: baseColor, highlightColor, animationDirection, and customHighlightBackground, allowing for more flexible skeleton loading animations.
- Updates documentation to reflect these changes, revises styles to use CSS variables for color and animation, and bumps package version to 2.0.0 to indicate breaking or significant new features.
| width |`string``number`| Set component `width`, it can be either number `px` or string with its corresponding css value |`100%`|
174
+
| height |`string``number`| Set component `height`, it can be either number `px` or string with its corresponding css value |`inherit`|
175
+
| borderRadius |`string``number`| Set component `border-radius`, it can be either number `px` or string with its corresponding css value |`0.25rem`|
176
+
| baseColor |`string`| Set component `background-color`|`#ebebeb`|
177
+
| highlightColor |`string`| Set component `background-image` highlight color animation |`#ebebeb`|
178
+
| animationDuration |`number`| Set component `animation-duration` in seconds |`#f5f5f5`|
179
+
| animationDirection |`normal``reverse`| Set component animation direction `normal` (left to right) or `reverse` (right to left) |`normal`|
180
+
| enableAnimation |`boolean`| Set component animation status `running` or `paused`|`true`|
181
+
| inline |`boolean`| Set component inline behavior |`false`|
182
+
| customHighlightBackground |`string`| Override the `background-image` property of the highlight element, enabling you to fully customize the gradient. |`undefined`|
183
+
184
+
#### Custom Highlight Background
185
+
186
+
You may want to make the gradient used in the highlight element narrower or wider. To do this, you can set the
187
+
customHighlightBackground prop. Here's an example of a narrow highlight:
0 commit comments