FluidView
Explicit Reanimated layout-motion wrapper with opt-in presence transitions and Reduced Motion support.
FluidView adds motion to a normal View without taking ownership of application semantics. Use it when a wrapper's natural size or position should animate as surrounding React content changes.
Usage
import { FluidView } from "react-native-arc-ui";
<FluidView>
{showDetails ? <Details /> : null}
</FluidView>;Layout changes of the FluidView wrapper use an ARCUI-configured Reanimated LinearTransition.
What animates
FluidView is useful for layout changes such as:
validation rows appearing/disappearing
conditional form content
sibling repositioning
expandable content
natural dimension changesIt does not inspect, clone, or rewrite its children. Normal React Native layout remains intact; motion belongs to the wrapper.
Presence transitions
Entering/exiting are intentionally opt-in.
<FluidView entering exiting>
<Content />
</FluidView>true asks ARCUI to use the configured default entering/exiting transition. If global tokens.enteringExiting.enabled is off, there may be no default presence animation to apply.
Custom Reanimated transitions
You may provide Reanimated entry/exit transitions directly:
<FluidView entering={FadeInDown} exiting={FadeOutUp}>
<Content />
</FluidView>A custom transition is still suppressed when the system prefers Reduced Motion.
Layout motion vs presence motion
These are independent:
layout -> automatic FluidView size/position transition
entering -> optional mount transition
exiting -> optional unmount transitionYou can use layout motion without presence motion, which is the default behavior.
Native View surface
FluidView inherits ViewProps and supports React 19 ref-as-prop:
const ref = useRef<View>(null);
<FluidView ref={ref} testID="details-layout">
{children}
</FluidView>Use normal style, accessibility, responder, and layout props as you would on a View.
When not to use FluidView
FluidView is not:
- a theme-aware background primitive — use ThemedView;
- a semantic state owner;
- a reason to move application state into SharedValues;
- a replacement for every static
View.
If no meaningful layout/presence animation exists, a normal View is simpler.
Testing
testID targets the animated native root directly. FluidView does not create stable visual descendant IDs.
API Reference
Also inherits: ViewProps
| Prop | Type | Default | Description |
|---|---|---|---|
| children? | ReactNode | — | — |
| ref? | React.Ref<View> | — | React 19 ref-as-prop. Exposes the underlying native View for measurement and other standard React Native imperative APIs. |
| entering? | TFluidViewPresenceAnimation | false | Optional mount transition. true uses ARCUI's configured default entering transition. A Reanimated transition may be supplied for custom motion. |
| exiting? | TFluidViewPresenceAnimation | false | Optional unmount transition. true uses ARCUI's configured default exiting transition. A Reanimated transition may be supplied for custom motion. |
Generated from the ARCUI 1.1.x TypeScript source snapshot. Native inherited props remain available through the referenced React Native surface.
Motion
Layout transition configuration resolves from:
fluidViewAnimations
-> animations fallbackentering={true} / exiting={true} uses ARCUI's enteringExiting defaults. Reduced Motion wins over both default and custom non-essential transitions.
Performance
FluidView keeps semantic React state in React and delegates frame-level layout interpolation to Reanimated. Wrap only the layout boundary that needs movement rather than a very large subtree with no changing geometry.
Accessibility
FluidView does not alter child accessibility semantics. During an exit transition, the wrapper is still the same React Native view lifecycle; application semantics should continue to be modeled through React content/state, not animation progress.
Theming
FluidView has no color/theme presentation of its own. Relevant motion configuration is:
fluidViewAnimations
enteringExiting
animationsTry it live
Explore FluidView interactively in Expo Snack.
Open FluidView in Expo Snack ↗