Skip to content

ucsc/truss

Repository files navigation

Truss

Netlify Status

Truss is a component library for UC Santa Cruz websites.

Note

Please note that the visual design of Truss components is dependent on the design choices in the UCSC 2022 WordPress theme.

Truss contains branded web components built with StencilJS. Truss components use the web components standard so they are cross-browser compatible.

Component status

In use today (status)

In development (status)

Using Truss components

The simplest way to get started with Truss is to add the released CSS and Javascript files to the bottom of your webpage.

<!-- Script and style to include Truss components.  -->
<script type="module" src="https://truss.ucsc.edu/ucsc-trss/ucsc-trss.esm.js"></script>
<link rel="stylesheet" href="https://truss.ucsc.edu/ucsc-trss/ucsc-trss.css">

After you've added the two files to your page, you can use any of the custom elements in Truss anywhere on your page. See the README file for each component for a list of attributes you can add to an element.

<trss-ucsc-header use-logo="true" search-action="/" search-query="s" style="--trss-content-width:80rem;"></trss-ucsc-header>

Developing Truss

Running Storybook

Storybook is used to preview components interactively during development.

npm run storybook

This runs Stencil in watch mode alongside the Storybook dev server on http://localhost:6006. Editing a component or story file hot-reloads the preview.

To produce a static bundle for deployment:

npm run build-storybook

The output is written to storybook-static/.

About

Web components for branded UC Santa Cruz websites and applications

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors