mirror of
https://github.com/shadcn-ui/ui.git
synced 2026-06-28 07:04:20 +00:00
46 lines
1.0 KiB
Plaintext
46 lines
1.0 KiB
Plaintext
---
|
|
title: July 2023 - JavaScript
|
|
description: JavaScript version of components available via the CLI.
|
|
date: 2023-07-04
|
|
---
|
|
|
|
This project and the components are written in TypeScript. **We recommend using TypeScript for your project as well**.
|
|
|
|
However we provide a JavaScript version of the components, available via the [cli](/docs/cli).
|
|
|
|
```txt
|
|
Would you like to use TypeScript (recommended)? no
|
|
```
|
|
|
|
To opt-out of TypeScript, you can use the `tsx` flag in your `components.json` file.
|
|
|
|
```json {10} title="components.json" showLineNumbers
|
|
{
|
|
"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, you can use the following `jsconfig.json`:
|
|
|
|
```json {4} title="jsconfig.json" showLineNumbers
|
|
{
|
|
"compilerOptions": {
|
|
"paths": {
|
|
"@/*": ["./*"]
|
|
}
|
|
}
|
|
}
|
|
```
|