Skip to content

feat: add HeaderMotion.SubHeader for tab-local sticky subheaders - #24

Closed
centricity-kashifshaikh wants to merge 2 commits into
pawicao:mainfrom
centricity-kashifshaikh:feat/subheader-component
Closed

feat: add HeaderMotion.SubHeader for tab-local sticky subheaders#24
centricity-kashifshaikh wants to merge 2 commits into
pawicao:mainfrom
centricity-kashifshaikh:feat/subheader-component

Conversation

@centricity-kashifshaikh

Copy link
Copy Markdown

Summary

  • adds HeaderMotion.SubHeader compound component
  • supports scrollId, dynamic height measurement, optional height hint, and topInset
  • auto-applies scrollable offset integration (header + subheader + topInset)
  • adds dedicated examples: subheader-flatlist and subheader-pager

Why

Validation

  • yarn typecheck
  • manual validation in both new example screens

Closes #21

@pawicao

pawicao commented Aug 15, 2026

Copy link
Copy Markdown
Owner

Thank you for the substantial work here, examples included, which I appreciate.

As I described in the issue itself, after review, I've decided not to take this into the library. The main reason is conceptual: the low-level API makes no assumptions about how the header animates. SubHeader has to assume one: it computes its top from originalHeaderHeight - progress × threshold, which only holds for the standard translate collapse. A header with a custom motion would leave the sub-header in the wrong place, and that's a problematic contract.

The use case itself is real, and the v2 high-level API (#27) is where I'd like to solve it properly, likely as a per-tab pinned concept. Until then, the userland pattern from #21 (absolute position + useMotionProgress + extra content padding) covers it.

Closing, but genuinely thank you for engaging with the library.

@pawicao pawicao closed this Aug 15, 2026
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.

Sticky element inside tab (not header) support

2 participants