npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@umbraco-ui/uui-css

v1.16.0

Published

Umbraco UI css component

Readme

uui-css

npm

UUI-CSS package contains css files which can be included in your project or components if needed

  • custom-properties.css — use this if you like to include our custom properties in your project.
  • uui-font.css — use this if you like to import our font in your project. You must set the uui-font class on your root element.
  • uui-text.css — use this if you like to declare styles for typography for tags such as h1, h2. This is used in companionship with uui-font. Set the uui-text class on the element covering the scope of interest, this can be your root element. And if you want to use the styling inside a Shadow dom, that will have to have the uui-text class as well. See Applying the uui-css styling in the root. See examples

Bundle:

  • uui-css.css — If you like your project to be styled for Umbraco UI, then include this in the root of your project. This contains all the previous files, so make sure to only include this file in your project if you need to style your project. You will still have to apply the uui-font and uui-text classes.

See it in action

Preview on Storybook

Usage in your project

CDN

For the best results you should include the uui-css.css bundle in your project, which contains all the css files and custom variables:

<!-- Latest Version -->
<link
  rel="stylesheet"
  href="https://cdn.jsdelivr.net/npm/@umbraco-ui/uui-css@latest/dist/uui-css.css" />

<!-- Specific version -->
<link
  rel="stylesheet"
  href="https://cdn.jsdelivr.net/npm/@umbraco-ui/[email protected]/dist/uui-css.css" />

Installation

If you want to have fine-grained control over the CSS files, you can install the @umbraco-ui/uui-css package.

npm i @umbraco-ui/uui-css

Usage

For a build system like Vite, the styling could be included like this if you want to control the styling and variables with the build system:

// app.ts
import '@umbraco-ui/uui-css/dist/custom-properties.css';
import '@umbraco-ui/uui-css/dist/uui-font.css';
import '@umbraco-ui/uui-css/dist/uui-text.css';

Or you can just import the compiled bundle at once:

// app.ts
import '@umbraco-ui/uui-css/dist/uui-css.css';

Applying the uui-css styling in the root

Using the uui-font and uui-text

<body class="uui-font uui-text">
  <div id="app">
    <h1>Hello uui-css!</h1>
    <p>
      Everything inside my app will now use the font from uui-font and tag
      styling from uui-text because the root(body) has the uui-font and uui-text
      classes.
    </p>
  </div>
</body>

Using the custom properties:

<p style="background: var(--uui-interface-surface-alt);">
  I will now have a background color from the custom properties.
</p>

Full example:

<!doctype html>
<html>
  <head>
    <link
      rel="stylesheet"
      href="https://cdn.jsdelivr.net/npm/@umbraco-ui/uui-css@latest/dist/uui-css.css" />
  </head>
  <body class="uui-font uui-text">
    <div id="app">
      <h1>Hello uui-css!</h1>
      <p>
        Everything inside my app will now use the font from uui-font and tag
        styling from uui-text because the root(body) has the uui-font and
        uui-text classes.
      </p>
      <p style="background: var(--uui-interface-surface-alt);">
        I will have a background color from the custom properties.
      </p>
    </div>
  </body>
</html>

Applying uui-text in a component

Import the text css from uui-css

import { UUITextStyles } from '@umbraco-ui/uui-css';

Add the css to the component styles

static styles = [
  UUITextStyles,
  css`
  /* your css goes here */
`,
];

Add the uui-text class to the root of the component

<div class="uui-text">This is my custom element</div>

Full example:

import { html, css, LitElement } from 'lit';
import { customElement } from 'lit/decorators.js';
import { UUITextStyles } from '@umbraco-ui/uui-css';

@customElement('my-element')
export class MyElement extends LitElement {
  render() {
    return html`
      <div class="uui-text">
        This is my custom element
      </div>
    `;
  }

  static styles = [
    UUITextStyles,
    css`
      /* your css goes here */
    `,
  ];
}

declare global {
  interface HTMLElementTagNameMap {
    'my-element': MyElement;
  }
}