Overview
Introduction
This page is an introduction to the ce-part-utils
library. It provides a description of the library and acts as a reference for documentation and examples.
Library
The ce-part-utils
library contains utilities for adding part
and exportparts
attributes to a custom HTML element, using classes, ids, tags and other element properties.
The library is intended to help with managing part assignment for custom elements that have a lot of shadow DOM child elements, and for custom elements that use child custom elements that are entirely private to the parent element.
To use the ce-part-utils
functions, import each function individually from the library's file.
Provide your custom element's shadow root to the functions to assign parts to the children of those shadow roots.
Installation
This library is available as a single file that can be referenced using a <script>
element. It can also be installed using any of the javascript package managers below:
npm install ce-part-utils