@nwire/amit-design-system
v0.1.37
Published
A vue3 library project base. Intended to quickstart your library development without all the configuration hassle.
Downloads
223
Readme
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.
- 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
- 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: {},
};
- Add the following for your
src/main.ts
and you can also create your owntailwind.css
import 'amit-design-system/style';
import './tailwind.css';
- 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'],
},
});
- Add the following options inside
vite.config.ts
{
"compilerOptions" : {
"paths": {
"@/*": ["node_modules/amit-design-system/src/*"],
"@public/*": ["node_modules/amit-design-system/public/*"]
}
}
}
- 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>
- 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