Skip to content

[Feature]: Skeleton should have size and shape props #31664

@ValentinaKozlova

Description

@ValentinaKozlova

Library

React Components / v9 (@fluentui/react-components)

Describe the feature that you would like added

This is a follow up issue from this discussion: #31608 (comment)

Currently SkeletonItem accepts size and shape props. But if there are many items with the same values, it would be easier to set those to the parent component Skeleton.

What needs to be added:
It should be possible to pass size and shape props both from the parent component Skeleton and from SkeletonItem.

Current API

// the same for shape
<Skeleton>
   <SkeletonItem size={24} shape="rounded" />
   <SkeletonItem size={24} shape="rounded" />
   <SkeletonItem size={24} shape="rounded" />
 </Skeleton>

Proposed API

<Skeleton size={24}  shape="rounded"> 
  <SkeletonItem />
  <SkeletonItem />
  <SkeletonItem />
</Skeleton>

[edited: @mainframev]

Have you discussed this feature with our team

No

Additional context

No response

Validations

  • Check that there isn't already an issue that request the same feature to avoid creating a duplicate.

Priority

Low

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions