diff --git a/.changepacks/changepack_log_metro_reanimated.json b/.changepacks/changepack_log_metro_reanimated.json
new file mode 100644
index 000000000..8a0fc74f6
--- /dev/null
+++ b/.changepacks/changepack_log_metro_reanimated.json
@@ -0,0 +1,7 @@
+{
+ "changes": {
+ "packages/metro-plugin/package.json": "Patch"
+ },
+ "note": "`withDevupUI()` tells the compiler whether the project has react-native-reanimated, which runs `keyframes()` and the `animation*` and `transition*` props on React Native; without it, they are build errors asking to install it.",
+ "date": "2026-11-21T00:00:00.000Z"
+}
diff --git a/.changepacks/changepack_log_react_native_animations.json b/.changepacks/changepack_log_react_native_animations.json
new file mode 100644
index 000000000..3b0655f4d
--- /dev/null
+++ b/.changepacks/changepack_log_react_native_animations.json
@@ -0,0 +1,8 @@
+{
+ "changes": {
+ "bindings/devup-ui-binding/package.json": "Patch",
+ "bindings/devup-ui-wasm/package.json": "Patch"
+ },
+ "note": "`codeExtractNative` compiles `keyframes()` and the `animation*` and `transition*` props for React Native on react-native-reanimated (part of #411): `keyframes()` becomes the keyframes object Reanimated reads, and an element taking an animation or a transition renders Reanimated's animated component. It takes a new `reanimated` argument telling whether the app has react-native-reanimated; without it, these are build errors asking to install it. Web output is unchanged.",
+ "date": "2026-11-21T00:00:00.000Z"
+}
diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml
index e80a4d24d..577868727 100644
--- a/.github/workflows/publish.yml
+++ b/.github/workflows/publish.yml
@@ -14,6 +14,7 @@ on:
- feat/react-native-pressed
- feat/react-native-css
- feat/react-native-styled
+ - feat/react-native-states
# Pull requests and every job below run read-only. Only the `release` and
# `deploy-pages` jobs get write permissions, and they run on pushes to main
diff --git a/apps/expo/check-bundle.mjs b/apps/expo/check-bundle.mjs
index bc2d2a4c6..cffba661e 100644
--- a/apps/expo/check-bundle.mjs
+++ b/apps/expo/check-bundle.mjs
@@ -7,7 +7,8 @@
// runtime; src/Badge.tsx is styled the same in every theme and at every
// width, so it must not use the runtime. Its buttons take press styles, which
// React Native's `Pressable` applies through a function for `style`, and its
-// input a focus style, which the runtime's `Focused` applies.
+// input a focus style, which the runtime's `Focused` applies. Its card fades
+// in and its logo fades, which react-native-reanimated runs.
import { readdirSync, readFileSync } from 'node:fs'
import { join } from 'node:path'
@@ -124,6 +125,8 @@ for (const platform of ['ios', 'android']) {
'backgroundColor:"#4330d9"',
'StyleSheet',
'style:({pressed:',
+ 'animationName:',
+ 'transitionProperty:"opacity"',
]) {
if (!code.replaceAll(' ', '').includes(style)) {
failures.push(`${platform}/${file}: lacks ${style}`)
@@ -138,6 +141,9 @@ for (const platform of ['ios', 'android']) {
failures.push(`${platform}/${file}: bundles ${source}`)
}
}
+ if (!sources.some((source) => /react-native-reanimated/.test(source))) {
+ failures.push(`${platform}/${file}: lacks react-native-reanimated`)
+ }
if (!sources.some((source) => NATIVE_RUNTIME.test(source))) {
failures.push(`${platform}/${file}: lacks @devup-ui/react/native`)
}
diff --git a/apps/expo/package.json b/apps/expo/package.json
index 3a625f4e2..c9662f3d0 100644
--- a/apps/expo/package.json
+++ b/apps/expo/package.json
@@ -12,7 +12,9 @@
"@devup-ui/react": "workspace:^",
"expo": "~58.0.26",
"react": "^19.3.1",
- "react-native": "0.88.1"
+ "react-native": "0.88.1",
+ "react-native-reanimated": "~4.7.1",
+ "react-native-worklets": "0.13.0"
},
"devDependencies": {
"@devup-ui/metro-plugin": "workspace:^",
diff --git a/apps/expo/src/App.tsx b/apps/expo/src/App.tsx
index fb764ead4..56d362fdd 100644
--- a/apps/expo/src/App.tsx
+++ b/apps/expo/src/App.tsx
@@ -5,6 +5,7 @@ import {
Flex,
Image,
Input,
+ keyframes,
setTheme,
Text,
useTheme,
@@ -16,6 +17,12 @@ import { Badge } from './Badge'
/** The shape both buttons share */
const button = css({ borderRadius: '8px', px: 5, py: 3 })
+/** The card fading in, which react-native-reanimated runs */
+const fadeIn = keyframes({
+ from: { opacity: 0 },
+ to: { opacity: 1 },
+})
+
export function App() {
const [name, setName] = useState('')
const [count, setCount] = useState(0)
@@ -34,7 +41,10 @@ export function App() {
@@ -42,6 +52,8 @@ export function App() {
- raw.extractNative(filename, code, pkg, platform, runtime),
+ codeExtractNative: (filename, code, pkg, platform, runtime, reanimated) =>
+ raw.extractNative(filename, code, pkg, platform, runtime, reanimated),
createSession: () => raw.createSession(),
dropSession: (id) => raw.dropSession(id),
exportCanonicalMap: raw.exportCanonicalMap,
diff --git a/bindings/devup-ui-binding/index.d.cts b/bindings/devup-ui-binding/index.d.cts
index 2f4c38c59..2af3eb8fe 100644
--- a/bindings/devup-ui-binding/index.d.cts
+++ b/bindings/devup-ui-binding/index.d.cts
@@ -40,7 +40,9 @@ export function codeExtractWithoutSourceMap(
* Compile a source for React Native on `platform`: Devup UI elements become
* React Native components whose styles are hoisted into one
* `StyleSheet.create`. No CSS is emitted (`css` and `cssFile` are undefined);
- * `runtime: false` makes what needs the React Native runtime a build error.
+ * `runtime: false` makes what needs the React Native runtime a build error,
+ * and `reanimated: false`, telling the app lacks react-native-reanimated,
+ * makes animations and transitions one.
*/
export function codeExtractNative(
filename: string,
@@ -48,6 +50,7 @@ export function codeExtractNative(
packageName: string,
platform: 'ios' | 'android' | 'web',
runtime: boolean,
+ reanimated: boolean,
): Output
/** Create an engine session with a clean state; select it before each call. */
export function createSession(): number
diff --git a/bindings/devup-ui-binding/src/host.rs b/bindings/devup-ui-binding/src/host.rs
index e09c38712..47468d48d 100644
--- a/bindings/devup-ui-binding/src/host.rs
+++ b/bindings/devup-ui-binding/src/host.rs
@@ -287,8 +287,14 @@ pub fn extract_native(
package: String,
platform: String,
runtime: bool,
+ reanimated: bool,
) -> Result {
- core::code_extract_native((&filename, &code), &package, &platform, runtime)
- .map(|output| NativeOutput(Some(output)))
- .map_err(|error| binding_error(env, error))
+ core::code_extract_native(
+ (&filename, &code),
+ &package,
+ &platform,
+ (runtime, reanimated),
+ )
+ .map(|output| NativeOutput(Some(output)))
+ .map_err(|error| binding_error(env, error))
}
diff --git a/bindings/devup-ui-wasm/src/lib.rs b/bindings/devup-ui-wasm/src/lib.rs
index 8ec64beb5..e3e799f96 100644
--- a/bindings/devup-ui-wasm/src/lib.rs
+++ b/bindings/devup-ui-wasm/src/lib.rs
@@ -733,9 +733,9 @@ pub fn code_extract_native_internal(
code: &str,
package: &str,
platform: &str,
- runtime: bool,
+ (runtime, reanimated): (bool, bool),
) -> Result