跳至正文
OpenAgentSkill
浏览已开放 · 目录记录日期 2026-11-21 · 自动更新和账户服务暂时关闭。
视频与音频

fluid-components

Use when the project depends on @usefluid/motion or the user names Fluid, and they want to add, choose or adapt a Fluid piece (Metamorph, Pet, Bot, Segmented Picker, Spring Switch, Morph Dialog, Splash...). Not for animation with other libraries (Framer Motion, GSAP, CSS) or projects without Fluid.

useFluid · 已有静态检查记录

安装与使用

运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。

npx skills add useFluid/fluidui --skill fluid-components

技能说明


name: fluid-components description: Use when the project depends on @usefluid/motion or the user names Fluid, and they want to add, choose or adapt a Fluid piece (Metamorph, Pet, Bot, Segmented Picker, Spring Switch, Morph Dialog, Splash...). Not for animation with other libraries (Framer Motion, GSAP, CSS) or projects without Fluid.

Fluid components

Fluid pieces are React components copied into the project, all made from one motion: outlines that flow on real springs. Use them where the motion means something: a state changed, something opened, something arrived.

Before you start

  • No --fluid-* theme in the project yet? Do fluid-brand first.
  • @usefluid/motion missing from package.json? Install it: npm i @usefluid/motion.
  • Works in Next.js (App Router or Pages), Vite and Remix. Pieces start with "use client" and use CSS Modules.

Pick the piece

The product needsPiece
A window that opens from a card or buttonmorph-dialog
A mobile menumenu-morph
A filter or a view switch over one listsegmented-picker
Tabs that switch panels, with countspill-tabs
An on and off settingspring-switch
Main and secondary buttonsspring-button
A submit that takes a momentmorph-button
A notice after an actionisland-toast
Copy a code or linkcopy-morph
A loading statemorph-loader
Open and close, play and pause iconsicon-morph
A quick action that opens a small panelmorph-island
A changing word in a headingword-cycle
A heading that arrives letter by lettertext-reveal
A route or screen change with the brandlogo-wipe (LogoCurtain for routes)
The logo arrivingshape-morph
An openingsplash-shapes, splash-choice, splash-dots (see the fluid-splash skill)
A mascot or assistantpet, bot (see the fluid-characters skill)

npx @usefluid/cli list prints all of them.

Steps

1. Add

npx @usefluid/cli add morph-dialog segmented-picker

Files land in src/components/fluid/<piece>/ (or components/fluid/, or --dir), with any piece they use.

2. Read the piece's README

Every piece folder has a README.md with its props, an example, and what keyboard and screen reader users get. Read it before wiring the piece. Do not guess props.

3. Wire it to real state

Drive pieces from the product's real data and events: the real request for morph-button, the real filter for segmented-picker. Remove every sample text.

Check: with the keyboard only, at 320 px wide, in light and dark mode, and with reduced motion on, every state can be reached and read.

Rules

  • Controls never animate by themselves. Characters may breathe and blink; pass still where nothing should move.
  • Colours come from the --fluid-* variables only.
  • One showpiece per screen.
  • The pieces are the project's code: change them freely, and keep them accessible.

Common mistakes

MistakeFix
from={ref.current} on MorphDialog, or clearing from on closeKeep open and from in separate state and leave from set while it closes
LogoWipe around App Router childrenUse LogoCurtain and useCurtain: cover, navigate, uncover on the new path; skip the curtain for the current path (see its README)
MenuMorph links reload the whole page in Next.jsGive each item onSelect: () => router.push(href) as well as href
pill-tabs for a filtersegmented-picker is the right semantics for a filter
word-cycle looping in the productloop={false}
A Bot with no way to typePass your input as its children

Building something no piece covers? Use fluid-metamorph.