Setup MUI RTL Project with stylis-plugin-rtl next js 14

  ## Root page code (layout.js) “use client”; import { useState } from “react”; import cacheRtl from “./rtlCache”; // RTL cache import createCache from “@emotion/cache”; // Create LTR cache import { ThemeProvider } from “@mui/material/styles”; import { CacheProvider } from “@emotion/react”; import CssBaseline from “@mui/material/CssBaseline”; // Create a separate cache

Read More »

MUI RTl input fields with labels

<Box component=”form” sx={{ mt: 4 }}> <TextField dir=”rtl” sx={{ mb: 2, “& .MuiFormLabel-root”: { color: “#655F7B”, left: “auto”, right: “30px”, }, “& .MuiFormLabel-root[data-shrink=’true’]”: { left: “0”, right: “auto”, }, }} label=”שם” name=”name” fullWidth /> <TextField dir=”rtl” sx={{ mb: 2, “& .MuiFormLabel-root”: { color: “#655F7B”, left: “auto”, right: “30px”, }, “&

Read More »

How to make root page in next 14 without redirection

In the app directory, create a file named page.js. Import and render the home component (or the component from app/home2/page.js if that’s your home component). // app/page.js import HomePage from “./home2/page”; // Adjust this path if your home component is elsewhere export default function Page() { return <HomePage />; }

Read More »

How to make multi language project in next js in 10 minutes

Create a Next.js app To create a Next.js app, open your terminal, cd into the directory you’d like to create the app in, and run the following command: npx create-next-app@latest nextjs-blog install npm  i18n npm i i18n Configure next-i18next In your Next.js root directory, create a file called next-i18next.config.js. This will hold

Read More »
No data found.