JSPM

@visa/nova-styles

1.6.2
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 273
  • Score
    100M100P100Q94684F
  • License Apache-2.0

Visa Product Design System Nova HTML+CSS library

Package Exports

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@visa/nova-styles) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    Visa Product Design System - Nova styles

    Nova styles

    Accessible Visa Product Design System components built for styles

    Nova styles is a comprehensive library of accessible components designed to align with the Visa Product Design System. It provides developers with a set of reusable UI elements that can be easily integrated into applications. With Nova styles, developers can quickly build visually consistent and user-friendly interfaces that adhere to accessibility best practices.

    Key Features

    • Wide range of components: Includes buttons, form elements, navigation menus, and more.
    • Customizable: Allows extensive theming and customization.
    • Accessibility: Adheres to accessibility best practices to ensure inclusive user experiences.

    Whether you are building a small project or a large-scale application, Nova styles offers a robust foundation for creating visually appealing and accessible user interfaces.

    Security

    Our package follows security best practices and ensures the safety of user data. It relies on a minimal number of dependencies, minimizing potential vulnerabilities.

    Install

    Available through the NPM.

    NPM:

    npm install @visa/nova-styles

    PNPM:

    pnpm install @visa/nova-styles

    Yarn:

    yarn add @visa/nova-styles

    Bun:

    bun add @visa/nova-styles

    Dependencies

    View our package.json for the most up-to-date dependencies, including peer dependencies and dev dependencies.

    Usage

    Step 1: Install Nova styles

    Reference our install guidelines.

    Step 2: Import Nova styles

    Once Nova styles is installed, you need to import it in your project. This process might look different depending on whether you're using HTML, React, or Angular. Follow the instructions for your setup below.

    HTML

    If you’re working with standard HTML, add a link to the Nova styles CSS file in your HTML file by replacing the actual path where the Nova styles files are located.

    <link rel="stylesheet" href="path/to/nova-styles/styles.css" />
    <link rel="stylesheet" href="path/to/nova-styles/themes/visa-light/index.css" />

    Step 3: Add icons (optional)

    You can use Nova CSS to add icons to your web applications. Use individual SVGs for specific icons or SVG sprites to efficiently load and reuse a full set of icons across your app.

    Installing @visa/nova-icons-svg

    npm install @visa/nova-icons-svg

    Installing @visa/nova-icons-sprite

    npm install @visa/nova-icons-sprite

    SVGs

    SVG stands for Scalable Vector Graphics, which is an image format based on XML for creating two-dimensional graphics. The key feature of SVGs is their scalability, allowing them to be resized without losing quality. This makes them ideal for the web, where images need to look good on various screen sizes and resolutions. Additionally, SVGs are often much smaller in size compared to JPEGs and PNGs.

    <svg
      class="v-icon v-icon-generic v-icon-tiny v-icon-checkmark"
      width="16"
      height="16"
      viewBox="0 0 16 16"
      xmlns="http://www.w3.org/2000/svg"
    >
      <path
        class="v-icon-primary"
        fill-rule="evenodd"
        clip-rule="evenodd"
        d="M13.7205 3.29397C13.3331 2.90266 12.7519 2.90266 12.3644 3.29397L5.97141 9.75049L3.64668 7.40266C3.25923 7.01136 2.67805 7.01136 2.29059 7.40266C1.90314 7.79397 1.90314 8.38092 2.29059 8.77223L5.1965 11.707C5.58396 12.0983 6.16514 12.0983 6.55259 11.707L13.6236 4.56571C14.108 4.27223 14.108 3.58744 13.7205 3.29397Z"
      />
    </svg>

    SVG sprites

    A sprite is a collection of SVG icons combined into a single file. This method is commonly used to enable a single server request for all icons, making it the most efficient way to access a large number of icons, especially if many are likely to be used during a session.

    Using SVG sprites

    Import and use icons sprite from @visa/nova-icons-sprite. This will add all of the icons as a sprite into your project and then reference them as needed. It’s up to you if you’d like to use the Visa sprite, the Generic sprite, or both.

    <svg
      class="v-icon v-icon-generic v-icon-tiny v-icon-calendar"
      height="16px"
      width="16px"
    >
      <use href="#calendar--tiny" xlink:href="#calendar--tiny" />
    </svg>

    Step 4: Use the components

    After adding icons, you’re ready to use styles components by copying and pasting the example code into your application. Check out any of our components to give it a try.

    Why Nova styles?

    Light Weight

    We've reduced our library to basic markup components and functional hooks for a lighter, simpler, and more flexible experience.

    Building Blocks

    No more waiting on feature requests. We provide the building blocks for you to easily create and customize your own components.

    Built For Developers

    Nova styles is sleek and unobtrusive. Our beautifully designed components allow any developer to create stunning apps with ease.

    Testing

    Our Approach

    We conduct rigorous testing using Jest to ensure our components are accessible and meet our high standards. We use Axe for comprehensive accessibility testing and snapshot testing to minimize regression. Each component undergoes individual unit testing based on its API, followed by integration testing using examples to ensure seamless interaction.

    Our goal is to achieve 100% test coverage for all components. Our pipeline safeguards against merging any code that fails our tests. While we have hundreds of tests providing us with full code coverage, we recognize that there is always room for improvement. We are constantly working to improve our testing suite.

    Maintainers

    This project is maintained by the Visa Product Design System engineering team. If you need to get in touch please reach out to us via any of our options on our support page.

    Thanks

    Thanks to all those who have contributed and to the Visa Product Design team for all of the hours and thought that have gone into making the design system as easy to use as possible.

    Contributing

    SEE CONTRIBUTING.md

    License

    SEE LICENSE IN LICENSE