1.0.3 • Published 2 days ago

@new-black/lyra v1.0.3

Weekly downloads
-
License
ISC
Repository
github
Last release
2 days ago

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.

1.0.3

2 days ago

1.0.2

8 days ago

1.0.1

15 days ago

0.1.21-78

16 days ago

1.0.0

16 days ago

0.1.21-77

19 days ago

0.1.21-76

19 days ago

0.1.21-75

22 days ago

0.1.21-73

23 days ago

0.1.21-72

23 days ago

0.1.21-74

23 days ago

0.1.21-71

24 days ago

0.1.21-70

24 days ago

0.1.21-69

25 days ago

0.1.21-68

26 days ago

0.1.21-67

26 days ago

0.1.21-66

29 days ago

0.1.21-64

1 month ago

0.1.21-65

1 month ago

0.1.21-62

1 month ago

0.1.21-61

1 month ago

0.1.21-63

1 month ago

0.1.21-60

1 month ago

0.1.21-59

1 month ago

0.1.21-58

1 month ago

0.1.21-57

1 month ago

0.1.21-56

1 month ago

0.1.21-55

1 month ago

0.1.21-54

1 month ago

0.1.21-53

2 months ago

0.1.21-52

2 months ago

0.1.21-51

2 months ago

0.1.21-50

2 months ago

0.1.21-49

2 months ago

0.1.21-48

2 months ago

0.1.21-47

2 months ago

0.1.21-46

2 months ago

0.1.21-45

2 months ago

0.1.21-44

2 months ago

0.1.21-43

2 months ago

0.1.21-42

2 months ago

0.1.21-39

2 months ago

0.1.21-40

2 months ago

0.1.21-41

2 months ago

0.1.21-38

2 months ago

0.1.21-35

2 months ago

0.1.21-37

2 months ago

0.1.21-36

2 months ago

0.1.21-34

2 months ago

0.1.21-31

2 months ago

0.1.21-30

2 months ago

0.1.21-33

2 months ago

0.1.21-32

2 months ago

0.1.21-29

2 months ago

0.1.21-28

3 months ago

0.1.21-27

3 months ago

0.1.21-26

3 months ago

0.1.21-25

3 months ago

0.1.21-24

3 months ago

0.1.21-23

3 months ago

0.1.21-22

3 months ago

0.1.21-21

3 months ago

0.1.21-20

3 months ago

0.1.21-17

3 months ago

0.1.21-16

3 months ago

0.1.21-19

3 months ago

0.1.21-18

3 months ago

0.1.21-15

3 months ago

0.1.21-14

3 months ago

0.1.21-13

3 months ago

0.1.21-12

3 months ago

0.1.21-9

3 months ago

0.1.21-8

3 months ago

0.1.21-11

3 months ago

0.1.21-10

3 months ago

0.1.21-7

3 months ago

0.1.21-6

3 months ago

0.1.21-2

3 months ago

0.1.21-1

3 months ago

0.1.21-0

3 months ago

0.1.21-5

3 months ago

0.1.21-4

3 months ago

0.1.21-3

3 months ago

0.1.20

4 months ago

0.1.19

5 months ago

0.1.17

5 months ago

0.1.10

7 months ago

0.1.11

7 months ago

0.1.12

7 months ago

0.0.22

10 months ago

0.1.13

7 months ago

0.1.14

7 months ago

0.0.24

10 months ago

0.1.15

7 months ago

0.0.25

10 months ago

0.0.15

10 months ago

0.0.16

10 months ago

0.0.17

10 months ago

0.0.18

10 months ago

0.0.19

10 months ago

0.0.10

10 months ago

0.0.11

10 months ago

0.0.12

10 months ago

0.0.13

10 months ago

0.0.14

10 months ago

0.1.0

9 months ago

0.1.2

9 months ago

0.1.1

9 months ago

0.1.16

6 months ago

0.1.8

7 months ago

0.0.26

9 months ago

0.0.9

10 months ago

0.1.7

7 months ago

0.0.8

10 months ago

0.0.28

9 months ago

0.1.9

7 months ago

0.1.4

8 months ago

0.0.5

10 months ago

0.1.3

9 months ago

0.1.6

7 months ago

0.0.7

10 months ago

0.1.5

7 months ago

0.0.6

10 months ago

0.0.4

11 months ago

0.0.3

11 months ago

0.0.2

11 months ago

0.0.1

11 months ago