This repository contains the source code for web components developed for (and used by) the UW IT Design System.
Clone the repository and navigate to it, then run npm install
.
Run npm start
to see the components in action.
When adding a new component to the collection, follow these guidelines:
- Create a new directory for the component in the
src/
directory (e.g. "new-shiny") - Create an HTML and JS file for the component, with filenames that match the directory name (e.g. "new-shiny.html")
- Create a README.md in the component directory, where you will document any watched attributes, slots, or CSS-vars.
Once you have written some code you're ready to test, do the following:
- Run
npm build
to have rollup bundle the components' HTMl and JS files - Add a script take for your new component module in
index.html
(e.g. "new-shiny.min.mjs") - Add the custom element tag for the component to the document body where appropriate (e.g.
<new-shiny></new-shiny>
)