@fyn-software/remix-shadow-root
Lets you add a declaritive shadow root to components, allowing you to use the shadow DOM. This provides scoped CSS.
Installation
npm i @fyn-software/remix-shadow-root
Usage
import React from 'react';
import RemixShadowRoot from '@fyn-software/remix-shadow-root';
export default function MyComponent()
{
return <outer-element>
<RemixShadowRoot>
<h1>this is my awesome shadow DOM</h1>
</RemixShadowRoot>
</outer-element>
}
Props
Prop | Type | Values | Default | Description |
---|---|---|---|---|
mode |
String |
open or closed
|
open |
Sets the mode of the shadow root. |