1.22.0 ā€¢ Published 15 days ago

@ost-cas-fee-adv-23-24/design-system-component-library-team-batman v1.22.0

Weekly downloads
-
License
MIT
Repository
github
Last release
15 days ago

npm npm.io npm.io npm.io npm.io npm.io npm.io

Project: Design System Component Library

This project is a design system component library built with React, TypeScript & Tailwind.
It is a project for the CAS Frontend Engineering Advanced course at the OST. The goal of this project is to create a design system component library that can be used in other projects.

Folder Structure

šŸ’» Stack

  • āš›ļø react: JavaScript library for building user interfaces.
  • ā© next: React framework for server-side rendering, static site generation, and more.
  • šŸŽØ tailwindcss: Utility-first CSS framework for rapidly building custom designs.
  • šŸ“˜ typescript: Typed superset of JavaScript that compiles to plain JavaScript.
  • šŸ“š storybook: UI development environment and component library for building, documenting, and testing UI components.
  • āš™ļø @headlessui/react: Completely unstyled, fully accessible UI components, designed to integrate beautifully with Tailwind CSS.
  • šŸ”§ tailwind-merge: Tailwind CSS plugin for merging utilities.
  • šŸ”— clsx: Tiny utility for constructing className strings conditionally.
  • šŸš€ framer-motion: Production-ready animation library for React.
  • šŸ‘® eslint: Pluggable and configurable linter tool for identifying and reporting on patterns in JavaScript.
  • āœļø prettier: Opinionated code formatter that enforces a consistent code style.

šŸ“ Project Summary

  • src: Main source directory containing all the project's components and utilities.
  • src/docs: Directory for Storybook's documentation files.
  • src/utils: Directory for utility functions.
  • src/components: Directory for reusable UI components.

šŸš€ Run Locally

  1. Clone the design-system-component-library-team-batman repository:
git clone https://github.com/ost-cas-fee-adv-23-24/design-system-component-library-team-batman
  1. Install the dependencies with one of the package managers listed below:
npm install
  1. Start the development mode:
npm run storybook
  1. Open http://localhost:6006 with your browser to see the result.

šŸ’” Tipp

Don't forget to install the recommended extensions for vscode .vscode/extensions.json

šŸš€ Build package

npm run build

Output will be in the dist folder.

šŸš€ Install package

install package from npm

npm i @ost-cas-fee-adv-23-24/design-system-component-library-team-batman

šŸš€ Usage

To use the components styles, you have 3 Options:

  • Option 1: import the minified css file in your project.
import '@ost-cas-fee-adv-23-24/design-system-component-library-team-batman/style.css';
module.exports = {
  presets: [require('@ost-cas-fee-adv-23-24/design-system-component-library-team-batman/tailwind.config.ts')],

  // ... rest of your config
};
module.exports = {
  content: [
    // ...
    './node_modules/@ost-cas-fee-adv-23-24/design-system-component-library-team-batman/dist/**/*.{js,ts,jsx,tsx}',
  ],
  // ... rest of your config
};

šŸŽ‰ after that you can use the components in your project. šŸŽ‰

import { Button } from '@ost-cas-fee-adv-23-24/design-system-component-library-team-batman';

const App = () => {
  return <Button>Click me</Button>;
};

šŸ’” Next.js Server Components

Next.js 13 introduces a new app/ directory structure. By default it uses Server Components. As some of our components use React hooks, we added in those cases the "use client"; tag, so you can import them directly in your React Server Components (RSC).

šŸ™Œ Maintainers (Team Batman)

šŸ“„ License

This project is licensed under the MIT License - see the MIT License file for details.

1.22.0

15 days ago

1.21.1

23 days ago

1.21.0

27 days ago

1.20.2

30 days ago

1.20.3

30 days ago

1.20.1

1 month ago

1.20.0

1 month ago

1.19.11

2 months ago

1.19.10

2 months ago

1.19.8

2 months ago

1.19.9

2 months ago

1.19.4

2 months ago

1.19.7

2 months ago

1.19.6

2 months ago

1.19.5

2 months ago

1.19.0

2 months ago

1.19.3

2 months ago

1.19.2

2 months ago

1.19.1

2 months ago

1.18.9

3 months ago

1.18.8

3 months ago

1.18.7

3 months ago

1.18.5

3 months ago

1.18.4

3 months ago

1.18.6

3 months ago

1.18.3

3 months ago

1.18.1

4 months ago

1.18.2

4 months ago

1.18.0

5 months ago

1.17.0

5 months ago

1.16.0

6 months ago

1.15.0

6 months ago

1.14.0

6 months ago

1.13.0

6 months ago

1.12.0

6 months ago

1.11.0

6 months ago

1.10.0

6 months ago

1.9.1

7 months ago

1.9.0

7 months ago

1.8.0

7 months ago

1.7.0

7 months ago

1.6.0

7 months ago

1.5.0

7 months ago

1.4.0

7 months ago

1.3.1

7 months ago

1.3.0

7 months ago

1.2.0

7 months ago

1.1.0

7 months ago

1.0.2

7 months ago

1.0.1

7 months ago

1.0.0

8 months ago