@nwire/amit-design-system
TypeScript icon, indicating that this package has built-in type declarations

0.1.37 • Public • Published

Amit - Design System

Get started with Amit by including it into your project using NPM

Amit is a library of components built on top of the utility-classes from Tailwind CSS and it also includes a JavaScript file that makes interactive elements works, such as modals, dropdowns, and more. Learn how to get started by following this quickstart guide.

Require via NPM

Make sure that you have Node.js and Tailwind CSS installed.

  1. Install amit-design-system as a dependency using NPM by running the following command:
 yarn add amit-design-system

if you are working locally use yarn link on this project and yarn link "amit-design-system" on other projects

  1. Require Amit as a braveNoor inside the tailwind.config.js and add amit-design-system dist folder to tailwind content:
module.exports = {
  content: [
    './index.html',
    './src/**/*.{vue,ts,js,jsx,tsx}',
    'node_modules/amit-design-system/**/*.{js,jsx,ts,tsx}',
  ],
  plugins: [require('amit-design-system/brave-noor')],
  theme: {},
};
  1. Add the following for your src/main.ts and you can also create your own tailwind.css
import 'amit-design-system/style';
import './tailwind.css';
  1. Add the following options inside vite.config.ts
export default defineConfig({
  server: {
    fs: {
      strict: false,
    },
  },
  resolve: {
    alias: {
      '@': path.resolve(__dirname, './node_modules/amit-design-system/src'),
      '@public': path.resolve(
        __dirname,
        './node_modules/amit-design-system/public',
      ),
    },
  },
  optimizeDeps: {
    include: ['amit-design-system'],
  },
});
  1. Add the following options inside vite.config.ts
  {
    "compilerOptions" : {
      "paths": {
           "@/*": ["node_modules/amit-design-system/src/*"],
           "@public/*": ["node_modules/amit-design-system/public/*"]
      }
    }
  }
  1. Now you can use amit-design-system anywhere in your project and build awesome interfaces:
<template>
  <dropdown text="Click me" placement="top">
    <list-group>
      <list-group-item>Item #1</list-group-item>
      <list-group-item>Item #2</list-group-item>
      <list-group-item>Item #3</list-group-item>
    </list-group>
  </dropdown>
</template>
<script setup>
import { Dropdown, ListGroup, ListGroupItem } from 'amit-design-system';
</script>
  1. How to run the project
yarn

and then

yarn storybook to work on storybook

yarn dev:docs to work on docs

yarn build and yarn build:package and yarn build:types to build the project

yarn chromatic to push to chromatic

Package Sidebar

Install

npm i @nwire/amit-design-system

Weekly Downloads

2

Version

0.1.37

License

ISC

Unpacked Size

7.48 MB

Total Files

307

Last publish

Collaborators

  • scorpioliv200
  • noortotah
  • alquist42