Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@new-black/lyra

Package Overview
Dependencies
Maintainers
0
Versions
172
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@new-black/lyra

Stylable design system based on tailwind and react-aria.

  • 1.1.3-next.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
430
decreased by-10.97%
Maintainers
0
Weekly downloads
 
Created
Source

Lyra - Design System

Note: This package is currently under development and should not be used in a production environment.

Lyra is a comprehensive design system aimed at providing consistent and reusable components, styles, and guidelines for building user interfaces. It is designed to streamline the UI development process and ensure a cohesive visual and interactive experience across all projects.

Features

  • Pre-defined UI components such as buttons, accordions, modals, etc.
  • Consistent typography, colors, and spacing guidelines, we use Tailwind for that.
  • Accessibility considerations implemented by default (react-aria).
  • Theming capabilities to match various branding requirements.

Installation

npm i @new-black/lyra

or

yarn add @new-black/lyra
// tailwind.config.ts
import { lyraPreset } from "@new-black/lyra";

export default {
  content: [
    ...,
    "./node_modules/@new-black/lyra/dist/**/*.{js,ts,jsx,tsx,mdx}",

  ]
  presets: [lyraPreset],
  ...
} satisfies Config;

/** index.css */
@tailwind base;
@tailwind components;
@tailwind utilities;

@layer base {
  /* Add your fonts there */
  @font-face {
    font-family: "Inter";
    src: url("/fonts/inter-regular.ttf") format("truetype");
    font-weight: 400;
  }

  /* set global styling */
  * {
    -webkit-font-smoothing: antialiased;
  }
}

Icons

For the icons used in Lyra we use an SVG sprite. To copy the SVG sprite to your public folder, execute the following command in your terminal:

cp node_modules/@new-black/lyra/dist/icons public

SVG sprites are a convenient way to use icons in web development. Here's why they are nice to use:

  1. Reduced HTTP requests: SVG sprites allow multiple icons to be combined into a single file. This eliminates the need for separate HTTP requests for each individual icon, resulting in faster page loading times.
  2. Scalability: SVG icons are vector-based, meaning they can be scaled up or down without losing quality. With an SVG sprite, you have access to a collection of scalable icons.
  3. Ease of use: By using an SVG sprite, you can reference specific symbols within the sprite using their IDs. This makes it simple to insert and style icons within your HTML or CSS.
  4. Efficient caching: When an SVG sprite is used, it can be cached by the browser, allowing subsequent page loads to utilize the cached sprite. This improves performance and reduces bandwidth usage.

Overall, SVG sprites offer a lightweight, flexible, and performant solution for incorporating icons into web projects.

// Some root component
import { Provider } from "@new-black/lyra";
import "./index.css";
import "@new-black/lyra/dist/style.css";

export const Root = () => {
  return (
    <Provider locale="en">
      <App />
    </Provider>
  );
};

Usage

Once installed, you can import Lyra components and styles into your project:

import { Button, Accordion } from "@new-black/lyra";

Check out the documentation (not yet available) for a detailed guide on using and customizing Lyra.

Roadmap

Our future plans for Lyra include:

  • Adding more components and design elements.
  • Enhancing documentation with usage examples and guidelines.

Please note that this roadmap is subject to change as the project evolves.

How to Publish Changes to @new-black/lyra

Follow these steps to publish updates to the @new-black/lyra package:

Step 1: Create a Feature Branch

  1. Checkout the develop branch: git checkout develop
  2. git pull origin develop
  3. Create a new branch for your changes: git checkout -b feature/your-feature-name
  4. Make your changes in the newly created branch
  5. When done, test if the package can still build by running npm run build

Step 2: Bump the Version

Update the package version: npm version patch This will increment the patch version (e.g., from 1.0.0 to 1.0.1).

Step 3: Create a Release Pull Request

  1. Push your changes to the remote repository: git push origin feature/your-feature-name
  2. Create a pull request with the following naming convention: release/{new version}

Step 4: Merge the Pull Request

  1. Merge the PR into the main branch through the GitHub interface.

Step 5: Prepare for Publishing

  1. Checkout the main branch: git checkout main
  2. Pull the latest changes: git pull origin main
  3. Install dependencies and build the package: npm install and npm run build

Step 6: Publish the Package

Publish the package to npm: npm publish. Ensure the build was successful before running this command. By following these steps, you can ensure that your changes are correctly implemented and published to the @new-black/lyra package.

FAQs

Package last updated on 05 Nov 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc