Proposal: Improve Skeleton with component-aware support for Image, Text, Anchor and Badge #8784
sc30gsw
started this conversation in
Feature requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I would like to propose an improvement to
Skeletonin@mantine/core.I have been exploring a layout-aware skeleton approach where wrapping real content with
Skeletonpreserves layout and automatically renders loading placeholders.This works well for text-like content, but generic CSS-based skeletonization has limitations for media and component-specific elements. For example, images and avatars can be hidden, but they do not automatically become meaningful placeholders with the correct shape.
Because of that, I would like to explore a component-aware approach for selected Mantine components, similar in spirit to how some other design systems handle skeleton states.
Initial scope
ImageTextAnchorBadgeWhy this approach
SkeletonReference
As a reference point, React Spectrum supports skeleton-aware behavior for several design system components such as
Image,Text,Link, andBadge.That is close to the direction I had in mind here: instead of relying only on generic CSS selectors, selected Mantine components could respond to
Skeletoncontext and render more appropriate loading states while preserving layout.Reference:
https://react-spectrum.adobe.com/Skeleton
Questions
Skeletonbehavior be acceptable for selected core components?Skeleton, or as a separate API/pattern?If this direction makes sense, I would be happy to prepare a focused PR with a minimal first iteration.
Beta Was this translation helpful? Give feedback.
All reactions