feat: add trailing action slot to Collapsible - #10
Open
codingwolf-at wants to merge 4 commits into
Open
Conversation
- Introduced `trailing` prop to `Collapsible` for rendering a header-end control as a sibling to the trigger. - Added `CollapsibleHeader` and `CollapsibleTriggerTrailing` components for improved structure and styling. - Updated stories to demonstrate new trailing action functionality, including interaction tests for the trailing button. - Enhanced documentation to reflect the new features and usage examples.
…n details - Added documentation for the new `trailing` prop, allowing for a header-end control. - Updated examples to demonstrate the usage of `CollapsibleHeader` and `CollapsibleTriggerTrailing`. - Clarified the behavior of the trailing control and its interaction with the Collapsible component.
`trailing != null` still rendered `CollapsibleTriggerTrailing` for `trailing={false}`
(e.g. `cond && <IconButton/>`), adding an empty end-padded box to the header row.
codingwolf-at
force-pushed
the
feat/collapsible-trailing-action
branch
from
August 28, 2026 17:27
7777af8 to
0b3d2e6
Compare
codingwolf-at
marked this pull request as ready for review
August 28, 2026 17:28
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Collapsibleheaders can take a trailing action (for example an addIconButton) on the opposite side of the label/chevron cluster.The control is a sibling of the trigger, not nested inside it — nested buttons are invalid, and clicking the action must not toggle the panel. Pass it on the ready-made as
trailing. Atomic assemblies wrap the trigger inCollapsibleHeaderand put the control inCollapsibleTriggerTrailing.The trigger still packs
[icon?][title][chevron]on the start; leftover space stays the toggle hit target. Rootdisableddoes not disable the trailing control.Type of Change
Screenshots and Media (if applicable)
Test Scenarios
Collapsiblewithtrailing(e.g. ghost+IconButton): label + chevron stay clustered on the start, action sits at the inline-enddisabled: trigger will not toggle; trailing action still works unless you disable that control too