diff --git a/.changepacks/changepack_log_metro_expo_web.json b/.changepacks/changepack_log_metro_expo_web.json
new file mode 100644
index 000000000..bd3611187
--- /dev/null
+++ b/.changepacks/changepack_log_metro_expo_web.json
@@ -0,0 +1,7 @@
+{
+ "changes": {
+ "packages/metro-plugin/package.json": "Patch"
+ },
+ "note": "Document Expo web (part of #411): Metro compiles the web build through react-native-web with the same output as iOS and Android, which the Expo example now exports and checks in Chromium.",
+ "date": "2026-11-21T00:00:00.000Z"
+}
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_metro_types.json b/.changepacks/changepack_log_metro_types.json
new file mode 100644
index 000000000..f255a5bc0
--- /dev/null
+++ b/.changepacks/changepack_log_metro_types.json
@@ -0,0 +1,7 @@
+{
+ "changes": {
+ "packages/metro-plugin/package.json": "Patch"
+ },
+ "note": "Write `df/theme.d.ts` (the tokens of devup.json) and `df/native.d.ts` (React Native props for each component) when Metro reads the config, with a `distDir` option, as the web plugins do.",
+ "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/.changepacks/changepack_log_react_native_compat.json b/.changepacks/changepack_log_react_native_compat.json
new file mode 100644
index 000000000..f2887fe65
--- /dev/null
+++ b/.changepacks/changepack_log_react_native_compat.json
@@ -0,0 +1,8 @@
+{
+ "changes": {
+ "bindings/devup-ui-binding/package.json": "Patch",
+ "bindings/devup-ui-wasm/package.json": "Patch"
+ },
+ "note": "`codeExtractNative` compiles `styled-components/native` and `@emotion/native` (part of #411): their `styled` (including `styled.View` and any other `styled.Name`) and `css` compile as Devup UI's with numbers as pixels, function parts receive `props.theme` from the runtime's `ThemeProvider`, and `ThemeProvider`, `useTheme` and `withTheme` import from the React Native runtime. Web output is unchanged.",
+ "date": "2026-11-21T00:00:00.000Z"
+}
diff --git a/.changepacks/changepack_log_react_native_compat_runtime.json b/.changepacks/changepack_log_react_native_compat_runtime.json
new file mode 100644
index 000000000..93731b2f3
--- /dev/null
+++ b/.changepacks/changepack_log_react_native_compat_runtime.json
@@ -0,0 +1,7 @@
+{
+ "changes": {
+ "packages/react/package.json": "Patch"
+ },
+ "note": "`@devup-ui/react/native` adds `ThemeProvider`, `useStyledTheme` and `withTheme`, the theme context the build imports for styled-components and Emotion on React Native. They share the context and `withTheme` of the web compat entry. The runtime grows from 702 B to 1,185 B min+gzip.",
+ "date": "2026-11-21T00:00:00.000Z"
+}
diff --git a/.changepacks/changepack_log_react_native_types.json b/.changepacks/changepack_log_react_native_types.json
new file mode 100644
index 000000000..ac8e96aa9
--- /dev/null
+++ b/.changepacks/changepack_log_react_native_types.json
@@ -0,0 +1,7 @@
+{
+ "changes": {
+ "packages/react/package.json": "Patch"
+ },
+ "note": "Add `@devup-ui/react/native/types`, which types each component as the React Native component it renders (`Box` takes `ViewProps`, `Button` takes `PressableProps`, ...) through the new `DevupElementProps` augmentation point. Web types are unchanged.",
+ "date": "2026-11-21T00:00:00.000Z"
+}
diff --git a/apps/expo/app.json b/apps/expo/app.json
index ad7952e54..c9389260f 100644
--- a/apps/expo/app.json
+++ b/apps/expo/app.json
@@ -3,6 +3,6 @@
"name": "Devup UI Expo",
"slug": "devup-ui-expo",
"version": "0.1.0",
- "platforms": ["ios", "android"]
+ "platforms": ["ios", "android", "web"]
}
}
diff --git a/apps/expo/check-bundle.mjs b/apps/expo/check-bundle.mjs
index bc2d2a4c6..704d8d76f 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'
@@ -19,9 +20,12 @@ const RUNTIME_NAMES =
const APP_HOOKS = ['useThemeIndex', 'useBreakpoint', 'useLandscape', 'Focused']
/** Modules of @devup-ui/react, by the path Metro resolves */
const REACT_PACKAGE = /(^|[\\/])(@devup-ui[\\/]react|packages[\\/]react)[\\/]/
-/** The React Native runtime among them */
+/**
+ * The React Native runtime among them, with the theme context of
+ * styled-components and Emotion it shares with the web build
+ */
const NATIVE_RUNTIME =
- /(^|[\\/])(@devup-ui[\\/]react|packages[\\/]react)[\\/]dist[\\/]native[\\/]/
+ /(^|[\\/])(@devup-ui[\\/]react|packages[\\/]react)[\\/]dist[\\/](native[\\/]|utils[\\/](theme-context|with-theme)\.)/
const root = join(import.meta.dirname, 'dist', '_expo', 'static', 'js')
const failures = []
@@ -110,7 +114,7 @@ function runtimeUsers(code, locate) {
return users
}
-for (const platform of ['ios', 'android']) {
+for (const platform of ['ios', 'android', 'web']) {
const directory = join(root, platform)
const bundles = readdirSync(directory).filter((file) => file.endsWith('.js'))
if (bundles.length === 0) failures.push(`${platform}: no JavaScript bundle`)
@@ -124,6 +128,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 +144,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/check-web.mjs b/apps/expo/check-web.mjs
new file mode 100644
index 000000000..2d28949c7
--- /dev/null
+++ b/apps/expo/check-web.mjs
@@ -0,0 +1,102 @@
+// Opens the web export (`expo export --platform web` wrote dist/) in Chromium
+// and checks that react-native-web renders the styles Devup UI compiled: the
+// card takes the theme's color and switches with the theme, the input takes
+// its focus style through the runtime's `Focused`, and the button, a
+// `Pressable`, counts a press.
+import { createReadStream, existsSync, statSync } from 'node:fs'
+import { createServer } from 'node:http'
+import { extname, join, normalize } from 'node:path'
+
+import { chromium } from '@playwright/test'
+
+const root = join(import.meta.dirname, 'dist')
+const TYPES = {
+ '.html': 'text/html',
+ '.js': 'text/javascript',
+ '.json': 'application/json',
+ '.png': 'image/png',
+}
+
+const server = createServer((request, response) => {
+ const path = join(root, normalize(new URL(request.url, 'http://x').pathname))
+ if (!path.startsWith(root)) {
+ response.writeHead(404).end()
+ return
+ }
+ // A path that is no file is the app's page
+ const file =
+ existsSync(path) && statSync(path).isFile()
+ ? path
+ : join(root, 'index.html')
+ response.writeHead(200, {
+ 'content-type': TYPES[extname(file)] ?? 'application/octet-stream',
+ })
+ createReadStream(file).pipe(response)
+})
+await new Promise((resolve) => server.listen(0, '127.0.0.1', resolve))
+const url = `http://127.0.0.1:${server.address().port}/`
+
+const failures = []
+/** Fail with `message` unless `actual` is `expected` */
+function expectEqual(actual, expected, message) {
+ if (actual !== expected) {
+ failures.push(`${message}: expected ${expected}, got ${actual}`)
+ }
+}
+
+const browser = await chromium.launch()
+try {
+ const page = await browser.newPage({ colorScheme: 'light' })
+ const errors = []
+ page.on('pageerror', (error) => errors.push(error.message))
+ await page.goto(url)
+ const card = page.getByTestId('card')
+ const name = page.getByTestId('name')
+ const count = page.getByTestId('count')
+ await card.waitFor()
+ /** The computed style `property` of `locator` */
+ const style = (locator, property) =>
+ locator.evaluate(
+ (element, property) => getComputedStyle(element)[property],
+ property,
+ )
+
+ expectEqual(
+ await style(card, 'backgroundColor'),
+ 'rgb(255, 255, 255)',
+ 'the card in the light theme',
+ )
+ expectEqual(
+ await style(count, 'backgroundColor'),
+ 'rgb(90, 68, 255)',
+ 'the count button',
+ )
+ await name.focus()
+ expectEqual(
+ await style(name, 'borderTopColor'),
+ 'rgb(90, 68, 255)',
+ 'the focused input',
+ )
+ await count.click()
+ expectEqual(
+ (await count.textContent())?.trim(),
+ 'Pressed 1 times',
+ 'the count after a press',
+ )
+ await page.getByTestId('theme').click()
+ expectEqual(
+ await style(card, 'backgroundColor'),
+ 'rgb(31, 31, 46)',
+ 'the card in the dark theme',
+ )
+ for (const error of errors) failures.push(`page error: ${error}`)
+} finally {
+ await browser.close()
+ server.close()
+}
+
+if (failures.length > 0) {
+ console.error(failures.join('\n'))
+ process.exit(1)
+}
+console.info('web: react-native-web renders the compiled styles')
diff --git a/apps/expo/package.json b/apps/expo/package.json
index 3a625f4e2..0f4dea58c 100644
--- a/apps/expo/package.json
+++ b/apps/expo/package.json
@@ -5,14 +5,21 @@
"main": "index.ts",
"scripts": {
"start": "expo start",
- "export": "expo export --platform ios --platform android --no-bytecode --source-maps",
- "check": "node check-bundle.mjs"
+ "export": "expo export --platform ios --platform android --platform web --no-bytecode --source-maps",
+ "check": "node check-bundle.mjs",
+ "check:web": "node check-web.mjs",
+ "typecheck": "bun ../../node_modules/@typescript/native/bin/tsc --noEmit"
},
"dependencies": {
"@devup-ui/react": "workspace:^",
+ "@expo/metro-runtime": "~58.0.17",
"expo": "~58.0.26",
"react": "^19.3.1",
- "react-native": "0.88.1"
+ "react-dom": "^19.3.1",
+ "react-native": "0.88.1",
+ "react-native-reanimated": "~4.7.1",
+ "react-native-web": "~0.21.4",
+ "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..e6318fa87 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,11 +52,14 @@ export function App() {
@@ -60,6 +73,7 @@ export function App() {
onChangeText={setName}
px={3}
py={2}
+ testID="name"
value={name}
/>
@@ -76,6 +90,7 @@ export function App() {
bg="#5a44ff"
className={button}
onPress={() => setCount(count + 1)}
+ testID="count"
>
Pressed {count} times
@@ -86,6 +101,7 @@ export function App() {
border="1px solid $border"
className={button}
onPress={() => setTheme(theme === 'dark' ? 'light' : 'dark')}
+ testID="theme"
>
Switch to {theme === 'dark' ? 'light' : 'dark'}
diff --git a/apps/landing/src/app/(detail)/docs/LeftMenu.tsx b/apps/landing/src/app/(detail)/docs/LeftMenu.tsx
index db5adc836..402cd2450 100644
--- a/apps/landing/src/app/(detail)/docs/LeftMenu.tsx
+++ b/apps/landing/src/app/(detail)/docs/LeftMenu.tsx
@@ -44,6 +44,7 @@ export function LeftMenu() {
+