vite

Integrasi Tailwind CSS dengan React JS dan Vitejs

Integrasi Tailwind CSS dengan React JS dan Vitejs

Di bagian ini kita akan belajar cara meintegrasikan Reactjs dengan Tailwindcss Tailwind CSS adalah sebuah framework utility-first untuk styling css yang memungkinkan membangun antarmuka pengguna (UI) secara cepat dan efisien dengan menggunakan kelas-kelas kecil yang bisa langsung digunakan dalam markup HTML Untuk proses installasi anda bisa melihat artikel sebelumnyaInstalasi React & Vite Instalasi Tailwind css jalankan perintah berikut untuk menginstall keperluan ### yarn yarn add -D tailwindcss postcss autoprefixer ### npm npm install -D tailwindcss postcss autoprefixer Enter fullscreen mode Exit fullscreen mode Buat file tailwind.config.js dan postcss.config.js deangan menjalankan perintah berikut ### yarn yarn tailwindcss init -p ### npx…
Read More
Passing query parameters through import.meta.url to vue with Laravel Vite

Passing query parameters through import.meta.url to vue with Laravel Vite

import.meta.url. For JavaScript modules, you can use the import.meta object to access its own meta information. import.meta - JavaScript | MDN Therefore, <script type="module" src="app.js?someURLInfo=5"></script> Enter fullscreen mode Exit fullscreen mode At this time, app.js module is able to get its own URL with query parameters and hash through import.meta.url.In other words, You can pass values via query parameters like new URL(import.meta.url).searchParams.get('someURLInfo') // '5'; Enter fullscreen mode Exit fullscreen mode Using with Laravel Vite Normally you would use @vite directive to load js file like @vite('resources/js/app.js') Enter fullscreen mode Exit fullscreen mode so to pass a value through query parameter,…
Read More
React + Vite + Tailwind project

React + Vite + Tailwind project

This guide will help you init a React project with Vite and use Tailwind. Prerequisite Use this command to check your NodeJS version node -v Enter fullscreen mode Exit fullscreen mode Create react project with vite Open your terminal and run the command npm create vite@latest Enter fullscreen mode Exit fullscreen mode It would ask you some question: Project name: Your project name, example: pokemon Select a framework: Choose React Select a variant: Pick TypeScript Then your project is created, open the project by VSCode or your other IDE and install dependencies by this command: npm install Enter fullscreen mode…
Read More
No widgets found. Go to Widget page and add the widget in Offcanvas Sidebar Widget Area.