Skip to content
orocoaPublic

About

42 open-source UI motion effects with runnable React/TypeScript examples, configs and bilingual docs. Browse, tune and export online. 随形:42 个开源 UI 动效,在线预览、调参和导出。

Topics

Resources

Contributing

Stars

9 stars

Watchers

0 watching

Forks

Repository files navigation

TuneShape · 随形

English · 简体中文

Explore UI motion, adjust it live, and take the settings into your project.

TuneShape is a browser tool for designers and developers to try UI effects and adjust how they look and behave. Browse the catalog, compare your changes with the preset, then export the configuration or copy an implementation prompt. The interface is available in English and Chinese.

Live demo · Browse → Tune → Export

Live TuneShape workflow with Chinese and English captions: browse the catalog, change a glass folder's color and size, preview the result, and export JSON

About 15 seconds, recorded from the live website. The example adjusts Glass Folder's color, size, and card spread, then exports its current configuration.

Try an effect in three steps

  1. Browse — Choose an effect by category or search for its Chinese or English name. Try the interaction in its catalog card.
  2. Tune — Open the effect, change its parameters, and compare the current settings with the preset.
  3. Reuse — Export the JSON configuration or copy the implementation prompt to continue in your own project.

Explore the collection

TuneShape online editor: selected UI effects, a before-and-after preview, and parameter controls

The overview shows the online editor. The local examples included in this repository are described below.

What you can do on the website

Task Available tools
Find an effect Categories for controls, navigation, containers, text, images, indicators, and backgrounds; Chinese and English search
Adjust the result Effect-specific controls for content, appearance, timing, easing, and motion
Compare behavior Preset and current-setting previews, playback controls, and observation speed
Bring it into a project JSON import/export, motion specifications, implementation prompts, offline HTML, and standalone reproduction projects

The editor supports pointer, keyboard, and touch interactions, with reduced-motion behavior. Available controls and interactions vary by effect.

Export JSON before refreshing or leaving the page: effect parameters are kept for the current page session. Playback progress and observation speed are tool state rather than saved effect settings.

Try your own settings on TuneShape →

About this repository

Rendering source for all 46 effects in the visible catalog is public. Each includes a default configuration, runnable page, and English/Chinese documentation. Run the examples · Machine-readable catalog · Effect guides

git clone https://github.com/orocoa/TuneShape.git
cd TuneShape/effects
pnpm install --frozen-lockfile
pnpm dev
Effect ID English 中文
basic-button Button Press Feedback 按钮按压反馈
hover-invert Hover Color Transition 悬停配色过渡
duration-picker Duration Picker 时长选择器
glass-radio Glass Segmented Radio Control 玻璃分段单选
dropdown Dropdown Menu 下拉菜单
folder Folder 文件夹
glass-folder Glass Folder 磨砂文件夹
scroll-progress Scroll Progress 阅读进度胶囊
hook-sidebar Hook Sidebar 钩线侧栏
rail-toc Rail TOC 纸飞机目录
card-morph Card Expansion 卡片展开
gooey-wordmark Gooey Wordmark 液态交互字标
typewriter-text Typewriter Text 逐字打出
soft-blur-in Soft Blur In 柔焦入场
short-slide-down Short Slide Down 落词堆叠
kinetic-center-build Kinetic Center Build 居中推词
period-drop Period Drop 句点弹落
outline-trace Outline Trace 字形描边
glyph-anatomy Glyph Anatomy 字形构建
encrypted-text Encrypted Text 逐字解码
gooey-input Gooey Input 黏性搜索输入
flip-words Flip Words 词语翻替
soap-bubble Soap Bubble UI 肥皂泡控件
coffee-selector Selector 选择器
rounded-checks Rounded Checkboxes 圆角复选框
mini-sidebar Page Navigation 页面导航
text-rise Staggered Character Reveal 文字逐字上移揭示
text-scramble Local Text Scramble and Recovery 局部字符扰动与恢复
glyph-wall Glyph Decode Wall 文字解码墙
hover-preview Hover Preview 文字悬停图片
liquid-carousel Liquid Image Carousel 液态图片轮播
album-rail Album Rail 唱片轨道
orbit-reel Orbit Reel 卡片转轮
elastic-reel Elastic Reel 弹性相片卷
dots Staggered Loading Dots 三点交错跳动
finger-tap Finger Tapping 手指敲击
typewriter Typewriter 打字机
yin-yang Yin Yang Loader 太极加载
pulse Pulse Scale and Ripple 脉冲缩放与扩散
watercolor Watercolor Blend 水彩融合
watercolor-original Watercolor Original 水彩模糊
watercolor-flow Watercolor Flow 细度水彩融合
ascii-sharks ASCII Sharks ASCII 鲨鱼群
particle-tide Particle Tide 粒子海浪
topographic-flow Topographic Flow 流动等高线
ascii-wave ASCII Wave Animation ASCII 波形动画

The effect package uses the same rendering components as the website. The full website editor, deployment configuration, and work records are outside this package. The original three React basic examples and standalone ASCII Shoal module remain available; their setup is preserved below.

Local setup, example configuration, and source guide

Examples

Example Interaction Configuration Prompt
Button press feedback Press and release with a pointer, Space, or Enter button.json button.md
Tab transitions Switch panels with a pointer or arrow keys; Home and End are supported tabs.json tabs.md
In-page dialog Open, close, or dismiss with Escape; focus returns to the trigger modal.json modal.md

The dialog demonstrates an entrance and exit inside the preview area. It uses aria-modal="false" and does not trap focus across the application.

ASCII Shoal background

examples/ascii-shoal/ is a standalone JavaScript Canvas background with swimming silhouettes, small fish, configurable ASCII sampling density, glyph size, palette, and playback. It has no runtime dependencies and does not require the React examples to be installed.

The implementation uses newly authored shapes and motion paths, applying the grid-and-character approach used by TuneShape's ASCII wave effect. Its source and implementation notes are included in the example. See the example README for local preview, embedding, configuration, and lifecycle controls.

cd examples/ascii-shoal
npm run dev
# Stop the preview server before running the following commands.
node --test test/*.test.mjs
npm run build

The build writes the standalone demo to examples/ascii-shoal/dist/. The root commands below continue to operate on the three React examples.

Quick start

Requirements

  • Node.js 22.12 or later. CI runs on Node.js 24.
  • pnpm 11.x. Use the exact version declared in package.json under packageManager.

Install and run

git clone https://github.com/orocoa/TuneShape.git
cd TuneShape
pnpm install --frozen-lockfile
pnpm dev

Open the local URL printed by Vite. If you downloaded a release ZIP, extract it and run the last two commands from the directory containing package.json.

Package installation requires access to the package registry. Once dependencies are installed, the examples run locally without an account, API key, database, or connection to the TuneShape website.

Commands

Command Purpose
pnpm dev Start the local development server
pnpm test Run configuration, validation, and interaction-contract tests
pnpm build Run TypeScript checks and create the static production build in dist/
pnpm preview Preview an existing production build locally

Build before running pnpm preview. Deploy the contents of dist/ to a static web host.

Configure an example

Select button, tabs, or modal in the demo to load its defaults. To apply an exact configuration:

  1. Open Edit the exact configuration.
  2. Paste a complete configuration from configs/ or a schema version 1 export from the online editor.
  3. Select Apply configuration.

The configuration includes the component type, so applying it selects the corresponding example. You can also edit config.json before starting or building to set the initial example. Selecting another example in the navigation loads that example's defaults.

Supported settings include tween and spring transitions, delay, easing, transform values, and physical spring parameters. Invalid or incompatible configurations are rejected with a validation message. The playback control supports pause and resume; the examples respond to live prefers-reduced-motion changes.

Reproduce an example with its Prompt

Each file in prompts/ contains the interaction rules, exact JSON configuration, and Motion state and transition contract for the corresponding example in configs/.

  1. Choose the matching configuration and Prompt from the table above.
  2. Use the Prompt together with this repository's implementation and supporting modules.
  3. Apply the Prompt's Exact configuration to the demo or save it as config.json.
  4. Run pnpm test and pnpm build.
  5. Check pointer and keyboard input, repeated input, animation interruption, pause/resume, and reduced motion in the browser.

The included source and validated configuration define the reference behavior. AI-generated implementations should be checked against that contract; natural-language input alone does not guarantee identical generated code. The examples reproduce the basic interaction and parameters using the simplified styling in this package.

Source guide

Path Responsibility
src/main.tsx Demo navigation, JSON editor, and playback controls
src/Preview.tsx Button, tabs, and dialog rendering and interaction
src/model.ts Configuration validation, state mapping, and Motion specifications
src/easing.ts Easing validation and evaluation
src/useDetailPlayback.ts Playback state and animation-clock control
src/usePrefersReducedMotion.ts Live system motion-preference handling
src/model.test.ts Configuration round trips, boundaries, and interaction contracts
src/style.css System-font demo styling and responsive layout
configs/ / prompts/ Matching configuration snapshots and implementation Prompts

Release integrity

GitHub release archives include SOURCE_MANIFEST.json, which records the exported files, byte lengths, and SHA-256 hashes. Its own hash is excluded to avoid a circular digest. Each release also provides SHA256SUMS.txt for its ZIP archive.

Download the ZIP and checksum file into the same directory, then verify the archive:

# macOS
shasum -a 256 -c SHA256SUMS.txt
# Linux
sha256sum -c SHA256SUMS.txt

The manifest describes the published snapshot. Local edits to a listed file will change its hash.

Feedback and contributing

For a bug or an effect request, open an issue. Include the effect name, browser or device, steps to reproduce, and the result you expected. Issues and pull requests may be written in English or Chinese.

For changes to the included source, see CONTRIBUTING.md. Published versions are listed under Releases. Maintained by orocoa.

License

The source code and documentation published in this repository are available under the MIT License. Third-party dependencies and materials shown in website previews retain their respective licenses; the website preview does not grant rights to third-party assets.

About

42 open-source UI motion effects with runnable React/TypeScript examples, configs and bilingual docs. Browse, tune and export online. 随形:42 个开源 UI 动效,在线预览、调参和导出。

Topics

Resources

Contributing

Stars

9 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages