Skip to content

feat: add typed leading and trailing slots to List.Item - #5042

Draft
adam-sajko wants to merge 5 commits into
callstack:mainfrom
adam-sajko:feat/list-typed-slots
Draft

feat: add typed leading and trailing slots to List.Item#5042
adam-sajko wants to merge 5 commits into
callstack:mainfrom
adam-sajko:feat/list-typed-slots

Conversation

@adam-sajko

@adam-sajko adam-sajko commented Aug 7, 2026

Copy link
Copy Markdown

Motivation

#4930 wants explicit slots instead of layout tied to render props. Right now left and right hand the caller a style object and a color and trust them to apply both, so List.Item does not really own its own layout.

Related issue

Related to #4930 and #4976

Draft, blocked on #5018. Two things I would like your call on:

  1. This is additive on purpose so it stays out of the way of refactor: replace React.Children usage to more composition-friendly alternatives (#4989) #5018, which changes how List.Item handles left and right. Since v6 alpha allows breaking changes without deprecation aliases, should the final version just drop left and right?
  2. Is leading and trailing the naming you want, or leadingAccessory and trailingAccessory, or one slots object?

Stacked on the three line padding PR for later. These are stacked, and since a fork branch cannot be used as the base of a cross fork PR, the commits from the PRs below are shown here until they are merged.

Test plan

Unit tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant