Skip to main content

Questions tagged [tailwind-css]

Tailwind CSS is a highly customizable, low-level CSS framework that gives you all of the building blocks you need to build bespoke designs without any annoying opinionated styles you have to fight to override.

tailwind-css
Filter by
Sorted by
Tagged with
-2 votes
0 answers
19 views

Front end + React + Tailwind [closed]

How do I create a banner like the one on the Fipra website for practice? I've added an SVG mask layer from an online generator, but I want to make it purely with Tailwind CSS. How can I achieve a ...
Bassam Foaud's user avatar
0 votes
0 answers
9 views

Framer Motion animate nested

How to start animation for div p after every div animation const [ref, animate] = useAnimate() <div ref={ref}> <div className="opacity-0 bg-yellow-500"> <h1>...
ksqke's user avatar
  • 1
0 votes
0 answers
15 views

Ensuring consistent appearance of a React web app across different Windows scaling settings

I'm developing a web app using React and Tailwind CSS. I've noticed that the appearance of the app changes when viewed on different screens, particularly due to different scaling settings on operating ...
srcnsfnc's user avatar
0 votes
0 answers
34 views

CSS transition not working for backdrop-blur

My React/Tailwind app has a mobile menu popup for screens less than 768px wide which uses the Tailwind properties backdrop-blur to blur out everything behind the menu items. I have a transition-all ...
Harley Zhang's user avatar
0 votes
0 answers
15 views

How can I make Jest and react testing library work with Tailwind?

I am trying to test component's visibility using Jest and react testing library. Div that should be hidden: <div data-testid="some-component" className="max-lg:hidden flex flex-wrap ...
yulia's user avatar
  • 11
0 votes
1 answer
21 views

Why is rounded-lg and rounded-md not working with Tailwind CSS for me?

I'm using Next.js 14.2.4 and tailwindcss 3.4.1 and for some reason rounded-lg and rounded-md are not working. They provide zero border radius whatsoever. rounded-xl and rounded and all the others are ...
Cole's user avatar
  • 325
0 votes
1 answer
15 views

How to use tailwind css `theme` function with opacity modifiers

Is there anyway to use the theme() syntax for declaring a css variable with tailwind and using an opacity modifier after? /*globals.css*/ @layer base { :root { /*these work fine*/ --almost-...
Preston Bourne's user avatar
-2 votes
0 answers
31 views

Tailwind CSS background image not being displayed [closed]

There are two SVG images in the root directory of my project. logo-dark-mode.svg logo-light-mode.svg I have correctly linked the two images in the HTML file but in the developer tools when I hover ...
Tayyab Akram's user avatar
0 votes
1 answer
32 views

How can I change col/row behavior based on available space?

I have a set of cards, whose have their own cards, like this (i am using TailwindCSS btw): <script src="https://cdn.tailwindcss.com"></script> <div class="grid grid-cols-3 gap-4">...
Vinicius Ortiz's user avatar
0 votes
1 answer
27 views

How to auto scroll when a new message pops up and not send an empty message?

I'm building an AI chatbot and I'm using tailwind to integrate css in my jsx file. I've been stuck on how to make the app scroll down automatically whenever a new message is sent or recieved. I want ...
Da'ad Al-Faleh's user avatar
0 votes
0 answers
17 views

I am having a problem with a project with astro and tailwind

You can see the code in my github repo, The problem is that i want the image to be the height of the images to be the full with of the screen and the psicosmith image to be above the background image, ...
riadfrancoq's user avatar
1 vote
2 answers
38 views

Position the div at the bottom

I want to fix this div at the bottom of my webpage, here is my react code: It's written in tailwind css but you can answer in normal css too I've tried using bottom property but it didn't work <div ...
ayesha's user avatar
  • 11
0 votes
0 answers
21 views

TypeError: (0 , _utils___WEBPACK_IMPORTED_MODULE_2__.default) is not a function

I'm having issues with Shadcn library, after fixing all the style problems I encounter issues with the import of cn. Next.js point me cn isn't a function. I tried to do import { cn } from '/utils/' ...
David's user avatar
  • 1
0 votes
2 answers
40 views

Getting Inconsistent padding in tailwind css (on react+vite)

I am getting this type of padding /border . Click the link below to view. [Inconsistent padding in tailwind] Want like this (https://i.sstatic.net/2RsqliM6.png) I was trying to get border with ...
Uday Pratap Chauhan's user avatar
0 votes
0 answers
15 views

base-content color not working on daisyui laravel project

**<a href="" className='text-center main border-2 border-base-100 w-4/5 m-auto p-2 rounded-xl border-opacity-80 bg-inherit transition duration-200 ease-in-out bg-gradient-to-r from-base-...
abiajustino's user avatar
0 votes
0 answers
11 views

Angular microfront end w/ tailwindcss

i use module federation and multirepo in angular, i have a shell, an app (MFE) and a shared-ui so in my shared-ui i have installed tailwindcss, i have my file tailwind.config.js and a styles.scss ...
NAATL's user avatar
  • 1
-1 votes
0 answers
15 views

How to use @apply Tailwind directive with styles defined in JS?

The @apply works if used in app.css, but I would like to declare styles close to JS elements, not in separate app.css. How to do it? app.js const styles: string[] = [] export const SomeButton: ...
Alex Craft's user avatar
  • 14.7k
0 votes
1 answer
19 views

Colon symbol in class names for tailwind break Pug files

I am creating a project in Vue where the HTML aspect of it is written in pug. When I add a tailwind class, (for example in this case I am trying to add the classes ) .w-16.md:w-32.lg:w-48 Since it is ...
Joao Moita's user avatar
0 votes
1 answer
21 views

Creating DaisyUI drawer relative to a container div

I have a simple app whose body is 500px wide and centered. I am trying to use daisyUI drawer so that the drawer enters the screen just at the right of the body. However, the drawer opens from the far ...
Akash Gorai's user avatar
0 votes
0 answers
29 views

What does mean the ´@´?

I have searched on the web but without any result … I am learning next js and in the demo, there are some code like this in order to import css or icons … import '@/app/ui/global.css'; I don’t ...
EagleStar's user avatar
  • 189
-2 votes
0 answers
25 views

How to create a retractable sidebar with icons in ERB with Tailwind CSS for a Ruby on Rails project? [closed]

I'm working on a Ruby on Rails project and need some help with creating a retractable sidebar using ERB and Tailwind CSS. I want the sidebar to show only icons when it is retracted and the full menu ...
Ansari Junaid's user avatar
0 votes
0 answers
34 views

How to add `tailwindcss` to my Vue + Electron Forge project?

I'm doing my first sample project using Vue + Electron Forge with the template vite+typescript. Now I want to add tailwind but I can't seem to find any useful documentation online. This is my project ...
David Peña's user avatar
1 vote
2 answers
60 views

Css min-height: fit-content does not work with resize

<div class="h-fit w-fit min-h-fit min-w-fit resize overflow-hidden bg-gray-200"> <div> Content goes here.</div> <div> Content goes here.</...
Lampros's user avatar
  • 393
0 votes
1 answer
30 views

Next.js SVG Image Mask (Reusable component)

I've been trying all day to create a reusable Next.js SVG Image mask component, using only tailwind / inline styles for locally stored images. I want to be able to pass an svg into it and an image and ...
Michael Martell's user avatar
0 votes
1 answer
20 views

Implement TailwindCSS class from backend

I am trying to make a website builder where users can set colors based on their needs just by clicking the colors. The main problem, the color is not working. Here is the function function ...
Raden Bagus's user avatar
0 votes
0 answers
9 views

does NativeWind support custom plugin defined in tailwind.config.js

my tailwind.config.js is like this const plugin = require("tailwindcss/plugin"); module.exports = { plugins: [ plugin(function ({ addUtilities}) { addUtilities({ &...
Kent Wood's user avatar
  • 1,494
0 votes
1 answer
37 views

Tailwind doesn't render font-size with arbitrary value

I am trying to scale a span element based on a number from a variable: export default async function Tags() { const tags = await getTags(); return ( <div> <Suspense> ...
Viktor's user avatar
  • 447
0 votes
1 answer
17 views

custom plugin in tailwind.config.js under Expo is not working

i am using tailwindcss in an Expo project, and i try to use some custom color in custom plugin function,however,i got an error says Error: tailwindcss plugin function argument object prop "colors....
Kent Wood's user avatar
  • 1,494
0 votes
1 answer
36 views

How to Add Space Between Two Texts in a Mantine Badge Component?

I use Mantine UI + Talwind CSS to write Components. I'm trying to add space between two texts in a Badge component so that one text is aligned to the left and the other to the right. Here is my ...
Nurlybek's user avatar
0 votes
0 answers
28 views

Cannot read properties of null (reading 'useContext') error in material tailwind with craco and react typescript

My project is created with react typescript and I have installed craco in my project. when I am using some components like Tabs and Accordion from @material/tailwind below error occures: Uncaught ...
N.SH's user avatar
  • 661
0 votes
1 answer
24 views

How to Center the Middle Child Element in a Flexbox Parent with Uneven Widths? [duplicate]

I have a parent container with display: flex and justify-content: space-between. Inside this parent, I have three child elements with uneven widths. Here's a simplified version of my HTML and CSS: I ...
Keshav's user avatar
  • 33
0 votes
1 answer
41 views

Tailwind CSS intellisense not initializing

Suddenly, My Tailwind CSS Intellisense is not working(initializing). I've seen plenty of other questions, And Tried almost everything. Here is my additions in settings.json "files.associations&...
Anay's user avatar
  • 159
0 votes
0 answers
38 views

How to have a dialog with tooltip where the tooltip does not reopen when the Dialog is closed using shadcn ui / Radix ui

I am currently using the code below for the tooltip dialog combo <Dialog open={isModalOpen} onOpenChange={async (open) => { setIsModalOpen(open); closeTooltip(); ...
DevEnma's user avatar
  • 119
1 vote
0 answers
16 views

I want to keep the same ratio for the pictures in this astro.build component

The ratio of the picture for this component when the width of the browser becomes less than 1178 pixels, then it changes ratio from 9:16 (Vertical) to 16:9 (Horizontal). However, I tried to see how I ...
N90J's user avatar
  • 67
0 votes
0 answers
20 views

Scroll Snap Stops Working After Repeated Scrolling

I'm not sure how to phrase this better, but it seems like the snapping behavior stops working after scrolling a few times. I've tried adding a delay or limiting the scrolling, but it seems I haven't ...
zawkey's user avatar
  • 1
0 votes
1 answer
38 views

Nextjs/Github Pages - Images Load in Dev but Not in Prod

I am using Next.js with Tailwind CSS and am trying to set a background image for a div. The image will load in development but not in production (I am deplying to Github pages). I have other images in ...
Mctripp's user avatar
  • 29
0 votes
2 answers
37 views

React TailwindCSS not installing [closed]

I'm trying to learn React, but I've tried with videos, documentation, everything I could, but it's not working. It's not throwing any errors. If it were up to me, I would use Bootstrap, but since I'm ...
Sekullar X's user avatar
0 votes
0 answers
15 views

Failed acces css and js when running local laravel project in mobile

I want to access my local laravel project on mobile. i have run php artisan serve --host 0.0.0.0 and i have successfully accessed the project on mobile. but when i open the project the css and js from ...
CrustFast's user avatar
-2 votes
0 answers
37 views

How to customize laravel 11 breeze files

I am currently working on a laravel 11 project, which I used breeze installation. Unlike any other Laravel version, I cannot locate welcome and home blade files in the view folder. I will appreciate ...
Putup's user avatar
  • 1
0 votes
2 answers
19 views

tailwind justify-center not working - reactjs

I have div, inside I have some cards from daisyui. I want those cards to justify center on smaller screens(I have flexed it to column for smaller screens). <div className='container mx-auto lg:px-...
akarjun313's user avatar
0 votes
0 answers
15 views

Can't use margin right or mr

Hi I'm a web dev student and I was assigned to finish a simple web design using tailwind css and reactjs, I was taught about it yesterday so there are a lot of things I don't know about it. I'm trying ...
ravnathan's user avatar
0 votes
2 answers
55 views

How to avoid rerenders when the state array changes?

import React, { useState, useEffect, useMemo } from 'react'; import axios from 'axios'; import { ChatLog } from './ChatLog.jsx'; import { GoArrowUp } from "react-icons/go"; export function ...
Kyle Lee's user avatar
0 votes
0 answers
8 views

Dynamic Overlay with UserId on MuxPlayer Disappears in Fullscreen Mode

I'm using the MuxPlayer component for video on my website and have created an overlay that displays the userId dynamically. The overlay works perfectly in normal mode, but it disappears when the video ...
Azure Moaz's user avatar
0 votes
0 answers
20 views

How can I trigger an animation with scroll up/down and do the full animation in framer motion?

I will go in deeper explanation, I have a classic button to activate a menu that expands and covers the entire screen and that is composed of a clipPath that is what expands and covers the entire ...
Germán Arias Rodríguez's user avatar
0 votes
0 answers
31 views

CSS style for implementing a floating menu that follows a draggable object

I am currently on a project of cloning canva using React and TailwindCSS. Say I have a structure like below: <div className='relative'> <div> <div>This is for the ...
MInH THiỆn's user avatar
-2 votes
0 answers
18 views

disable highlights in Typescript file?

When I click on className values and it highlights entire text in Vs Code. I tried disable all highlight settings in Vs Code but couldnt find any solutions. I want to disable Hightlights in typescript ...
newborn16's user avatar
0 votes
0 answers
20 views

How to Make Bar Responsive with rotation?

I work on small website and this website need home page so i start building but when i coming to build this bar i dont know how to make it responsivewith all screen, and make it in the bottom of ...
khabzox's user avatar
0 votes
0 answers
23 views

How to resolve "Error: Element type is invalid: expected a string (for built-in components) ... "

Trying to display Cards (tailwindcss) in my NextJs App router application (pasted below). However, I merely copying and pasteing the code threw an error: Error: Element type is invalid: expected a ...
Xhris's user avatar
  • 156
0 votes
1 answer
20 views

How to Integrate Tailwind CSS into Laravel Email Templates

I tried adding Tailwind CSS to my Laravel email template, but it didn't work when I sent an email. I prefer Tailwind CSS because it's easier to create responsive layouts than with regular CSS. I ...
Leslie Joe's user avatar
0 votes
0 answers
9 views

Background Image for Parallax Effect Moves Sideways When Scrolling Up

I'm implementing a parallax effect on my website where the background image changes based on the scroll position. The background image is supposed to stay fixed horizontally and change only vertically ...
Luigi Alonso's user avatar

1
2 3 4 5
199