0.1.4 • Published 1 year ago

react-shadow-element v0.1.4

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

React Shadow Element

React Shadow Element provides a JSX.Element with a Shadow DOM and, optionally, with a Light DOM, allowing the easy usage of named slots.

Installation

npm i react-shadow-element

Examples

At examples folder there are examples of usage.

Usage

Two JSX.Element are exported:

  1. Shadow: In which the shadow tree root is a <slot>.
  2. ShadowDiv: In which the shadow tree root is a <div>.

Shadow

PropTypeDefaultDescription
shadowChildrenJSX.ElementShadow DOM Children Elements.
styleCSSPropertiesundefinedStyles of the DOM Root DIV where the Shadow DOM and Light DOM is attached.
classNamestringundefinedClassNames of the DOM Root DIV where the Shadow DOM and Light DOM is attached.
childrenJSX.ElementundefinedLight DOM Children Elements.

ShadowDiv

PropTypeDefaultDescription
shadowChildrenJSX.ElementShadow DOM Children Elements.
shadowStyleCSSPropertiesundefinedStyles of the Shadow Root DIV where the Shadow DOM is attached.
styleCSSPropertiesundefinedStyles of the DOM Root DIV where the Shadow DOM and Light DOM is attached.
classNamestringundefinedClassNames of the DOM Root DIV where the Shadow DOM and Light DOM is attached.
childrenJSX.ElementundefinedLight DOM Children Elements.
0.1.4

1 year ago

0.1.3

1 year ago

0.1.2

1 year ago

0.1.1

1 year ago

0.1.0

1 year ago