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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@brandup/ui-kit

v1.0.25

Published

Input control type and styles.

Readme

brandup-ui-kit

Installation and use

Install NPM package @brandup/ui-kit.

npm i @brandup/ui-kit@latest

Add @brandup/ui-kit middleware to your application.

import { ApplicationBuilder } from "@brandup/ui-app";
import { uiKitMiddlewareFactory } from "@brandup/ui-kit";

const builder = new ApplicationBuilder({});
builder
	.useMiddleware(uiKitMiddlewareFactory)
	.useMiddleware(... other middleware);

const app = builder.build({ basePath: "/" });

app.run();

Styles

Reset styles

Reset styles for <ul>, <ol>, <menu>, <img> and others.

See reset.less file.

Body styles

Default root styles for <body> tag.

--main-background
--font-size
--font-family
--font-weight
--line-height
--text-color

See common.less file.

Header styles

Default root styles for <h1>, <h2>, <h3>, <h4>, <h5>.

--h-line-height

--h1-font-size
--h1-font-weidth

--h2-font-size
--h2-font-weidth

--h3-font-size
--h3-font-weidth

--h4-font-size
--h4-font-weidth

--h5-font-size
--h5-font-weidth

See common.less file.

SVG styles

Default root styles for <svg> tag.

--svg-size: 20px;
--svg-fill: var(--text-color);
--svg-stroke: none;

See common.less file.

Content width

Add content-width class.

--content-max-width
--content-min-width
--content-padding-lr

See common.less file.

Input styles

Styles for:

  • reset for input, textarea, button
  • input[type=text]
  • input[type=tel]
  • input[type=email]
  • input[type=password]
  • input[type=search]
  • input[type=url]
  • input[type=date]
  • input[type=datetime]
  • input[type=datetime-local]
  • input[type=time]
  • input[type=file]
  • input[type=number]
  • input[type=checkbox]
  • textarea
  • select

See inputs.less file.

Popups

Popups work with class ui-popup.

<button data-command="ui-popup-toggle">Menu1</button>
<div class="ui-popup"></div>

<button id="menu2">Menu2</button>
<div id="popup2" class="ui-popup"></div>

<button>Menu3</button>
<div id="popup2" class="ui-popup"></div>

Open popup by popup and initiator element:

PopupManager.open(DOM.getById("popup2"), { initiator: DOM.getById("menu2") });

Open popup by only popup element:

PopupManager.open(DOM.getById("popup3"));

If the initiator is specified, then when the popup is opened again, it will be closed.

Style variables

Сreate uikit.vars.less in the root of the project.

Connecting script to webpack:

const parseLessVars = require("@brandup/ui-kit/build/parse-less-vars.cjs");

Getting variables from a Less file.

The function takes the path to the Less file (string) and returns an object with variables in the format:

The key is the name of a variable with the @ symbol (for example, @MainColor). Value — a string with the value of a variable from a file (for example, #ff0000).

Example of a Less file:

@main-color: #ff0000;
@secondary-color: rgba(0, 0, 0, 0.5);
@font-size: 16px;

Result of parseLessVars:

{
	'@main-color': '#ff0000',
	'@secondary-color': 'rgba(0,0,0,0.5)',
	'@font-size': '16px'
}
const variables = parseLessVars('path/to/your/variables.less');

if no parameter has been set, the function will refer to the uikit.vars.less into root directory.

Usage in the less-loader configuration.

{
	lessOption: {
		modifyVars: parseLessVars()
	}
}