Support fixed position for prototypes

Author: macintoshhelperCreated May 5, 2020Updated May 5, 2020
Labelsenhancement

I am...

| -------------------------------------------------------------------------------------------------

Requesting a new feature

Proposal/Feature-request:

Would be great to support some kind of version of position: fixed; to be used in Sketch prototypes. Fixed position translates nicely to Sketch's Fix position when scrolling. This would allow for having bottom navigation tab bars, etc in prototypes.

React Native doesn't support position: fixed; though, so if the same component/styling is used in a React Native app, it may break it. Some alternative ideas that should solve that:

  • Create a new react-sketchapp only styling prop: e.g. prototypePosition: 'fixed'
  • Use position: 'fixed', but document that this could be platform specific (`position: Platform.OS === 'sketch' ? 'fixed' : 'relative')
  • Implement a new ScrollView component, and have an Artboard prop that makes anything not inside this component fixed. Not sure how much value this would have though for code re-use between web and React Native though when components like FlatList are more likely to be used.