跳转到正文
jolt.
← 动效配方

触控与手势 / iOS / NATIVESCRIPT VUE

一切自然衔接。

拖动、滚动、跟随键盘的底部面板。

原生录屏 · iOSiOS 26 模拟器 · 真实 XCTest 输入与原生播放,原始速度。并非真机性能测试。

动效背后的代码。

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()
查看完整示例 ↗

阅读完整指南 ↗