DeveloperBreeze

Initial Setup

# Install shadcn/ui CLI
npx shadcn-ui@latest init

During setup, you'll choose:

  • Framework (Next.js, Vite, etc.)
  • Tailwind CSS config
  • Components directory (default: components)
  • Alias for imports (optional)

📦 Installing Components

npx shadcn-ui@latest add [component]

Example:

npx shadcn-ui@latest add button
npx shadcn-ui@latest add card
npx shadcn-ui@latest add input

Multiple components:

npx shadcn-ui@latest add button card input

🧩 Popular Components

ComponentCommand
Buttonnpx shadcn-ui@latest add button
Inputnpx shadcn-ui@latest add input
Dialognpx shadcn-ui@latest add dialog
Cardnpx shadcn-ui@latest add card
Tooltipnpx shadcn-ui@latest add tooltip
AlertDialognpx shadcn-ui@latest add alert-dialog
Dropdown Menunpx shadcn-ui@latest add dropdown-menu
Tabsnpx shadcn-ui@latest add tabs
Avatarnpx shadcn-ui@latest add avatar
Badgenpx shadcn-ui@latest add badge
Accordionnpx shadcn-ui@latest add accordion
Selectnpx shadcn-ui@latest add select
Switchnpx shadcn-ui@latest add switch
Toastnpx shadcn-ui@latest add toast
Skeletonnpx shadcn-ui@latest add skeleton

🎨 Theming

Change Theme Colors

Update Tailwind config:

theme: {
  extend: {
    colors: {
      primary: 'hsl(var(--primary))',
      // etc.
    }
  }
}

Modify Default Theme

Edit components/theme.ts or tailwind.config.js


🛠️ Customization

Change Component Output Directory

npx shadcn-ui@latest init
# Select or type a new directory (e.g. `ui` or `components/ui`)

Customize Tailwind Colors

npx shadcn-ui@latest add theme

🔁 Updating Components

npx shadcn-ui@latest add [component] --overwrite

🧪 Testing Setup

ShadCN doesn’t include tests by default. Use:

  • @testing-library/react
  • vitest or jest

Example:

npm install --save-dev @testing-library/react @testing-library/jest-dom

🧱 Folder Structure (Recommended)

components/
│
├── ui/           # All ShadCN UI components
│   ├── button.tsx
│   ├── card.tsx
│   └── ...
├── shared/       # Your own custom UI components
├── layout/       # Layout wrappers

🧰 Useful Commands Summary

ActionCommand
Init Projectnpx shadcn-ui@latest init
Add Componentnpx shadcn-ui@latest add [component]
Add Themenpx shadcn-ui@latest add theme
Overwrite Componentnpx shadcn-ui@latest add [component] --overwrite
Add Multiple Componentsnpx shadcn-ui@latest add button card tooltip

🌐 Docs & More

Continue Reading

Discover more amazing content handpicked just for you

Tutorial

Globalization in React (2025 Trends & Best Practices)

e.g., currency symbols, cultural clothing, time formats

  • Color psychology changes per region

May 04, 2025
Read More
Tutorial

Implementing Internationalization (i18n) in a Large React Application (2025 Guide)

This saves the user's preferred language so it's remembered on the next visit.

Implementing i18n is no longer optional — it's essential in 2025 as user bases go global and inclusive design becomes the standard.

May 04, 2025
Read More
Tutorial

Building Micro-Frontends with Webpack Module Federation (2025 Guide)

  • Faster deployment cycles
  • Independent scaling of frontend parts
  • Team autonomy across tech stacks (e.g., React, Vue, Angular)

At the core of this revolution is Webpack 5’s Module Federation Plugin, which allows independently deployed builds to share code dynamically.

May 04, 2025
Read More
Tutorial

State Management Beyond Redux: Using Zustand for Scalable React Apps

You can persist state to localStorage or sessionStorage:

import create from 'zustand';
import { persist } from 'zustand/middleware';

const useStore = create(persist(
  (set) => ({
    count: 0,
    increase: () => set((state) => ({ count: state.count + 1 })),
  }),
  {
    name: 'counter-storage',
  }
));

May 03, 2025
Read More
Tutorial

Mastering React Rendering Performance with Memoization and Context

Implementing these practices ensures that only components dependent on specific context values re-render when those values change.([Medium][7])

React Developer Tools provides a Profiler tab to analyze component rendering behavior. Use it to identify components that re-render frequently and assess the impact of optimization strategies.([tenxdeveloper.com][8])

May 03, 2025
Read More
Article

هل سينهي الذكاء الاصطناعي مهنة المبرمج؟ اكتشف الحقيقة!

مثل هياكل البيانات، الخوارزميات، أنماط التصميم (Design Patterns)، ومبادئ OOP.

فهذه المهارات لا يستطيع الذكاء الاصطناعي محاكاتها بالكامل.

Apr 04, 2025
Read More
Article

6 مهارات غير برمجية لازم تتعلمها كمبرمج مستقل علشان تكسب وتنجح في 2025

عشان كده في 2025، لو عايز تشتغل حر وتكسب، لازم تطور مهارات خارج الكود.

يلا نبدأ 👇

Mar 29, 2025
Read More
Article

5 أسباب تخلي كل مبرمج عربي يبدأ قناة على يوتيوب في 2025

كل يوم، آلاف الطلاب والمطورين الجدد بيدوروا على دروس برمجة بلغة عربية بسيطة. المحتوى العربي في البرمجة لا يزال قليل مقارنة بالإنجليزي، وده بيخلق فرصة ذهبية إنك تكون ضمن الأوائل في مجالك.

  • شروحات Laravel؟ مطلوبة بشدة.
  • دروس JavaScript للمبتدئين؟ فرصتها كبيرة.
  • مراجعات أدوات AI؟ تريند 2025 بامتياز!

Mar 29, 2025
Read More
Article

أفكار مشاريع برمجية مربحة للمبرمجين العرب في 2025 (ابدأ بها من اليوم!)

مئات الآلاف من العرب يعملون كفريلانسرز، ويحتاجون أداة لإدارة:

  • المشاريع والعقود
  • الوقت والفواتير
  • العملاء والتقارير

Mar 29, 2025
Read More
Tutorial
javascript

Building a Real-Time Object Detection Web App with TensorFlow.js and p5.js

  • Setup: The setup function initializes the canvas and video capture. The video is hidden by p5.js’s default element so that we can draw it onto the canvas manually.
  • Model Loading: We load the COCO-SSD model asynchronously. Once the model is ready, we start continuous object detection by calling detectObjects().
  • Detection Loop: The detectObjects function uses the loaded model to analyze the current video frame and stores the detection results. It recursively calls itself so that new frames are analyzed continuously.
  • Drawing: In the draw loop, the video feed is displayed and for each detected object, a rectangle and label are drawn. The bounding box coordinates and object class are provided by the model.

Now that you have a basic real-time object detection app, consider extending its functionality:

Feb 12, 2025
Read More
Tutorial

Building a Cross-Platform Desktop App with Tauri and Svelte: A Step-by-Step Tutorial

npx tauri dev

This command opens your Svelte app inside a native window powered by Tauri. Changes you make to your Svelte code will update in real time.

Feb 12, 2025
Read More
Cheatsheet
css html

Grids Cheatsheet

<!-- Basic grid -->
<div class="grid">

<!-- Column configurations -->
<div class="grid grid-cols-3">                    <!-- 3 equal columns -->
<div class="grid grid-cols-none">                 <!-- No columns -->
<div class="grid grid-cols-[200px_1fr_200px]">    <!-- Custom columns -->

<!-- Row configurations -->
<div class="grid grid-rows-3">                    <!-- 3 equal rows -->
<div class="grid grid-rows-[200px_1fr_100px]">    <!-- Custom rows -->

<!-- Gaps -->
<div class="gap-4">                               <!-- Both row and column gap -->
<div class="gap-x-4">                             <!-- Column gap only -->
<div class="gap-y-4">                             <!-- Row gap only -->

<!-- Auto flow -->
<div class="grid-flow-row">
<div class="grid-flow-col">
<div class="grid-flow-dense">

<!-- Alignment -->
<div class="justify-items-start">
<div class="justify-items-center">
<div class="items-center">                        <!-- Vertical alignment -->
<!-- Column span -->
<div class="col-span-2">                          <!-- Span 2 columns -->
<div class="col-start-2">                         <!-- Start at column 2 -->
<div class="col-end-4">                           <!-- End at column 4 -->

<!-- Row span -->
<div class="row-span-2">                          <!-- Span 2 rows -->
<div class="row-start-2">                         <!-- Start at row 2 -->
<div class="row-end-4">                           <!-- End at row 4 -->

<!-- Individual alignment -->
<div class="justify-self-start">
<div class="justify-self-center">
<div class="self-center">                         <!-- Vertical self-alignment -->

Jan 14, 2025
Read More
Tutorial
javascript css +1

How to Create a Chrome Extension for Automating Tweets on X (Twitter)

  • How to structure a Chrome extension project.
  • The roles of the manifest, background script, content script, and popup.
  • How to interact with web pages programmatically.

You can now modify and expand this extension to include features like scheduling specific tweets, logging analytics, or integrating with other social media platforms.

Dec 10, 2024
Read More
Cheatsheet
python

Python List Operations Cheatsheet

my_list = ["apple", "banana", "cherry", "orange", "kiwi"]
print(my_list[-3:])  # Output: ['cherry', 'orange', 'kiwi']
my_list = [3, 1, 4, 1, 5, 9]
my_list.sort()
print(my_list)  # Output: [1, 1, 3, 4, 5, 9]

Oct 24, 2024
Read More
Cheatsheet

Essential dpkg Commands Cheat Sheet for Debian and Ubuntu Systems

You can install multiple .deb packages in a single command by specifying the file names.

  • Location: The dpkg database is stored in /var/lib/dpkg.
  • Installed Packages: The status file within this directory contains information about all installed packages on your system.

Oct 24, 2024
Read More
Tutorial
python

Mastering Edge Computing with Python and IoT Integration

   pip install tflite-runtime

Load a pre-trained model to make predictions on the collected data. For example, classify temperature data into categories such as "Normal," "Moderate," or "High" using a simple model.

Oct 22, 2024
Read More
Tutorial

Introduction to Low-Code and No-Code Development for Business Applications

Low-code and no-code platforms are revolutionizing the way businesses build applications. They offer a fast, cost-effective, and accessible alternative to traditional development, empowering users across various business departments to create functional and scalable apps. Whether you’re looking to automate tasks, improve workflows, or create a fully-fledged business application, low-code and no-code platforms provide the tools to do so without requiring deep technical expertise.

By following this tutorial, you should be well on your way to creating your own business applications and taking full advantage of the benefits low-code/no-code platforms offer in 2024.

Oct 22, 2024
Read More
Cheatsheet

Best Tools for Generating Backgrounds Patterns for Your Website

If you're looking to add some style to your website with custom-generated patterns, you're in luck! Here’s a list of fantastic tools that can help you create modern, visually appealing backgrounds and patterns with ease. From subtle designs to bold statement patterns, these tools offer flexibility and customization to match your creative needs.

  • Website: Patternico
  • Features:
  • Create seamless repeating patterns.
  • Upload your own icons, or use predefined shapes.
  • Customize size, spacing, and background colors.
  • Download in high-resolution PNG or SVG formats.
  • Best For: Quick and easy custom patterns with a minimal learning curve.

Oct 21, 2024
Read More
Tutorial
bash

How to Install and Configure Apache on Ubuntu

To ensure Apache starts on boot, use the following command:

sudo systemctl enable apache2

Oct 21, 2024
Read More
Tutorial
bash

How to Create SSL for a Website on Ubuntu

Certbot is the client tool that will manage SSL certificate generation for Let's Encrypt. Depending on your web server (Apache or Nginx), install Certbot and the appropriate plugin.

sudo apt install certbot python3-certbot-apache

Oct 21, 2024
Read More

Discussion 0

Please sign in to join the discussion.

No comments yet. Start the discussion!