Like you see in inspector, you defined only border color but not border width. Because it is 0px, it is invisible ;)

You need to change it to

class="border border-gray-800"

"border" will by default mean border-width: 1px so if you need thicker use for example

class="border-2 border-gray-800"

or if you wanna it only on one side

class="border-right border-gray-800"

More in documentation.

Answer from chojnicki on Stack Overflow
🌐
Tailwind CSS
tailwindcss.com › docs › border-color
border-color - Borders - Tailwind CSS
Utilities for controlling the color of an element's borders.
🌐
GitHub
github.com › tailwindlabs › tailwindcss › issues › 10552
Issue with border color not overriding · Issue #10552 · tailwindlabs/tailwindcss
February 10, 2023 - Something in either 3.2.5 or 3.2.6 has messed up class cascading for border colors. The other border classes seem to be ok, but there could be other classes affected as well, idk. When using something such as someVar && "overrideClass", it will not override any previous border color on that tag, component, etc.
Published   Feb 10, 2023
🌐
Tailwind CSS
v2.tailwindcss.com › docs › border-color
Border Color - Tailwind CSS
To control the border color of an element on focus, add the focus: prefix to any existing border color utility. For example, use focus:border-blue-500 to apply the border-blue-500 utility on focus.
🌐
GitHub
github.com › tailwindlabs › tailwindcss › discussions › 16002
Using @layer base { border-color } is not working for TailwindCSS ver 4 · tailwindlabs/tailwindcss · Discussion #16002
My custom border-sidebar-accent just gets overwritten by the gray-200 value :( Do you have a solution? Beta Was this translation helpful? Give feedback. ... There was an error while loading. Please reload this page. Something went wrong. There was an error while loading. Please reload this page. ... @import "tailwindcss/theme"; @layer base { :root { color-scheme: light dark; } *, ::after, ::before, ::backdrop, ::file-selector-button { border-color: var(--color-gray-200, currentColor); } } @theme { --color-background: var(--wp--preset--color--background); --color-foreground: var(--wp--preset--c
Author   tailwindlabs
🌐
Reddit
reddit.com › r/tailwindcss › border won't show up
r/tailwindcss on Reddit: Border won't show up
August 22, 2023 -

I'm a beginner to Tailwind, so it's likely something simple. I can see an <input type="text" class="border border-solid border-2 border-indigo-600">, but only a faint 1px border of #e5e7eb shows up. I can see that this is under the *, ::before, ::after rule at the top of the stylesheet. My config file is customized only for the content paths, and theme and extend are empty. I read quite a bit of the Tailwind documentation, but I'm having a lot of trouble wrapping my head around how basics like color intersect with border, background, and text seeing as the latter three all incorporate color.

🌐
Tailwind CSS
tailwindcss.com › docs › border-style
border-style - Borders - Tailwind CSS
Use utilities like divide-dashed and divide-dotted to control the border style between child elements:
🌐
GitHub
github.com › tailwindlabs › tailwindcss › issues › 11800
Border Color not working when `focus:` in `darkMode: class` · Issue #11800 · tailwindlabs/tailwindcss
August 12, 2023 - module.exports = { darkMode: 'media', theme: { extend: { // ... }, }, plugins: [require('@tailwindcss/forms')], } Then in FireFox dev tools I click one with moon icon and it's working properly. It shows the border color when focused in dark mode. But here's the problem, when I change the darkMode from media to class it's not changing the border color anymore.
Published   Aug 12, 2023
Find elsewhere
🌐
Tailkits
tailkits.com › blog
Customizing Border Color in Tailwind CSS: An Easy Guide | Tailkits
December 26, 2024 - Border color: Without a color, borders may not be visible if they blend with the background. ... Check your tailwind.config.js for typos.
🌐
Reddit
reddit.com › r/tailwindcss › can't change the border color
r/tailwindcss on Reddit: Can't change the border color
June 10, 2022 -

I'm using the tab component from tailwind elements on a project i'm working on but I'm really struggling to change the bottom border color on the active tab (i.e. the tab you click to view the contents of the tab).

https://tailwind-elements.com/docs/standard/navigation/tabs/#section-related-resources

Whatever I try, the bottom border remains blue!

Does anyone have any idea where I can change it?

🌐
GeeksforGeeks
geeksforgeeks.org › css › tailwind-css-border-color
Tailwind CSS Border Color - GeeksforGeeks
July 23, 2025 - This class accepts more than one value in tailwind CSS in which all the properties are covered in class form. It is the alternative to the CSS border-color property. This class is used to specify the border color of an element. ... Note: The color’s values can be changeable according to your need from 50-900, the span should be 100, after the 100.
🌐
GeeksforGeeks
geeksforgeeks.org › css › border-style-not-working-on-hover-in-tailwind-css
Border Style Not Working on Hover in Tailwind CSS? - GeeksforGeeks
July 23, 2025 - If any of above mentioned thing will not work then, we can apply the !important modifier to force the hover effect. In Tailwind, the ! modifier applies !important to the utility. <button class="border border-CURRENT hover:border-HOVER !important"> Button Text </button> Example: A button using Tailwind CSS with the !important modifier to enforce the hover border color change to blue.
Top answer
1 of 4
10

Simply use

@layer base {
  *,
  ::before,
  ::after {
    @apply dark:border-gray-600;
  }
}

Because Tailwind implements border-color by default. It works!


Edit

If you use preflight: false, @layer base probably won't work. Try removing @layer base block and use it directly.

2 of 4
3

I figure out a way, hope it helps.

The tailwind suggests that we make use of index.css instead of configuring in tailwind.config.js

As mentioned in https://tailwindcss.com/docs/functions-and-directives

So the code goes like:

tailwind.config.js

const colors = require("tailwindcss/colors");

module.exports = {
  mode: "jit",
  darkMode: "media",
  content: ["./src/**/*.{js,jsx}", "./public/index.html"],
  theme: {
    extend: {
      colors: {
        gray: colors.gray,
        light: {
          primary: colors.orange,
        },
        dark: {
          primary: colors.green,
        },
      },
      /* Add any default values here */
      /* borderWidth: {
         DEFAULT: "4px",
       },*/
    },
  },
  plugins: [],
};

index.css

@tailwind base;
@tailwind components;
@tailwind utilities;

@layer base {
  /* Can directly apply colors : hard coded values for light and dark */
  .bg-color {
    @apply bg-white dark:bg-black;
  }

  /* Can use custom color defined in the tailwind.config.css file */
  .bg-text {
    @apply text-light-primary-800 dark:text-dark-primary-500;
  }

  /* This is how you apply the border-color for both light and dark mode */
  .border-color {
   @apply border-black dark:border-white;
  }
}

DarkMode.js

import React from "react";

const DarkMode = () => {
  return (
    <div className=" min-h-screen min-w-full bg-color">
      <div className="border-color border-4 bg-text font-bold">
        Hello
      </div>
    </div>
  );
};

export default DarkMode;

In light theme: In dark theme:

For your desired border-color change the border-color property as shown below.

 .border-color {
    @apply border-gray-100 dark:border-gray-800;
  }
🌐
GitHub
github.com › tailwindlabs › tailwindcss › issues › 7018
border color on focus not working · Issue #7018 · tailwindlabs/tailwindcss
January 11, 2022 - let borderBaseColor = "border-blue-custom"; let borderFocusColor = "border-green-custom"; <button className={` ${borderBaseColor} focus:border-2 focus:border-dotted focus:${borderFocusColor} `}> my button </button>
Published   Jan 11, 2022
🌐
Tailwind
windframe.dev › tailwind › classes › tailwind-border-color
Tailwind border color utility enables you to apply border colors to the border of an element such as buttons, input, containers, cards etc.
Tailwind border colorutility enables you to apply border colors to the border of an element such as buttons, input, containers, cards etc. ... Use this when matching a Figma handoff or legacy design token. It works — just don’t overuse it, or your design system gets messy.