触控与手势 / iOS / NATIVESCRIPT VUE
一切自然衔接。
拖动、滚动、跟随键盘的底部面板。
动效背后的代码。
Jolt 0.1.0-rc.11直接来自指南的核心 API 示例。完整界面与控件请查看完整演示。
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()