Installation
How to setup and use components
Start using the v-moravec/ui library efficiently with the Command Line Interface (CLI) tool. This guide outlines the steps to initialize a project and add components or blocks.
Prerequisites
Ensure Node.js is installed on the system to use npm
and npx
, which are necessary for executing the commands provided in this guide.
Initialize inside the Nuxt project
To prepare the project with all necessary files and dependencies, run the following command in the terminal:
npx @v-moravec/ui init
This command adds the required files and dependencies to begin integrating components and blocks, ensuring they function as intended.
You will need to add @nuxtjs/tailwindcss
and nuxt-icon
to your modules in nuxt.config.ts
. You can do that using nuxi module add
command:
Add module to use Tailwind:
npx nuxi module add @nuxtjs/tailwindcss
Add module to use icons:
npx nuxi module add nuxt-icon
Add Components and Blocks
That's it. Your project is now ready and you can start adding components and blocks.
Components and blocks can be found in the documentation. To add a component or block, use the commands provided in the documentation, following this format:
npx @v-moravec/ui add [...componentName/blockName]
Copy the appropriate command into the terminal to add the desired component or block to the project. Call the command inside the root of your project.
By following these steps, projects can be quickly and efficiently set up with the v-moravec/ui library, streamlining the development process.
You can start by adding button to your project.