[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6ACE48G4KSY4RC0T625YYCA":3,"skill-same:01M6ACE48G4KSY4RC0T625YYCA":58},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":24,"linkOnly":25,"markdownContent":26,"markdownBody":27,"frontMatter":28,"refName":30,"commitSha":31,"skillDirectory":32,"forksCount":33,"repositoryHtmlUrl":34,"repositoryHomepageUrl":6,"ownerHtmlUrl":35,"ownerBlogUrl":36,"ownerDescription":6,"updatedAt":37,"install":38,"resources":51},"01M6ACE48G4KSY4RC0T625YYCA","use-dom",null,"Use Expo DOM components to run web code in a webview on native and as-is on web. Migrate web code to native incrementally.","openai\u002Fplugins","openai","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F14957082?v=4","01M6AC29YGCR4S2NTJFV0G8B81","OpenAI","01M6AC38CEN570NMR96RNGD2NK",7879,"MIT","https:\u002F\u002Fgithub.com\u002Fopenai\u002Fplugins\u002Fblob\u002Fmain\u002Fplugins\u002Fexpo\u002Fskills\u002Fuse-dom\u002FSKILL.md",[],[19,20,21,22,23],"use dom","web","components","run","code","2026-11-10 10:12:30",false,"---\nname: use-dom\ndescription: Use Expo DOM components to run web code in a webview on native and as-is on web. Migrate web code to native incrementally.\nversion: 1.0.0\nlicense: MIT\n---\n\n## What are DOM Components?\n\nDOM components allow web code to run verbatim in a webview on native platforms while rendering as-is on web. This enables using web-only libraries like `recharts`, `react-syntax-highlighter`, or any React web library in your Expo app without modification.\n\n## When to Use DOM Components\n\nUse DOM components when you need:\n\n- **Web-only libraries** — Charts (recharts, chart.js), syntax highlighters, rich text editors, or any library that depends on DOM APIs\n- **Migrating web code** — Bring existing React web components to native without rewriting\n- **Complex HTML\u002FCSS layouts** — When CSS features aren't available in React Native\n- **iframes or embeds** — Embedding external content that requires a browser context\n- **Canvas or WebGL** — Web graphics APIs not available natively\n\n## When NOT to Use DOM Components\n\nAvoid DOM components when:\n\n- **Native performance is critical** — Webviews add overhead\n- **Simple UI** — React Native components are more efficient for basic layouts\n- **Deep native integration** — Use local modules instead for native APIs\n- **Layout routes** — `_layout` files cannot be DOM components\n\n## Basic DOM Component\n\nCreate a new file with the `'use dom';` directive at the top:\n\n```tsx\n\u002F\u002F components\u002FWebChart.tsx\n\"use dom\";\n\nexport default function WebChart({\n  data,\n}: {\n  data: number[];\n  dom: import(\"expo\u002Fdom\").DOMProps;\n}) {\n  return (\n    \u003Cdiv style={{ padding: 20 }}>\n      \u003Ch2>Chart Data\u003C\u002Fh2>\n      \u003Cul>\n        {data.map((value, i) => (\n          \u003Cli key={i}>{value}\u003C\u002Fli>\n        ))}\n      \u003C\u002Ful>\n    \u003C\u002Fdiv>\n  );\n}\n```\n\n## Rules for DOM Components\n\n1. **Must have `'use dom';` directive** at the top of the file\n2. **Single default export** — One React component per file\n3. **Own file** — Cannot be defined inline or combined with native components\n4. **Serializable props only** — Strings, numbers, booleans, arrays, plain objects\n5. **Include CSS in the component file** — DOM components run in isolated context\n\n## The `dom` Prop\n\nEvery DOM component receives a special `dom` prop for webview configuration. Always type it in your props:\n\n```tsx\n\"use dom\";\n\ninterface Props {\n  content: string;\n  dom: import(\"expo\u002Fdom\").DOMProps;\n}\n\nexport default function MyComponent({ content }: Props) {\n  return \u003Cdiv>{content}\u003C\u002Fdiv>;\n}\n```\n\n### Common `dom` Prop Options\n\n```tsx\n\u002F\u002F Disable body scrolling\n\u003CDOMComponent dom={{ scrollEnabled: false }} \u002F>\n\n\u002F\u002F Flow under the notch (disable safe area insets)\n\u003CDOMComponent dom={{ contentInsetAdjustmentBehavior: \"never\" }} \u002F>\n\n\u002F\u002F Control size manually\n\u003CDOMComponent dom={{ style: { width: 300, height: 400 } }} \u002F>\n\n\u002F\u002F Combine options\n\u003CDOMComponent\n  dom={{\n    scrollEnabled: false,\n    contentInsetAdjustmentBehavior: \"never\",\n    style: { width: '100%', height: 500 }\n  }}\n\u002F>\n```\n\n## Exposing Native Actions to the Webview\n\nPass async functions as props to expose native functionality to the DOM component:\n\n```tsx\n\u002F\u002F app\u002Findex.tsx (native)\nimport { Alert } from \"react-native\";\nimport DOMComponent from \"@\u002Fcomponents\u002Fdom-component\";\n\nexport default function Screen() {\n  return (\n    \u003CDOMComponent\n      showAlert={async (message: string) => {\n        Alert.alert(\"From Web\", message);\n      }}\n      saveData={async (data: { name: string; value: number }) => {\n        \u002F\u002F Save to native storage, database, etc.\n        console.log(\"Saving:\", data);\n        return { success: true };\n      }}\n    \u002F>\n  );\n}\n```\n\n```tsx\n\u002F\u002F components\u002Fdom-component.tsx\n\"use dom\";\n\ninterface Props {\n  showAlert: (message: string) => Promise\u003Cvoid>;\n  saveData: (data: {\n    name: string;\n    value: number;\n  }) => Promise\u003C{ success: boolean }>;\n  dom?: import(\"expo\u002Fdom\").DOMProps;\n}\n\nexport default function DOMComponent({ showAlert, saveData }: Props) {\n  const handleClick = async () => {\n    await showAlert(\"Hello from the webview!\");\n    const result = await saveData({ name: \"test\", value: 42 });\n    console.log(\"Save result:\", result);\n  };\n\n  return \u003Cbutton onClick={handleClick}>Trigger Native Action\u003C\u002Fbutton>;\n}\n```\n\n## Using Web Libraries\n\nDOM components can use any web library:\n\n```tsx\n\u002F\u002F components\u002Fsyntax-highlight.tsx\n\"use dom\";\n\nimport SyntaxHighlighter from \"react-syntax-highlighter\";\nimport { docco } from \"react-syntax-highlighter\u002Fdist\u002Fesm\u002Fstyles\u002Fhljs\";\n\ninterface Props {\n  code: string;\n  language: string;\n  dom?: import(\"expo\u002Fdom\").DOMProps;\n}\n\nexport default function SyntaxHighlight({ code, language }: Props) {\n  return (\n    \u003CSyntaxHighlighter language={language} style={docco}>\n      {code}\n    \u003C\u002FSyntaxHighlighter>\n  );\n}\n```\n\n```tsx\n\u002F\u002F components\u002Fchart.tsx\n\"use dom\";\n\nimport {\n  LineChart,\n  Line,\n  XAxis,\n  YAxis,\n  CartesianGrid,\n  Tooltip,\n} from \"recharts\";\n\ninterface Props {\n  data: Array\u003C{ name: string; value: number }>;\n  dom: import(\"expo\u002Fdom\").DOMProps;\n}\n\nexport default function Chart({ data }: Props) {\n  return (\n    \u003CLineChart width={400} height={300} data={data}>\n      \u003CCartesianGrid strokeDasharray=\"3 3\" \u002F>\n      \u003CXAxis dataKey=\"name\" \u002F>\n      \u003CYAxis \u002F>\n      \u003CTooltip \u002F>\n      \u003CLine type=\"monotone\" dataKey=\"value\" stroke=\"#8884d8\" \u002F>\n    \u003C\u002FLineChart>\n  );\n}\n```\n\n## CSS in DOM Components\n\nCSS imports must be in the DOM component file since they run in isolated context:\n\n```tsx\n\u002F\u002F components\u002Fstyled-component.tsx\n\"use dom\";\n\nimport \"@\u002Fstyles.css\"; \u002F\u002F CSS file in same directory\n\nexport default function StyledComponent({\n  dom,\n}: {\n  dom: import(\"expo\u002Fdom\").DOMProps;\n}) {\n  return (\n    \u003Cdiv className=\"container\">\n      \u003Ch1 className=\"title\">Styled Content\u003C\u002Fh1>\n    \u003C\u002Fdiv>\n  );\n}\n```\n\nOr use inline styles \u002F CSS-in-JS:\n\n```tsx\n\"use dom\";\n\nconst styles = {\n  container: {\n    padding: 20,\n    backgroundColor: \"#f0f0f0\",\n  },\n  title: {\n    fontSize: 24,\n    color: \"#333\",\n  },\n};\n\nexport default function StyledComponent({\n  dom,\n}: {\n  dom: import(\"expo\u002Fdom\").DOMProps;\n}) {\n  return (\n    \u003Cdiv style={styles.container}>\n      \u003Ch1 style={styles.title}>Styled Content\u003C\u002Fh1>\n    \u003C\u002Fdiv>\n  );\n}\n```\n\n## Expo Router in DOM Components\n\nThe expo-router `\u003CLink \u002F>` component and router API work inside DOM components:\n\n```tsx\n\"use dom\";\n\nimport { Link, useRouter } from \"expo-router\";\n\nexport default function Navigation({\n  dom,\n}: {\n  dom: import(\"expo\u002Fdom\").DOMProps;\n}) {\n  const router = useRouter();\n\n  return (\n    \u003Cnav>\n      \u003CLink href=\"\u002Fabout\">About\u003C\u002FLink>\n      \u003Cbutton onClick={() => router.push(\"\u002Fsettings\")}>Settings\u003C\u002Fbutton>\n    \u003C\u002Fnav>\n  );\n}\n```\n\n### Router APIs That Require Props\n\nThese hooks don't work directly in DOM components because they need synchronous access to native routing state:\n\n- `useLocalSearchParams()`\n- `useGlobalSearchParams()`\n- `usePathname()`\n- `useSegments()`\n- `useRootNavigation()`\n- `useRootNavigationState()`\n\n**Solution:** Read these values in the native parent and pass as props:\n\n```tsx\n\u002F\u002F app\u002F[id].tsx (native)\nimport { useLocalSearchParams, usePathname } from \"expo-router\";\nimport DOMComponent from \"@\u002Fcomponents\u002Fdom-component\";\n\nexport default function Screen() {\n  const { id } = useLocalSearchParams();\n  const pathname = usePathname();\n\n  return \u003CDOMComponent id={id as string} pathname={pathname} \u002F>;\n}\n```\n\n```tsx\n\u002F\u002F components\u002Fdom-component.tsx\n\"use dom\";\n\ninterface Props {\n  id: string;\n  pathname: string;\n  dom?: import(\"expo\u002Fdom\").DOMProps;\n}\n\nexport default function DOMComponent({ id, pathname }: Props) {\n  return (\n    \u003Cdiv>\n      \u003Cp>Current ID: {id}\u003C\u002Fp>\n      \u003Cp>Current Path: {pathname}\u003C\u002Fp>\n    \u003C\u002Fdiv>\n  );\n}\n```\n\n## Detecting DOM Environment\n\nCheck if code is running in a DOM component:\n\n```tsx\n\"use dom\";\n\nimport { IS_DOM } from \"expo\u002Fdom\";\n\nexport default function Component({\n  dom,\n}: {\n  dom?: import(\"expo\u002Fdom\").DOMProps;\n}) {\n  return \u003Cdiv>{IS_DOM ? \"Running in DOM component\" : \"Running natively\"}\u003C\u002Fdiv>;\n}\n```\n\n## Assets\n\nPrefer requiring assets instead of using the public directory:\n\n```tsx\n\"use dom\";\n\n\u002F\u002F Good - bundled with the component\nconst logo = require(\"..\u002Fassets\u002Flogo.png\");\n\nexport default function Component({\n  dom,\n}: {\n  dom: import(\"expo\u002Fdom\").DOMProps;\n}) {\n  return \u003Cimg src={logo} alt=\"Logo\" \u002F>;\n}\n```\n\n## Usage from Native Components\n\nImport and use DOM components like regular components:\n\n```tsx\n\u002F\u002F app\u002Findex.tsx\nimport { View, Text } from \"react-native\";\nimport WebChart from \"@\u002Fcomponents\u002Fweb-chart\";\nimport CodeBlock from \"@\u002Fcomponents\u002Fcode-block\";\n\nexport default function HomeScreen() {\n  return (\n    \u003CView style={{ flex: 1 }}>\n      \u003CText>Native content above\u003C\u002FText>\n\n      \u003CWebChart data={[10, 20, 30, 40, 50]} dom={{ style: { height: 300 } }} \u002F>\n\n      \u003CCodeBlock\n        code=\"const x = 1;\"\n        language=\"javascript\"\n        dom={{ scrollEnabled: true }}\n      \u002F>\n\n      \u003CText>Native content below\u003C\u002FText>\n    \u003C\u002FView>\n  );\n}\n```\n\n## Platform Behavior\n\n| Platform | Behavior                            |\n| -------- | ----------------------------------- |\n| iOS      | Rendered in WKWebView               |\n| Android  | Rendered in WebView                 |\n| Web      | Rendered as-is (no webview wrapper) |\n\nOn web, the `dom` prop is ignored since no webview is needed.\n\n## Tips\n\n- DOM components hot reload during development\n- Keep DOM components focused — don't put entire screens in webviews\n- Use native components for navigation chrome, DOM components for specialized content\n- Test on all platforms — web rendering may differ slightly from native webviews\n- Large DOM components may impact performance — profile if needed\n- The webview has its own JavaScript context — cannot directly share state with native\n","## What are DOM Components?\n\nDOM components allow web code to run verbatim in a webview on native platforms while rendering as-is on web. This enables using web-only libraries like `recharts`, `react-syntax-highlighter`, or any React web library in your Expo app without modification.\n\n## When to Use DOM Components\n\nUse DOM components when you need:\n\n- **Web-only libraries** — Charts (recharts, chart.js), syntax highlighters, rich text editors, or any library that depends on DOM APIs\n- **Migrating web code** — Bring existing React web components to native without rewriting\n- **Complex HTML\u002FCSS layouts** — When CSS features aren't available in React Native\n- **iframes or embeds** — Embedding external content that requires a browser context\n- **Canvas or WebGL** — Web graphics APIs not available natively\n\n## When NOT to Use DOM Components\n\nAvoid DOM components when:\n\n- **Native performance is critical** — Webviews add overhead\n- **Simple UI** — React Native components are more efficient for basic layouts\n- **Deep native integration** — Use local modules instead for native APIs\n- **Layout routes** — `_layout` files cannot be DOM components\n\n## Basic DOM Component\n\nCreate a new file with the `'use dom';` directive at the top:\n\n```tsx\n\u002F\u002F components\u002FWebChart.tsx\n\"use dom\";\n\nexport default function WebChart({\n  data,\n}: {\n  data: number[];\n  dom: import(\"expo\u002Fdom\").DOMProps;\n}) {\n  return (\n    \u003Cdiv style={{ padding: 20 }}>\n      \u003Ch2>Chart Data\u003C\u002Fh2>\n      \u003Cul>\n        {data.map((value, i) => (\n          \u003Cli key={i}>{value}\u003C\u002Fli>\n        ))}\n      \u003C\u002Ful>\n    \u003C\u002Fdiv>\n  );\n}\n```\n\n## Rules for DOM Components\n\n1. **Must have `'use dom';` directive** at the top of the file\n2. **Single default export** — One React component per file\n3. **Own file** — Cannot be defined inline or combined with native components\n4. **Serializable props only** — Strings, numbers, booleans, arrays, plain objects\n5. **Include CSS in the component file** — DOM components run in isolated context\n\n## The `dom` Prop\n\nEvery DOM component receives a special `dom` prop for webview configuration. Always type it in your props:\n\n```tsx\n\"use dom\";\n\ninterface Props {\n  content: string;\n  dom: import(\"expo\u002Fdom\").DOMProps;\n}\n\nexport default function MyComponent({ content }: Props) {\n  return \u003Cdiv>{content}\u003C\u002Fdiv>;\n}\n```\n\n### Common `dom` Prop Options\n\n```tsx\n\u002F\u002F Disable body scrolling\n\u003CDOMComponent dom={{ scrollEnabled: false }} \u002F>\n\n\u002F\u002F Flow under the notch (disable safe area insets)\n\u003CDOMComponent dom={{ contentInsetAdjustmentBehavior: \"never\" }} \u002F>\n\n\u002F\u002F Control size manually\n\u003CDOMComponent dom={{ style: { width: 300, height: 400 } }} \u002F>\n\n\u002F\u002F Combine options\n\u003CDOMComponent\n  dom={{\n    scrollEnabled: false,\n    contentInsetAdjustmentBehavior: \"never\",\n    style: { width: '100%', height: 500 }\n  }}\n\u002F>\n```\n\n## Exposing Native Actions to the Webview\n\nPass async functions as props to expose native functionality to the DOM component:\n\n```tsx\n\u002F\u002F app\u002Findex.tsx (native)\nimport { Alert } from \"react-native\";\nimport DOMComponent from \"@\u002Fcomponents\u002Fdom-component\";\n\nexport default function Screen() {\n  return (\n    \u003CDOMComponent\n      showAlert={async (message: string) => {\n        Alert.alert(\"From Web\", message);\n      }}\n      saveData={async (data: { name: string; value: number }) => {\n        \u002F\u002F Save to native storage, database, etc.\n        console.log(\"Saving:\", data);\n        return { success: true };\n      }}\n    \u002F>\n  );\n}\n```\n\n```tsx\n\u002F\u002F components\u002Fdom-component.tsx\n\"use dom\";\n\ninterface Props {\n  showAlert: (message: string) => Promise\u003Cvoid>;\n  saveData: (data: {\n    name: string;\n    value: number;\n  }) => Promise\u003C{ success: boolean }>;\n  dom?: import(\"expo\u002Fdom\").DOMProps;\n}\n\nexport default function DOMComponent({ showAlert, saveData }: Props) {\n  const handleClick = async () => {\n    await showAlert(\"Hello from the webview!\");\n    const result = await saveData({ name: \"test\", value: 42 });\n    console.log(\"Save result:\", result);\n  };\n\n  return \u003Cbutton onClick={handleClick}>Trigger Native Action\u003C\u002Fbutton>;\n}\n```\n\n## Using Web Libraries\n\nDOM components can use any web library:\n\n```tsx\n\u002F\u002F components\u002Fsyntax-highlight.tsx\n\"use dom\";\n\nimport SyntaxHighlighter from \"react-syntax-highlighter\";\nimport { docco } from \"react-syntax-highlighter\u002Fdist\u002Fesm\u002Fstyles\u002Fhljs\";\n\ninterface Props {\n  code: string;\n  language: string;\n  dom?: import(\"expo\u002Fdom\").DOMProps;\n}\n\nexport default function SyntaxHighlight({ code, language }: Props) {\n  return (\n    \u003CSyntaxHighlighter language={language} style={docco}>\n      {code}\n    \u003C\u002FSyntaxHighlighter>\n  );\n}\n```\n\n```tsx\n\u002F\u002F components\u002Fchart.tsx\n\"use dom\";\n\nimport {\n  LineChart,\n  Line,\n  XAxis,\n  YAxis,\n  CartesianGrid,\n  Tooltip,\n} from \"recharts\";\n\ninterface Props {\n  data: Array\u003C{ name: string; value: number }>;\n  dom: import(\"expo\u002Fdom\").DOMProps;\n}\n\nexport default function Chart({ data }: Props) {\n  return (\n    \u003CLineChart width={400} height={300} data={data}>\n      \u003CCartesianGrid strokeDasharray=\"3 3\" \u002F>\n      \u003CXAxis dataKey=\"name\" \u002F>\n      \u003CYAxis \u002F>\n      \u003CTooltip \u002F>\n      \u003CLine type=\"monotone\" dataKey=\"value\" stroke=\"#8884d8\" \u002F>\n    \u003C\u002FLineChart>\n  );\n}\n```\n\n## CSS in DOM Components\n\nCSS imports must be in the DOM component file since they run in isolated context:\n\n```tsx\n\u002F\u002F components\u002Fstyled-component.tsx\n\"use dom\";\n\nimport \"@\u002Fstyles.css\"; \u002F\u002F CSS file in same directory\n\nexport default function StyledComponent({\n  dom,\n}: {\n  dom: import(\"expo\u002Fdom\").DOMProps;\n}) {\n  return (\n    \u003Cdiv className=\"container\">\n      \u003Ch1 className=\"title\">Styled Content\u003C\u002Fh1>\n    \u003C\u002Fdiv>\n  );\n}\n```\n\nOr use inline styles \u002F CSS-in-JS:\n\n```tsx\n\"use dom\";\n\nconst styles = {\n  container: {\n    padding: 20,\n    backgroundColor: \"#f0f0f0\",\n  },\n  title: {\n    fontSize: 24,\n    color: \"#333\",\n  },\n};\n\nexport default function StyledComponent({\n  dom,\n}: {\n  dom: import(\"expo\u002Fdom\").DOMProps;\n}) {\n  return (\n    \u003Cdiv style={styles.container}>\n      \u003Ch1 style={styles.title}>Styled Content\u003C\u002Fh1>\n    \u003C\u002Fdiv>\n  );\n}\n```\n\n## Expo Router in DOM Components\n\nThe expo-router `\u003CLink \u002F>` component and router API work inside DOM components:\n\n```tsx\n\"use dom\";\n\nimport { Link, useRouter } from \"expo-router\";\n\nexport default function Navigation({\n  dom,\n}: {\n  dom: import(\"expo\u002Fdom\").DOMProps;\n}) {\n  const router = useRouter();\n\n  return (\n    \u003Cnav>\n      \u003CLink href=\"\u002Fabout\">About\u003C\u002FLink>\n      \u003Cbutton onClick={() => router.push(\"\u002Fsettings\")}>Settings\u003C\u002Fbutton>\n    \u003C\u002Fnav>\n  );\n}\n```\n\n### Router APIs That Require Props\n\nThese hooks don't work directly in DOM components because they need synchronous access to native routing state:\n\n- `useLocalSearchParams()`\n- `useGlobalSearchParams()`\n- `usePathname()`\n- `useSegments()`\n- `useRootNavigation()`\n- `useRootNavigationState()`\n\n**Solution:** Read these values in the native parent and pass as props:\n\n```tsx\n\u002F\u002F app\u002F[id].tsx (native)\nimport { useLocalSearchParams, usePathname } from \"expo-router\";\nimport DOMComponent from \"@\u002Fcomponents\u002Fdom-component\";\n\nexport default function Screen() {\n  const { id } = useLocalSearchParams();\n  const pathname = usePathname();\n\n  return \u003CDOMComponent id={id as string} pathname={pathname} \u002F>;\n}\n```\n\n```tsx\n\u002F\u002F components\u002Fdom-component.tsx\n\"use dom\";\n\ninterface Props {\n  id: string;\n  pathname: string;\n  dom?: import(\"expo\u002Fdom\").DOMProps;\n}\n\nexport default function DOMComponent({ id, pathname }: Props) {\n  return (\n    \u003Cdiv>\n      \u003Cp>Current ID: {id}\u003C\u002Fp>\n      \u003Cp>Current Path: {pathname}\u003C\u002Fp>\n    \u003C\u002Fdiv>\n  );\n}\n```\n\n## Detecting DOM Environment\n\nCheck if code is running in a DOM component:\n\n```tsx\n\"use dom\";\n\nimport { IS_DOM } from \"expo\u002Fdom\";\n\nexport default function Component({\n  dom,\n}: {\n  dom?: import(\"expo\u002Fdom\").DOMProps;\n}) {\n  return \u003Cdiv>{IS_DOM ? \"Running in DOM component\" : \"Running natively\"}\u003C\u002Fdiv>;\n}\n```\n\n## Assets\n\nPrefer requiring assets instead of using the public directory:\n\n```tsx\n\"use dom\";\n\n\u002F\u002F Good - bundled with the component\nconst logo = require(\"..\u002Fassets\u002Flogo.png\");\n\nexport default function Component({\n  dom,\n}: {\n  dom: import(\"expo\u002Fdom\").DOMProps;\n}) {\n  return \u003Cimg src={logo} alt=\"Logo\" \u002F>;\n}\n```\n\n## Usage from Native Components\n\nImport and use DOM components like regular components:\n\n```tsx\n\u002F\u002F app\u002Findex.tsx\nimport { View, Text } from \"react-native\";\nimport WebChart from \"@\u002Fcomponents\u002Fweb-chart\";\nimport CodeBlock from \"@\u002Fcomponents\u002Fcode-block\";\n\nexport default function HomeScreen() {\n  return (\n    \u003CView style={{ flex: 1 }}>\n      \u003CText>Native content above\u003C\u002FText>\n\n      \u003CWebChart data={[10, 20, 30, 40, 50]} dom={{ style: { height: 300 } }} \u002F>\n\n      \u003CCodeBlock\n        code=\"const x = 1;\"\n        language=\"javascript\"\n        dom={{ scrollEnabled: true }}\n      \u002F>\n\n      \u003CText>Native content below\u003C\u002FText>\n    \u003C\u002FView>\n  );\n}\n```\n\n## Platform Behavior\n\n| Platform | Behavior                            |\n| -------- | ----------------------------------- |\n| iOS      | Rendered in WKWebView               |\n| Android  | Rendered in WebView                 |\n| Web      | Rendered as-is (no webview wrapper) |\n\nOn web, the `dom` prop is ignored since no webview is needed.\n\n## Tips\n\n- DOM components hot reload during development\n- Keep DOM components focused — don't put entire screens in webviews\n- Use native components for navigation chrome, DOM components for specialized content\n- Test on all platforms — web rendering may differ slightly from native webviews\n- Large DOM components may impact performance — profile if needed\n- The webview has its own JavaScript context — cannot directly share state with native\n",{"name":5,"license":15,"version":29,"description":7},"1.0.0","main","0722921d5542fc593105c27bd52630babd8b8c2a","plugins\u002Fexpo\u002Fskills\u002Fuse-dom",1012,"https:\u002F\u002Fgithub.com\u002Fopenai\u002Fplugins","https:\u002F\u002Fgithub.com\u002Fopenai","https:\u002F\u002Fopenai.com\u002F","2026-11-07 03:08:35",{"source":8,"skillName":5,"commands":39,"prompt":49,"zipAvailable":50},[40,43,46],{"tool":41,"command":42},"npx","npx skills add openai\u002Fplugins --skill use-dom",{"tool":44,"command":45},"bunx","bunx skills add openai\u002Fplugins --skill use-dom",{"tool":47,"command":48},"pnpm","pnpm dlx skills add openai\u002Fplugins --skill use-dom","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fopenai\u002Fplugins\u002Fblob\u002Fmain\u002Fplugins\u002Fexpo\u002Fskills\u002Fuse-dom\u002FSKILL.md",true,[52],{"path":53,"resourceType":54,"resourceTypeDesc":55,"sizeBytes":56,"sourceHtmlUrl":57},"agents\u002Fopenai.yaml","REFERENCE","参考文档",358,"https:\u002F\u002Fgithub.com\u002Fopenai\u002Fplugins\u002Fblob\u002Fmain\u002Fplugins\u002Fexpo\u002Fskills\u002Fuse-dom\u002Fagents\u002Fopenai.yaml",[59,79,92,110,137,150],{"skillNo":60,"name":61,"nameZh":6,"description":62,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":63,"categories":64,"keywords":70,"publishedAt":24},"01M6ACYN431ER9AFG508JJH3VT","supabase-postgres-best-practices","Postgres performance optimization and best practices from Supabase. Use this skill when writing, reviewing, or optimizing Postgres queries, schema designs, or database configurations.","https:\u002F\u002Fgithub.com\u002Fopenai\u002Fplugins\u002Fblob\u002Fmain\u002Fplugins\u002Fsupabase\u002Fskills\u002Fsupabase-postgres-best-practices\u002FSKILL.md",[65],{"categoryNo":66,"categoryName":67,"taxonomyType":68,"taxonomyTypeDesc":69},"01JBSEEDCAT000000000000010","后端与接口","SCENARIO","使用场景",[71,72,73,74,75,23,76,77,78],"best practices","supabase postgres best practices","writing","performance","sql","database","metrics","examples",{"skillNo":80,"name":81,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":88,"publishedAt":24},"01M6ACQRGGJYVNDPQWB9XGWRNZ","minimal-skill","Minimal example skill for plugin-eval tests. Use when the user wants a compact demonstration of a well-structured skill.","https:\u002F\u002Fgithub.com\u002Fopenai\u002Fplugins\u002Fblob\u002Fmain\u002Fplugins\u002Fplugin-eval\u002Ffixtures\u002Fminimal-skill\u002FSKILL.md",[85],{"categoryNo":86,"categoryName":87,"taxonomyType":68,"taxonomyTypeDesc":69},"01JBSEEDCAT000000000000023","Skill与智能体开发",[89,90,91],"minimal skill","example skill","plugin",{"skillNo":93,"name":94,"nameZh":6,"description":95,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":96,"licenseFileUrl":6,"sourceHtmlUrl":97,"categories":98,"keywords":99,"publishedAt":24},"01M6ACQ406M83341YPKPEXBXDZ","physical-ai-neural-reconstruction","Router for NVIDIA NuRec\u002FNRE: USDZ rendering, NCore conversion, 3DGS, gRPC sensor sim, PhysicalAI HF datasets. Do NOT use for SimReady or infra setup.","Apache-2.0","https:\u002F\u002Fgithub.com\u002Fopenai\u002Fplugins\u002Fblob\u002Fmain\u002Fplugins\u002Fnvidia\u002Fskills\u002Fphysical-ai-neural-reconstruction\u002FSKILL.md",[],[100,101,102,103,104,105,106,107,108,109],"physical ai neural reconstruction","https","python","github","docker","setup","toolkit","gpu","index","grpc",{"skillNo":111,"name":112,"nameZh":6,"description":113,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":96,"licenseFileUrl":6,"sourceHtmlUrl":114,"categories":115,"keywords":119,"publishedAt":24},"01M6ACPVRFPVATXD7H38Z56QC5","physical-ai-infrastructure-setup-and-resilient-scaling","Use when the user wants to set up, scale, validate, or harden NVIDIA physical AI infrastructure for synthetic data generation workflows across local MicroK8s or Azure AKS, including Kubernetes clusters, inference endpoint deployment, OSMO deployment, workload submission readiness, and infrastructure failure recovery. Trigger keywords: physical ai infrastructure, resilient scaling, SDG infrastructure, microk8s, azure aks, NVCF deployment, NIM Operator, OSMO deploy, workflow scaling. Don't trigger for: OSMO log summarization or workload-only operations unless infrastructure setup, scaling, validation, or recovery is requested.","https:\u002F\u002Fgithub.com\u002Fopenai\u002Fplugins\u002Fblob\u002Fmain\u002Fplugins\u002Fnvidia\u002Fskills\u002Fphysical-ai-infrastructure-setup-and-resilient-scaling\u002FSKILL.md",[116],{"categoryNo":117,"categoryName":118,"taxonomyType":68,"taxonomyTypeDesc":69},"01JBSEEDCAT000000000000011","运维与部署",[120,105,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136],"physical ai infrastructure setup and resilient scaling","infrastructure","validation","terraform","deployment","synthetic data","workload","ml","cli","kubernetes","inference","workflow","workflows","component","validate","deploy","azure",{"skillNo":138,"name":139,"nameZh":6,"description":140,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":96,"licenseFileUrl":6,"sourceHtmlUrl":141,"categories":142,"keywords":144,"publishedAt":24},"01M6ACPG9JPDSS6MMKVKR3P56E","omniverse-usd-performance-tuning","Top-level workflow skill for USD performance diagnosis and optimization. Use for slow loading, high memory, low FPS, or 'optimize my scene' requests; delegates auth\u002Fruntime setup to Phase 0 owners.","https:\u002F\u002Fgithub.com\u002Fopenai\u002Fplugins\u002Fblob\u002Fmain\u002Fplugins\u002Fnvidia\u002Fskills\u002Fomniverse-usd-performance-tuning\u002FSKILL.md",[143],{"categoryNo":86,"categoryName":87,"taxonomyType":68,"taxonomyTypeDesc":69},[145,74,146,102,147,148,131,105,127,149],"omniverse usd performance tuning","auth","memory","triage","authentication",{"skillNo":151,"name":152,"nameZh":6,"description":153,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":96,"licenseFileUrl":6,"sourceHtmlUrl":154,"categories":155,"keywords":157,"publishedAt":24},"01M6ACP73X9YS5Y730C2WE58YF","omniverse-realtime-viewer","Use as the top-level router for Omniverse Realtime Viewer USD app requests and focused viewer reference documents.","https:\u002F\u002Fgithub.com\u002Fopenai\u002Fplugins\u002Fblob\u002Fmain\u002Fplugins\u002Fnvidia\u002Fskills\u002Fomniverse-realtime-viewer\u002FSKILL.md",[156],{"categoryNo":86,"categoryName":87,"taxonomyType":68,"taxonomyTypeDesc":69},[158,159,102,131,160,161,162,127,124,163,107,164],"omniverse realtime viewer","realtime","electron","react","documents","cpp","typescript"]