shadow-view
TypeScript icon, indicating that this package has built-in type declarations

4.0.1 • Public • Published

ShadowView

一个针对 React 的 Shadow DOM 容器组件,利用 ShadowView 可更方便的在 React 应用中创建启用 Shadow DOM 的容器元素。

安装

npm i shadow-view --save

使用

function App() {
  return (
    <ShadowView
      scoped={{
        style: `*{color:red;}`,
        imports: ["aaa.css"]
      }}
    >
      <div>这是一个测试</div>
    </ShadowView>
  );
}

Dependencies (5)

Dev Dependencies (9)

Package Sidebar

Install

npm i shadow-view

Weekly Downloads

53

Version

4.0.1

License

MIT

Unpacked Size

57.9 kB

Total Files

51

Last publish

Collaborators

  • houzhanfeng