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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@snyk-mktg/brand-ui

v1.0.16

Published

The official style library for Snyk’s BrandUI Design System

Downloads

165

Readme

snyk-mktg-brand-ui

Snyk BrandUI 🐾 🖥 💻 📱

Total Downloads Latest Release License


Welcome to BrandUI, the official styles library for Snyk’s Marketing design system.

Note: This is the successor to the previous prototype, Snyk MarketingUI (aka "SMUi").

Documentation

The full documentation can be found at https://brand-ui.snyk.marketing/.

Getting Started with the Styles Library

Setting it up

Install Snyk BrandUI with either npm:

npm i @snyk-mktg/brand-ui

or yarn:

yarn add @snyk-mktg/brand-ui

Compiling it

Compile Snyk BrandUI CSS by running the gulp command. This will build CSS files in a css directory at the root of this project. To test out development locally:

  1. Install the Live Server extension in VSCode. This can be found in the Recommended Extensions in the extensions tab.
  2. Create an index.html file at the root of this project. Add this template to the file:
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Snyk BrandUI Test area</title>
    <link rel="stylesheet" href="dist/css/dev/index.css">
</head>

<body class="snyk-brand-ui">
    <main>
        <section class="brandui-section">
            <div class="brandui-container">
                <div class="max-w-6 marg-h-auto txt-center">
                    <h1 class="txt-page-title">BrandUI Testing Area</h1>
                    <p class="txt-body">Use this as a testing area when creating SCSS styles</p>
                </div>
            </div>
        </section>
        <section class="brandui-section">
            <div class="brandui-container">
                <!-- Test inside this container -->

            </div>
        </section>
    </main>
</body>

</html>
  1. You can now add some HTML with BrandUI classes to the section.
  2. Run yarn gulp. This will compile the CSS in the css directory and watch for any changes to .scss files.

Making changes to variables

Snyk BrandUI is set up to export its variables from the _variables.scss file to a variables.json file to be leveraged through a js import/export. If any changes need to be made to the variables you must:

  1. Run yarn gulp so that the gulp watchStyles task runs before starting to make your changes.
  2. Make your changes and the jsonVariables task will keep the variables.json file up to date.
  3. Ensure that the variables.json file is included in your commits.

Using Snyk BrandUI

Snyk BrandUI is compiled both as a whole bundle and into broken down sections.

Snyk BrandUI can be used through its design tokens, (CSS class names) or through mixin includes of custom BrandUI functions, which can be referenced from the official documentation. Once you have access to Snyk BrandUI, you can access the styles as follows:

import './node_modules/@snyk-mktg/brand-ui/dist/scss/[index | index-wrapped | core | brand | atoms].scss';

If you are using WebPack, then you can reference the styles through an alias as follows:

module.exports = {
	resolve: {
		alias: {
			'@snyk-mktg/brand-ui': path.resolve(
				__dirname,
				'./node_modules/@snyk-mktg/brand-ui/dist/scss/[index | index-wrapped | core | brand | atoms].scss'
			),
		},
	},
};