So you’re saying all your elements don’t expect the same data attributes? How would you do it in a type-safe way in typescript?
My advice would be to override the element attributes with all the data attributes you expect to use, then wrap those lowercase components inside uppercase components that only expect the right data attributes for the given lowercase component.
This way you’d have good DX and type-safety with a minimal runtime overhead.
Don’t hesitate to reply if this doesn’t solve your problem.