rit3zh GitHub avatar

expo-morphing-menu

rit3zh

一个形态变化、感知键盘的 React Native 作曲器和选择菜单,将输入栏平滑动画为菜单表面。

Stars

119

7 天增长

暂无数据

Fork 数

10

开放 Issue

0

开源协议

MIT

最近更新

2026-07-12

AI 仓库情报摘要
FR-AI / ANALYSIS

为什么值得关注

它提供了一种新颖的 UI 模式,作曲器通过弹簧驱动动画无缝变形为菜单,实时跟随键盘位置,并支持多面板导航和单图像形态变化效果。

适合谁使用

  • 构建聊天或社交应用的 React Native 开发者
  • 使用 Expo SDK 57 并需要高级输入菜单的用户
  • 寻找动画菜单灵感的 UI 组件库维护者
  • 需要键盘感知附件选择器的移动应用开发者

典型使用场景

  • 构建包含照片、相机和文件附件的作曲器
  • 创建可扩展为选择菜单的形态变化输入栏
  • 实现具有多个工具选项的 AI 聊天助手输入
  • 设计键盘上方吸附的底部输入 UI

项目优势

  • 弹簧驱动的形态变化平滑过渡宽度、高度、圆角和位置
  • 通过 react-native-keyboard-controller 实时跟随键盘,避免悬浮或重叠
  • 多面板导航在项目列表和内容面板之间变形
  • TypeScript 优先,提供完全类型化的表面和钩子

使用前须知

  • 与 Expo SDK 57 及特定原生依赖紧密耦合
  • 固定 Content 高度在键盘弹出时可能溢出,需谨慎使用
  • 作为模板仓库提供,而非独立的 npm 包

README 快速开始

expo-morphing-menu

A morphing, keyboard-aware composer + picker menu for React Native.

✨ Features

  • 🫧 Morphing presentation — a single spring machine drives the composer's width, height, corner radius, and position together, so the input bar grows into the menu surface instead of a separate sheet sliding up
  • ⌨️ Keyboard-following via react-native-keyboard-controller — the surface reads live keyboard height and stays glued above it as it opens and closes
  • 🧭 Multi-panel navigation — register rows (Camera, Photos, Files, Plugins…) and matching panels; open(id) morphs the surface to that panel and back() returns to the item list
  • 🖼️ Single-image morph — tapping a photo runs a shared-element morph from its grid cell into an attachment thumb, coordinated through the root via reportFrame / run
  • 🧠 TypeScript-first, fully typed surface

⚙️ Installation

git clone https://github.com/rit3zh/expo-morphing-menu
cd expo-morphing-menu
bun install
bun start -c

Core dependencies (already wired up in this template):

bun add react-native-reanimated react-native-gesture-handler \
  react-native-safe-area-context react-native-keyboard-controller \
  expo-symbols expo-glass-effect expo-image expo-document-picker

Expo SDK 57. Read the exact versioned docs at https://docs.expo.dev/versions/v57.0.0/ before changing native code.


🚀 Usage

Wrap your app once with KeyboardProvider, then compose a `` at the bottom of your screen.

// app/_layout.tsx
import { KeyboardProvider } from "react-native-keyboard-controller";
import { Stack } from "expo-router";

export default function RootLayout() {
  return (
    
      
    
  );
}

The simplest composer — a placeholder, one trigger, one menu item:

import { BottomInput } from "@/components/bottom-input";
import { SymbolView } from "expo-symbols";

export function Composer() {
  return (
    
      
        
      

      
        }
        />
      

      
        {/* your panel here */}
      
    
  );
}

Preview

https://github.com/user-attachments/assets/15abbea3-644f-4680-8795-4d16182a70ec

Controlling open state

Pass open / onOpenChange to drive the menu from outside (e.g. to prefetch the photo library the moment it opens):

const [menuOpen, setMenuOpen] = useState(false);

}
>
  {/* …

项目描述

🗂️ A morphing, keyboard-aware composer + picker menu.

相关仓库与替代方案

根据分类、Topic 和编程语言匹配的相似项目。

TanStack
精选
TanStack GitHub avatar

router

TanStack Router is a type-safe, data-driven React router with built-in caching, prefetching, and nested layouts, while TanStack Start extends it into a full-stack SSR framework.

Web 开发前端框架
14,861
vercel-labs
精选
vercel-labs GitHub avatar

scriptc

scriptc compiles ordinary TypeScript into small, fast native executables without needing Node.js, V8, or any JavaScript runtime in the binary.

开发者工具代码质量与构建
1,985
Jakubantalik
精选
Jakubantalik GitHub avatar

thinking-orbs

A React component library that renders six hand-tuned animated thought orb loading indicators on a plain 2D canvas, with two purpose-tuned sizes and automatic theme detection for AI and agent UIs.

AI 与机器学习AI 智能体
1,191