expo-dom
Skill by expo
Teaches an AI assistant to build Expo DOM components, which run web React code in a webview on native and render as-is on web. It suits developers who want to use web-only libraries or migrate web code to native step by step.
Install expo-dom
Built from the published package, never by AI.
git clone --depth 1 https://github.com/expo/skills /tmp/skills && mkdir -p ~/.claude/skills && cp -r /tmp/skills/plugins/expo/skills/expo-dom ~/.claude/skills/expo-domRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/expo/skills /tmp/skills && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/skills/plugins/expo/skills/expo-dom ~/.gemini/antigravity-cli/skills/expo-domAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
The expo-dom skill explains how to use Expo DOM components. These components run web code verbatim in a webview on iOS (WKWebView) and Android (WebView), and render as-is on web. This lets an Expo app use web-only libraries such as recharts and react-syntax-highlighter without modification.
The skill covers the rules for DOM components, including the 'use dom' directive, a single default export, and serializable props. It also explains the dom prop for webview options, passing async native functions into the webview, and reading router values in native parent components. It is intended for developers who want to migrate web code to native incrementally. For an end-to-end migration of a whole web app, the source points to the expo-web-to-native skill.
Written from the project's SKILL.md and checked against it.
What it can do
- Create DOM componentsWrite a React component in its own file with the 'use dom' directive that runs in a webview on native.
- Use web-only librariesUse libraries such as recharts, chart.js or react-syntax-highlighter inside an Expo app.
- Configure the webviewSet dom prop options like scrollEnabled, contentInsetAdjustmentBehavior and style.
- Expose native actionsPass async native functions as props so the webview component can call them.
- Use Expo Router in DOM componentsUse the Link component and router API, and pass hook values like search params as props.
- Detect the DOM environmentCheck the IS_DOM flag to tell whether code runs inside a DOM component.
What you need
- An Expo app
Try asking
- Wrap my recharts line chart in an Expo DOM component
- Make a DOM component that shows syntax highlighted code
- Expose a native alert function to my DOM component as a prop
Good to know
- DOM components cannot be defined inline or combined with native components in the same file
- Props must be serializable: strings, numbers, booleans, arrays, plain objects
- The webview has its own JavaScript context and cannot directly share state with native code
- Layout route files (_layout) cannot be DOM components
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: plugins/expo/skills/expo-dom/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
SKILL.md10 KB -
agents/openai.yaml371 B
Alternatives to expo-dom
All alternatives →Runs a 7-stage workflow for auditing, cleaning up and reviewing GitHub repositories, plus competitor analysis. Written for developers who want a repo checked for secrets, junk files and documentation gaps.
Teaches an AI assistant to build, debug and explain Gradio web UIs and ML demos in Python. It covers the core API, components, event listeners, layouts and the MCP server option. Aimed at Python developers who work with Gradio.
Recommends menus, buttons, toolbars and disclosure controls for Apple platforms using Human Interface Guidelines conventions. Built for developers and designers making iOS, iPadOS, macOS or visionOS interfaces. Checks existing project design context before asking questions.
Creates production-ready FastAPI project structures with async patterns, dependency injection, and error handling. It is for developers starting new FastAPI applications or backend API projects.
Analyzes Android apps to find user workflows to expose as AppFunctions, so AI agents and system shortcuts can run them without opening the app UI. Generates Kotlin code and refines KDoc for Android developers.
Creates, edits, validates and runs Agent QA tests, suites and hooks through MCP or CLI. It keeps canonical IDs and schema contracts intact, for developers and QA teams using Agent QA.
Compare with openclaw-github-repo-commander, gradio or hig-components-menus
expo-dom: common questions
When should I use Expo DOM components?
The source recommends them for web-only libraries, migrating existing React web components, complex HTML/CSS layouts, iframes, and canvas or WebGL. It advises against them when native performance is critical or the UI is simple.
Does the dom prop work on web?
No. The source says the dom prop is ignored on web because no webview is needed, and the component renders as-is.
Why can't I use useLocalSearchParams inside a DOM component?
The source says hooks such as useLocalSearchParams and usePathname need synchronous access to native routing state, so they do not work directly in DOM components. Read them in the native parent and pass them as props.
How do I install expo-dom?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is expo-dom free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is expo-dom safe to use?
It scores 93 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to expo-dom?
Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.
