Skip to content

Commit

Permalink
Add example of using noShadowDOM() (#2108)
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentfretin authored Mar 25, 2024
1 parent 2c27aae commit dbdc27d
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions packages/solid-element/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,17 @@ Props get assigned as element properties and hyphenated attributes. This exposes

This is all you need to get started with Solid Element.

A shadow DOM is used by default for style isolation. If you want to disable the shadow DOM, you can do it with `noShadowDOM()` like this:

```jsx
import { customElement, noShadowDOM } from 'solid-element';

customElement('my-component', {someProp: 'one', otherProp: 'two'}, (props, { element }) => {
noShadowDOM();
// ... Solid code
})
```

## Examples

[Web Component Todos](https://wc-todo.firebaseapp.com/) Simple Todos Comparison
Expand Down

0 comments on commit dbdc27d

Please sign in to comment.