This library is for next.js and react only.
- easily, Data mapping support
- preset calendar
- Customize the calendar component
- And more... do whatever you need
This CLI automatically copies the calendar component files from the GitHub repository and places them in your project.
Add the calendar component to your project.
# next.js
npx create-next-app@latest
# React
npm create vite <project-name> --template react<ts,js>
#or npm i create-react-app...
npm install cli-custom-calendar
#or
pnpm add cli-custom-calendar
yarn add cli-custom-calendar
npx cli-calendar init
#or
yarn, pnpm cli-calendar init
During initialization, you'll be prompted to:
Choose your styling
- CSS Modules
- Tailwind CSS
a
module.json
file will be created in your project// module.json
{
"name": "Calendar",
"version": "...",
"description": "A customizable calendar component using Day.js",
"packageManager": "pnpm", // your project manager
"isSrcDir": true, // path resolve
"type": "react", // react or next
"isRsc": false, // next.js pages or app
"isTsx": true, // typescript or javascript
"isUsingAppDir": false, // next.js & Dirpath
"styleType": "Tailwind",// style type
"pathResolve": "path" // template path
}
To add the calendar component, use the following CLI command:
npx cli-calendar add
#or
yarn, pnpm cli-calendar add
After installing the Calendar Component, you can uninstall my package and remove the module.json
file if you no longer need them.
npm uninstall cli-custom-calendar
#or
yarn, pnpm remove cli-custom-calendar
This project uses the following dependencies:
- Day.js for date manipulation
- clsx for conditional classNames
- class-variance-authority for utility class management
- Tailwind CSS (optional) or CSS Modules
//2024.09.19 ~ ing
@todo
mk demo
dev template
dev
If you encounter any issues or errors while using this package, please feel free to open an issue on the repository. https://github.com/lunaxislu/cli-calendar-lib/issues