Installation
A comprehensive overview and guide on the installation process for integrating shadcn/ui components into your project, covering necessary dependencies and project structure considerations.
Installation Guides for Various Frameworks
Utilizing TypeScript with shadcn/ui
Both this project and the provided components are developed using TypeScript. While not strictly required, we highly recommend utilizing TypeScript for your own project to leverage its benefits, such as improved code maintainability and early error detection.
However, for developers who prefer or require JavaScript, a JavaScript version of the components is also available. You can obtain the JavaScript version through the command-line interface (CLI).
If you choose not to use TypeScript in your project, you can disable the generation of TypeScript component files by setting the tsx flag to false within your components.json configuration file.
{
"style": "default",
"tailwind": {
"config": "tailwind.config.js",
"css": "src/app/globals.css",
"baseColor": "zinc",
"cssVariables": true
},
"rsc": false,
"tsx": false,
"aliases": {
"utils": "~/lib/utils",
"components": "~/components"
}
}To configure import aliases when working with JavaScript, you can utilize the following jsconfig.json file. This helps in resolving module paths correctly within your development environment.
{
"compilerOptions": {
"paths": {
"@/*": ["./*"]
}
}
}