TOUCH & GESTURES / iOS / NATIVESCRIPT VUE
It all comes together.
A sheet that drags, scrolls and follows the keyboard.
The motion behind it.
Jolt 0.1.0-rc.11The core API example, taken directly from the guide. Use the full demo for the surrounding interface and controls.
TypeScript · NativeScript
import { bottomSheet } from '@rafaelaugusto/jolt/bottom-sheet'
import { motionScope } from '@rafaelaugusto/jolt'
const scope = motionScope()
const sheet = scope.add(
bottomSheet(panel, {
handle,
scrollView: results,
snap: ['content', '50%', '90%'],
backdrop,
returnFocus: openButton,
keyboard: 'follow',
}),
)
sheet.open('50%')
sheet.expand() // Next larger resolved stop
sheet.collapse() // Next smaller stop, then dismiss
sheet.dismiss()
// On component destruction:
scope.dispose()