How to Install Shadcn in React, Vite with Javascript | Set up shadcn/ui in React, Vite, Javascript

Поділитися
Вставка
  • Опубліковано 5 жов 2024
  • In this tutorial, I'm going to teach you how to install Shadcn/ui in React with Vite project. This video will use JavaScript instead of Typescript. The Shadcn documentation does not mention clearly about how to install shadcn/ui in React and Vite under JavaScript. I will make the installation of shadcd/ui clear and step-by-step in this tutorial.
    If you want to know how to set up shadcn/ui in JavaScript projects, this video tutorial will help you install Shadcn successfully.
    Shadcn Docs - ui.shadcn.com/...

КОМЕНТАРІ • 157

  • @wakandagaming5763
    @wakandagaming5763 6 місяців тому +8

    hi all if u get style not working after follow this tutorial just import u'r global css bruh import "./style/global.css";

    • @Devtamin
      @Devtamin  6 місяців тому +1

      Thank you for sharing

    • @Electro_69
      @Electro_69 4 місяці тому +3

      Thanks bro after reading this comment i restored my folder from recycle bin and it worked

    • @augustinradjou3909
      @augustinradjou3909 2 місяці тому

      Thanks

    • @Reels-fact-7
      @Reels-fact-7 Місяць тому

      @@Devtamin npx shadcn-ui@latest init sir its not working,, help me please

  • @abidibnazam4462
    @abidibnazam4462 8 місяців тому +30

    This man exactly uploads what I need, he finds the gap that no one tells and makes great tutorials. Thanks man!

    • @Devtamin
      @Devtamin  8 місяців тому +2

      Happy to help!

    • @nichas143
      @nichas143 7 місяців тому +2

      yes this is the place even i got stuck.

  • @nemeziz_prime
    @nemeziz_prime 8 місяців тому +17

    This is exactly what I was looking for. It felt like ShadCN instructions on their docs are more oriented towards NextJS. But you made it easy for people using React and Vite. Thanks a lot!

    • @Devtamin
      @Devtamin  8 місяців тому +1

      You're welcome

  • @parshv9-b47sheth3
    @parshv9-b47sheth3 6 місяців тому +4

    i spend 30 min to config shadcn this guy done very rapidly good video

    • @Devtamin
      @Devtamin  6 місяців тому

      Happy to help

    • @Electro_69
      @Electro_69 4 місяці тому

      fr he made it too simple

  • @shafiemukhre
    @shafiemukhre 8 місяців тому +4

    Javascript is a much better option for the purpose of a hackathon, this is helpful to know how to set up tailwind and shadcn for vite-react in JS, thank you!

    • @Devtamin
      @Devtamin  8 місяців тому

      You're welcome

  • @lituanaskobea.9826
    @lituanaskobea.9826 17 днів тому +1

    I'll be taking on a hackathon match these coming weeks and this is exactly what am looking forrrr, thank youuuuu!!!

    • @Devtamin
      @Devtamin  17 днів тому

      I highly recommend using Typescript with Shadcn/ui rather than Javascript because Typescript is officially supported

  • @Paradox_1
    @Paradox_1 7 місяців тому +4

    you are a live saver for React developer 😎✅⚡

    • @Devtamin
      @Devtamin  7 місяців тому

      You're welcome

  • @LearnAlongFaizan
    @LearnAlongFaizan 8 місяців тому +2

    It was literally useful for us, Thank you so much.
    hoping for some long tutorials and auth for react and continue with backend api

    • @Devtamin
      @Devtamin  8 місяців тому

      More to come!

  • @benson52541110
    @benson52541110 8 місяців тому +3

    Thank you for your help. I have been stuck on the jsconfig.json file for a while.

    • @Devtamin
      @Devtamin  8 місяців тому

      Glad I could help

  • @gabrielzhu3236
    @gabrielzhu3236 8 місяців тому +3

    thanks a lot this is really helpful!however I have a question about the form component, becasue it seems using some features that only typescript used? Can you give a tutorial about how to use the form component in js? Again thank you sooo much !

    • @Devtamin
      @Devtamin  8 місяців тому +1

      Sorry to hear that there is a bug on form components. There was a comment requesting me to do this video and I did not check it thoroughly if there is a bug. I will try to check it out again. Thank you for your comment.

  • @tejasnasre3074
    @tejasnasre3074 7 місяців тому +4

    Thank You Brother Nice Explanation

  • @UsmanHussain-k3d
    @UsmanHussain-k3d 8 місяців тому +2

    You are explanation is a very clear and amazing , please do the Laravel + react crud with Tailwind css , please😊 , it's more help for meAmazing

    • @Devtamin
      @Devtamin  8 місяців тому +1

      Thank you, I will

  • @jacksine-uh8bt
    @jacksine-uh8bt 6 місяців тому +2

    Thank you Man for helping my projects❤❤

    • @Devtamin
      @Devtamin  6 місяців тому

      No problem 😊

  • @mohammedhamza5242
    @mohammedhamza5242 7 місяців тому +1

    Great!! This was what I needed. Another question: Have you made a video on how to use next-ui with Vite+React and JavaScript?

    • @Devtamin
      @Devtamin  6 місяців тому +1

      Not yet! I will do. Thank you for the question. It is a great idea

    • @Devtamin
      @Devtamin  6 місяців тому

      ua-cam.com/video/7zNmLhWerng/v-deo.html

    • @mohammedhamza5242
      @mohammedhamza5242 6 місяців тому

      @@Devtamin Thanks for this one too.

  • @cy4381
    @cy4381 6 місяців тому +1

    I usually don't comment on videos but this video helped me a lot. Thanks

    • @Devtamin
      @Devtamin  6 місяців тому

      Glad to hear it

  • @sanchit0160
    @sanchit0160 7 місяців тому +2

    thank you brother
    love and respect from India

    • @Devtamin
      @Devtamin  7 місяців тому

      Glad it helped!

  • @durgfestivalvibes
    @durgfestivalvibes 7 місяців тому +1

    Couldn't find video for using vite react shadcn ui and in suggested videos got your video!!
    Thanks man!!! 🫶 🙏
    Subscribed!!

    • @Devtamin
      @Devtamin  7 місяців тому

      Thanks for the sub!

  • @tech-adventurer
    @tech-adventurer 2 місяці тому

    Excellent video! To he point and with a very clear instruction!
    Well done 💪

  • @carlosdelac
    @carlosdelac 8 місяців тому +3

    Very helpful, thank you!

    • @Devtamin
      @Devtamin  8 місяців тому +1

      Glad it was helpful!

  • @elmenikmati
    @elmenikmati 7 місяців тому +3

    ¡Excelente, justo lo que necesitaba! gracias

    • @Devtamin
      @Devtamin  6 місяців тому +1

      You're welcome

  • @_itshenry
    @_itshenry 5 місяців тому +1

    You're a life saver bro... what about Aceternity UI for React JS😁

  • @beautifulworld3430
    @beautifulworld3430 25 днів тому

    Thankyou so much I was struggling to setup shadcn

  • @zantica
    @zantica 19 днів тому +1

    if u have a troubble on a shadcn cli step, configure tailwindcss with the official doc...

  • @komauk4368
    @komauk4368 8 місяців тому +2

    I don't use tailwind css class.Can you help me?

    • @Devtamin
      @Devtamin  8 місяців тому

      can you explain more about it ?

  • @UXDlozi
    @UXDlozi 5 місяців тому +2

    Thank you so much, great tutorial.

    • @Devtamin
      @Devtamin  5 місяців тому

      You're very welcome!

  • @jasonsutis3387
    @jasonsutis3387 21 день тому +1

    Ty - i tried to figure this out for.....wayyyyy too long and was unable to get the imports correct (or something idk wow)

  • @mohandev005
    @mohandev005 Місяць тому +1

    Thanks a lot man😊 , you save my day.

  • @pushkarjain4669
    @pushkarjain4669 2 місяці тому +1

    saved my lots of time. Thank you so much

  • @manojmurugan590
    @manojmurugan590 Місяць тому +1

    Thanks bro for clearing my dobuts

  • @shashanksaurabh6478
    @shashanksaurabh6478 2 місяці тому

    thankyou!
    Finally I was able to set up project with this video.

    • @owaisali7063
      @owaisali7063 2 місяці тому

      bro but there is two tsconfig files how to in the shadcn docs how to tackle that ?

    • @shashanksaurabh6478
      @shashanksaurabh6478 2 місяці тому

      @@owaisali7063 in mine I was not getting two TS config

  • @Solohd12
    @Solohd12 6 місяців тому +1

    This means i can use alias in js ??

  • @martinoklapez
    @martinoklapez 6 місяців тому +1

    Why do you created 2 Carousel files / components? Why did you create the demo carousel file when you already had the carousel.tsx file automatically through the "comand npx shadcn-ui@latest add carousel"?
    Coulnd't you just paste the example code from the shadcn website into the automatically generated component file?

  • @adarsh-chakraborty
    @adarsh-chakraborty 5 місяців тому +2

    THANK YOU SO MUCH

  • @quoclam7140
    @quoclam7140 8 місяців тому +1

    Can you make a video of installing shadcn with cra and no typescript? I’m working on a codebase that has those

    • @Devtamin
      @Devtamin  8 місяців тому +1

      Sorry, I don't recommend using create-react-app anymore

  • @nast7458
    @nast7458 Місяць тому

    Thanks ao so much for yhis tutorial!! ❤❤❤

  • @SagaraNuwan-b7j
    @SagaraNuwan-b7j 4 місяці тому +1

    thank you so much.. nice explanation

    • @Devtamin
      @Devtamin  4 місяці тому

      You are most welcome

  • @MOHAMED-AMINE-CHEKROUNI
    @MOHAMED-AMINE-CHEKROUNI 5 місяців тому

    thanke you for this video, you saved me so much time, you got new subscriber

  • @Shiv_kolekar
    @Shiv_kolekar 2 місяці тому +1

    Really helpful video, keep it up👍🏻

    • @Devtamin
      @Devtamin  Місяць тому

      Thank you for a comment

  • @amitodak
    @amitodak 8 місяців тому +1

    hi, can you show how to install tailwind css in nextjs app router with typescript and vite. thank you!

    • @Devtamin
      @Devtamin  8 місяців тому

      I put it on my list

  • @StaceyLust
    @StaceyLust 2 місяці тому +1

    the docs have been updated plsss can you do another video
    like im having random typo errors in my jsconfig.json and jsconfig.app.json
    and its from the docs

    • @Devtamin
      @Devtamin  2 місяці тому

      I'll check it out

  • @imdefnotash
    @imdefnotash 7 місяців тому +1

    it's working but i guess mine's broken it's half way there.. i think the css is not applied properly

    • @Devtamin
      @Devtamin  7 місяців тому

      let's share a solution if you figure it out

    • @wakandagaming5763
      @wakandagaming5763 6 місяців тому

      just import u'r global css bruh import "./style/global.css";

  • @vamsimonohar
    @vamsimonohar 2 місяці тому +1

    Hi Devtamin, what keyboard do you use?

    • @Devtamin
      @Devtamin  2 місяці тому

      Dell

    • @vamsimonohar
      @vamsimonohar 2 місяці тому

      @@Devtamin can you pls tell me the model as well 😅 Thank you

  • @adityashrestha2774
    @adityashrestha2774 6 місяців тому +1

    most components use typescript though?

    • @Devtamin
      @Devtamin  6 місяців тому

      You're right. Most people ask me to do it video.

  • @thefastest5997
    @thefastest5997 9 днів тому +1

    Thank You!!!

  • @AhmadMughal1
    @AhmadMughal1 2 місяці тому

    The issue with this that it shows no intellisense for when using onClick or ClassName attribute on all of these components i don't seem to find any way to resolve.

  • @GokulHans
    @GokulHans 8 місяців тому +3

    Thanks a lot bro

    • @Devtamin
      @Devtamin  8 місяців тому +1

      Always welcome. Thank you for a comment

    • @GokulHans
      @GokulHans 8 місяців тому +1

      @@Devtamin 😌

  • @chamalsena
    @chamalsena 5 місяців тому +2

    thank you bro

    • @Devtamin
      @Devtamin  5 місяців тому

      You're welcome!

  • @german4539
    @german4539 6 місяців тому +2

    ty so much bro!

    • @Devtamin
      @Devtamin  6 місяців тому

      Happy to help

  • @hungvuong48
    @hungvuong48 8 місяців тому +1

    I have a problem with a dialog in extensions, it can't open

    • @Devtamin
      @Devtamin  8 місяців тому

      what is the dialog?

  • @Aryan-p2e4z
    @Aryan-p2e4z 19 днів тому +1

    hii, what vs code theme you are using?

    • @Devtamin
      @Devtamin  18 днів тому

      I use Mater Icon Theme

  • @ExpoDev_Dash
    @ExpoDev_Dash 4 місяці тому +1

    hey, I am not using vite. will this still work ? I dont have a vite config file

    • @Devtamin
      @Devtamin  4 місяці тому

      Nope

    • @ExpoDev_Dash
      @ExpoDev_Dash 4 місяці тому

      @@Devtamin yeah.. i had to do manual install

  • @quoclam7140
    @quoclam7140 8 місяців тому +1

    following just for this tutorial

    • @Devtamin
      @Devtamin  8 місяців тому

      Thank you so much

  • @SAJIDALAM-pj6dp
    @SAJIDALAM-pj6dp 3 місяці тому

    Failed to load jsconfig.json. Couldn't find tsconfig.json after all the step comlet in the last enter it give me that error can u give me a solution

  • @rotes3106
    @rotes3106 8 місяців тому +1

    Thanks brother. But, somehow my tailwindcss is not working after installing shadcn

    • @Devtamin
      @Devtamin  8 місяців тому

      What happened?

    • @pedrofigueirinha5325
      @pedrofigueirinha5325 7 місяців тому

      @@Devtamin for me the button is at middle of the page and so is the div
      The tailwind.config.js file has a bunch of code using module.exports = ... where module is not defined and at the end has plugins: [require("tailwindcss-animate")], where require() is not defined. Also, in the button component, every prop is triggering the error propName' is missing in props validation. In the vite.config.js in the alias _dirname is not defined.

    • @wakandagaming5763
      @wakandagaming5763 6 місяців тому

      just import u'r global css bruh import "./style/global.css";

    • @arochacarlstephen
      @arochacarlstephen 5 місяців тому

      @@wakandagaming5763 where do I input that?

    • @wakandagaming5763
      @wakandagaming5763 5 місяців тому

      @@arochacarlstephen import your css file bro import from "your css Path"

  • @Stufflahza
    @Stufflahza 6 місяців тому +2

    your the best

    • @Devtamin
      @Devtamin  6 місяців тому +1

      Thank you for a comment

  • @salehdz3399
    @salehdz3399 4 місяці тому

    if i using react without vite i need to following the same steps for vite ?

  • @vladimirfilipovic5845
    @vladimirfilipovic5845 5 місяців тому +1

    Thanks

  • @eduardomatheussilvadasneve6980
    @eduardomatheussilvadasneve6980 4 місяці тому +1

    every good my friend!

    • @Devtamin
      @Devtamin  4 місяці тому

      Thank you! Cheers!

  • @khuramshahzad9089
    @khuramshahzad9089 2 місяці тому

    followed all the steps but got the following error :
    "
    PS C:\Users\momin\Desktop\New folder\githubProfileChecker> npx shadcn-ui@latest init
    node:internal/modules/esm/resolve:215
    const resolvedOption = FSLegacyMainResolve(packageJsonUrlString, packageConfig.main, baseStringified);
    ^
    Error: Cannot find package 'C:\Users\momin\AppData\Local
    pm-cache\_npx\125ee17d583c4e03
    ode_modules\bl\package.json' imported from C:\Users\momin\AppData\Local
    pm-cache\_npx\125ee17d583c4e03
    ode_modules\stdin-discarder\index.js
    at legacyMainResolve (node:internal/modules/esm/resolve:215:26)
    at packageResolve (node:internal/modules/esm/resolve:841:14)
    at moduleResolve (node:internal/modules/esm/resolve:927:18)
    at defaultResolve (node:internal/modules/esm/resolve:1169:11)
    at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:383:12)
    at ModuleLoader.resolve (node:internal/modules/esm/loader:352:25)
    at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:227:38)
    at ModuleWrap. (node:internal/modules/esm/module_job:87:39)
    at link (node:internal/modules/esm/module_job:86:36) {
    code: 'ERR_MODULE_NOT_FOUND'
    }
    Node.js v20.15.1
    PS C:\Users\momin\Desktop\New folder\githubProfileChecker>
    "

  • @alexhelm6784
    @alexhelm6784 19 днів тому

    i can't create a jsconfig.json, I have this message : the name jsconfig.json is not valide as a file or folder name. Please choose a different name.
    anyone has this issue ?

  • @harishpadi5508
    @harishpadi5508 Місяць тому

    Good Info

  • @mishra4291
    @mishra4291 3 місяці тому +1

    thanks bro

  • @rohitahir-q5i
    @rohitahir-q5i 21 день тому

    yes your way helps a lot keep it up
    🤑

  • @StaceyLust
    @StaceyLust 2 місяці тому

    was using latest version of node and was getting a ERR_MODULE_NOT _FOUND everytime i ran the npx shadcn-ui@latest init
    i then switched to node v18.40.2 lts cuz ppl said it solved thiers but it still shows an error, any fix ?

  • @okiefegift9006
    @okiefegift9006 Місяць тому

    very useful

  • @rafiamalik993
    @rafiamalik993 Місяць тому +1

    Thanks

  • @Marshal-786
    @Marshal-786 3 місяці тому

    thanx buddy

  • @MrMe-xs9gq
    @MrMe-xs9gq 3 місяці тому

    thanks man

  • @ZeshanMukhtar1
    @ZeshanMukhtar1 Місяць тому

    love from Pakistan

  • @abedalraoufzeidan1461
    @abedalraoufzeidan1461 2 місяці тому

    Thank you

  • @ovna
    @ovna 5 місяців тому +1

    ty

    • @Devtamin
      @Devtamin  5 місяців тому

      Thank you for a comment

  • @sabawoonsediqi514
    @sabawoonsediqi514 3 місяці тому

    node:internal/modules/run_main:129
    triggerUncaughtException(
    ^
    Error: Cannot find package 'C:\Users\omari\AppData\Local
    pm-cache\_npx\125ee17d583c4e03
    ode_modules
    pm-run-path
    ode_modules\path-key\package.json' imported from C:\Users\omari\AppData\Local
    pm-cache\_npx\125ee17d583c4e03
    ode_modules
    pm-run-path\index.js
    Did you mean to import "path-key/index.js"?
    at legacyMainResolve (node:internal/modules/esm/resolve:215:26)
    at packageResolve (node:internal/modules/esm/resolve:841:14)
    at moduleResolve (node:internal/modules/esm/resolve:927:18)
    at defaultResolve (node:internal/modules/esm/resolve:1157:11)
    at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:383:12)
    at ModuleLoader.resolve (node:internal/modules/esm/loader:352:25)
    at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:227:38)
    at ModuleWrap. (node:internal/modules/esm/module_job:87:39)
    at link (node:internal/modules/esm/module_job:86:36) {
    code: 'ERR_MODULE_NOT_FOUND'
    }
    this error is given to me when I am trying to install packages.
    please provide a solution for this error!
    regards

    • @dhanrajshetty645
      @dhanrajshetty645 2 місяці тому

      same error did u get a solution for this?

    • @dhanrajshetty645
      @dhanrajshetty645 2 місяці тому

      hey i found the solution
      1 run this npm install shadcn-ui@latest
      2 run this npx shadcn-ui@latest init

  • @durgfestivalvibes
    @durgfestivalvibes 7 місяців тому +1

    Are u on twitter bro?
    Would follow u there

  • @rafiamalik993
    @rafiamalik993 Місяць тому +1

  • @sebastianriquelme1
    @sebastianriquelme1 6 місяців тому +1

    Crack!

  • @arambp77
    @arambp77 7 місяців тому +1

    I fucking love you dude

    • @Devtamin
      @Devtamin  7 місяців тому

      Glad it was helpful!

  • @nekokaitogamer
    @nekokaitogamer 4 місяці тому

    Thanks a lot

  • @Yesterday_i_ate_rat
    @Yesterday_i_ate_rat 8 місяців тому +1

    Thanks

  • @raffph
    @raffph 8 місяців тому +1

    thanks bro