Borders
Outline Color
Utilities for controlling the color of an element’s outline.
Quick reference
Class | Properties |
---|---|
outline-inherit | outline-color: inherit; |
outline-current | outline-color: currentColor; |
outline-transparent | outline-color: transparent; |
outline-black | outline-color: #000; |
outline-white | outline-color: #fff; |
outline-slate-50 | outline-color: #f8fafc; |
outline-slate-100 | outline-color: #f1f5f9; |
outline-slate-200 | outline-color: #e2e8f0; |
outline-slate-300 | outline-color: #cbd5e1; |
outline-slate-400 | outline-color: #94a3b8; |
outline-slate-500 | outline-color: #64748b; |
outline-slate-600 | outline-color: #475569; |
outline-slate-700 | outline-color: #334155; |
outline-slate-800 | outline-color: #1e293b; |
outline-slate-900 | outline-color: #0f172a; |
outline-gray-50 | outline-color: #f9fafb; |
outline-gray-100 | outline-color: #f3f4f6; |
outline-gray-200 | outline-color: #e5e7eb; |
outline-gray-300 | outline-color: #d1d5db; |
outline-gray-400 | outline-color: #9ca3af; |
outline-gray-500 | outline-color: #6b7280; |
outline-gray-600 | outline-color: #4b5563; |
outline-gray-700 | outline-color: #374151; |
outline-gray-800 | outline-color: #1f2937; |
outline-gray-900 | outline-color: #111827; |
outline-zinc-50 | outline-color: #fafafa; |
outline-zinc-100 | outline-color: #f4f4f5; |
outline-zinc-200 | outline-color: #e4e4e7; |
outline-zinc-300 | outline-color: #d4d4d8; |
outline-zinc-400 | outline-color: #a1a1aa; |
outline-zinc-500 | outline-color: #71717a; |
outline-zinc-600 | outline-color: #52525b; |
outline-zinc-700 | outline-color: #3f3f46; |
outline-zinc-800 | outline-color: #27272a; |
outline-zinc-900 | outline-color: #18181b; |
outline-neutral-50 | outline-color: #fafafa; |
outline-neutral-100 | outline-color: #f5f5f5; |
outline-neutral-200 | outline-color: #e5e5e5; |
outline-neutral-300 | outline-color: #d4d4d4; |
outline-neutral-400 | outline-color: #a3a3a3; |
outline-neutral-500 | outline-color: #737373; |
outline-neutral-600 | outline-color: #525252; |
outline-neutral-700 | outline-color: #404040; |
outline-neutral-800 | outline-color: #262626; |
outline-neutral-900 | outline-color: #171717; |
outline-stone-50 | outline-color: #fafaf9; |
outline-stone-100 | outline-color: #f5f5f4; |
outline-stone-200 | outline-color: #e7e5e4; |
outline-stone-300 | outline-color: #d6d3d1; |
outline-stone-400 | outline-color: #a8a29e; |
outline-stone-500 | outline-color: #78716c; |
outline-stone-600 | outline-color: #57534e; |
outline-stone-700 | outline-color: #44403c; |
outline-stone-800 | outline-color: #292524; |
outline-stone-900 | outline-color: #1c1917; |
outline-red-50 | outline-color: #fef2f2; |
outline-red-100 | outline-color: #fee2e2; |
outline-red-200 | outline-color: #fecaca; |
outline-red-300 | outline-color: #fca5a5; |
outline-red-400 | outline-color: #f87171; |
outline-red-500 | outline-color: #ef4444; |
outline-red-600 | outline-color: #dc2626; |
outline-red-700 | outline-color: #b91c1c; |
outline-red-800 | outline-color: #991b1b; |
outline-red-900 | outline-color: #7f1d1d; |
outline-orange-50 | outline-color: #fff7ed; |
outline-orange-100 | outline-color: #ffedd5; |
outline-orange-200 | outline-color: #fed7aa; |
outline-orange-300 | outline-color: #fdba74; |
outline-orange-400 | outline-color: #fb923c; |
outline-orange-500 | outline-color: #f97316; |
outline-orange-600 | outline-color: #ea580c; |
outline-orange-700 | outline-color: #c2410c; |
outline-orange-800 | outline-color: #9a3412; |
outline-orange-900 | outline-color: #7c2d12; |
outline-amber-50 | outline-color: #fffbeb; |
outline-amber-100 | outline-color: #fef3c7; |
outline-amber-200 | outline-color: #fde68a; |
outline-amber-300 | outline-color: #fcd34d; |
outline-amber-400 | outline-color: #fbbf24; |
outline-amber-500 | outline-color: #f59e0b; |
outline-amber-600 | outline-color: #d97706; |
outline-amber-700 | outline-color: #b45309; |
outline-amber-800 | outline-color: #92400e; |
outline-amber-900 | outline-color: #78350f; |
outline-yellow-50 | outline-color: #fefce8; |
outline-yellow-100 | outline-color: #fef9c3; |
outline-yellow-200 | outline-color: #fef08a; |
outline-yellow-300 | outline-color: #fde047; |
outline-yellow-400 | outline-color: #facc15; |
outline-yellow-500 | outline-color: #eab308; |
outline-yellow-600 | outline-color: #ca8a04; |
outline-yellow-700 | outline-color: #a16207; |
outline-yellow-800 | outline-color: #854d0e; |
outline-yellow-900 | outline-color: #713f12; |
outline-lime-50 | outline-color: #f7fee7; |
outline-lime-100 | outline-color: #ecfccb; |
outline-lime-200 | outline-color: #d9f99d; |
outline-lime-300 | outline-color: #bef264; |
outline-lime-400 | outline-color: #a3e635; |
outline-lime-500 | outline-color: #84cc16; |
outline-lime-600 | outline-color: #65a30d; |
outline-lime-700 | outline-color: #4d7c0f; |
outline-lime-800 | outline-color: #3f6212; |
outline-lime-900 | outline-color: #365314; |
outline-green-50 | outline-color: #f0fdf4; |
outline-green-100 | outline-color: #dcfce7; |
outline-green-200 | outline-color: #bbf7d0; |
outline-green-300 | outline-color: #86efac; |
outline-green-400 | outline-color: #4ade80; |
outline-green-500 | outline-color: #22c55e; |
outline-green-600 | outline-color: #16a34a; |
outline-green-700 | outline-color: #15803d; |
outline-green-800 | outline-color: #166534; |
outline-green-900 | outline-color: #14532d; |
outline-emerald-50 | outline-color: #ecfdf5; |
outline-emerald-100 | outline-color: #d1fae5; |
outline-emerald-200 | outline-color: #a7f3d0; |
outline-emerald-300 | outline-color: #6ee7b7; |
outline-emerald-400 | outline-color: #34d399; |
outline-emerald-500 | outline-color: #10b981; |
outline-emerald-600 | outline-color: #059669; |
outline-emerald-700 | outline-color: #047857; |
outline-emerald-800 | outline-color: #065f46; |
outline-emerald-900 | outline-color: #064e3b; |
outline-teal-50 | outline-color: #f0fdfa; |
outline-teal-100 | outline-color: #ccfbf1; |
outline-teal-200 | outline-color: #99f6e4; |
outline-teal-300 | outline-color: #5eead4; |
outline-teal-400 | outline-color: #2dd4bf; |
outline-teal-500 | outline-color: #14b8a6; |
outline-teal-600 | outline-color: #0d9488; |
outline-teal-700 | outline-color: #0f766e; |
outline-teal-800 | outline-color: #115e59; |
outline-teal-900 | outline-color: #134e4a; |
outline-cyan-50 | outline-color: #ecfeff; |
outline-cyan-100 | outline-color: #cffafe; |
outline-cyan-200 | outline-color: #a5f3fc; |
outline-cyan-300 | outline-color: #67e8f9; |
outline-cyan-400 | outline-color: #22d3ee; |
outline-cyan-500 | outline-color: #06b6d4; |
outline-cyan-600 | outline-color: #0891b2; |
outline-cyan-700 | outline-color: #0e7490; |
outline-cyan-800 | outline-color: #155e75; |
outline-cyan-900 | outline-color: #164e63; |
outline-sky-50 | outline-color: #f0f9ff; |
outline-sky-100 | outline-color: #e0f2fe; |
outline-sky-200 | outline-color: #bae6fd; |
outline-sky-300 | outline-color: #7dd3fc; |
outline-sky-400 | outline-color: #38bdf8; |
outline-sky-500 | outline-color: #0ea5e9; |
outline-sky-600 | outline-color: #0284c7; |
outline-sky-700 | outline-color: #0369a1; |
outline-sky-800 | outline-color: #075985; |
outline-sky-900 | outline-color: #0c4a6e; |
outline-blue-50 | outline-color: #eff6ff; |
outline-blue-100 | outline-color: #dbeafe; |
outline-blue-200 | outline-color: #bfdbfe; |
outline-blue-300 | outline-color: #93c5fd; |
outline-blue-400 | outline-color: #60a5fa; |
outline-blue-500 | outline-color: #3b82f6; |
outline-blue-600 | outline-color: #2563eb; |
outline-blue-700 | outline-color: #1d4ed8; |
outline-blue-800 | outline-color: #1e40af; |
outline-blue-900 | outline-color: #1e3a8a; |
outline-indigo-50 | outline-color: #eef2ff; |
outline-indigo-100 | outline-color: #e0e7ff; |
outline-indigo-200 | outline-color: #c7d2fe; |
outline-indigo-300 | outline-color: #a5b4fc; |
outline-indigo-400 | outline-color: #818cf8; |
outline-indigo-500 | outline-color: #6366f1; |
outline-indigo-600 | outline-color: #4f46e5; |
outline-indigo-700 | outline-color: #4338ca; |
outline-indigo-800 | outline-color: #3730a3; |
outline-indigo-900 | outline-color: #312e81; |
outline-violet-50 | outline-color: #f5f3ff; |
outline-violet-100 | outline-color: #ede9fe; |
outline-violet-200 | outline-color: #ddd6fe; |
outline-violet-300 | outline-color: #c4b5fd; |
outline-violet-400 | outline-color: #a78bfa; |
outline-violet-500 | outline-color: #8b5cf6; |
outline-violet-600 | outline-color: #7c3aed; |
outline-violet-700 | outline-color: #6d28d9; |
outline-violet-800 | outline-color: #5b21b6; |
outline-violet-900 | outline-color: #4c1d95; |
outline-purple-50 | outline-color: #faf5ff; |
outline-purple-100 | outline-color: #f3e8ff; |
outline-purple-200 | outline-color: #e9d5ff; |
outline-purple-300 | outline-color: #d8b4fe; |
outline-purple-400 | outline-color: #c084fc; |
outline-purple-500 | outline-color: #a855f7; |
outline-purple-600 | outline-color: #9333ea; |
outline-purple-700 | outline-color: #7e22ce; |
outline-purple-800 | outline-color: #6b21a8; |
outline-purple-900 | outline-color: #581c87; |
outline-fuchsia-50 | outline-color: #fdf4ff; |
outline-fuchsia-100 | outline-color: #fae8ff; |
outline-fuchsia-200 | outline-color: #f5d0fe; |
outline-fuchsia-300 | outline-color: #f0abfc; |
outline-fuchsia-400 | outline-color: #e879f9; |
outline-fuchsia-500 | outline-color: #d946ef; |
outline-fuchsia-600 | outline-color: #c026d3; |
outline-fuchsia-700 | outline-color: #a21caf; |
outline-fuchsia-800 | outline-color: #86198f; |
outline-fuchsia-900 | outline-color: #701a75; |
outline-pink-50 | outline-color: #fdf2f8; |
outline-pink-100 | outline-color: #fce7f3; |
outline-pink-200 | outline-color: #fbcfe8; |
outline-pink-300 | outline-color: #f9a8d4; |
outline-pink-400 | outline-color: #f472b6; |
outline-pink-500 | outline-color: #ec4899; |
outline-pink-600 | outline-color: #db2777; |
outline-pink-700 | outline-color: #be185d; |
outline-pink-800 | outline-color: #9d174d; |
outline-pink-900 | outline-color: #831843; |
outline-rose-50 | outline-color: #fff1f2; |
outline-rose-100 | outline-color: #ffe4e6; |
outline-rose-200 | outline-color: #fecdd3; |
outline-rose-300 | outline-color: #fda4af; |
outline-rose-400 | outline-color: #fb7185; |
outline-rose-500 | outline-color: #f43f5e; |
outline-rose-600 | outline-color: #e11d48; |
outline-rose-700 | outline-color: #be123c; |
outline-rose-800 | outline-color: #9f1239; |
outline-rose-900 | outline-color: #881337; |
Show all classes
Basic usage
Setting the outline color
Use the outline-{color}
utilities to change the color of an element’s outline.
<button class="outline outline-offset-2 outline-blue-500 ...">Button A</button>
<button class="outline outline-offset-2 outline-cyan-500 ...">Button B</button>
<button class="outline outline-offset-2 outline-pink-500 ...">Button C</button>
Changing the opacity
Control the opacity of an element’s outline color using the color opacity modifier.
<button class="outline-2 outline-blue-500/50 ...">Save Changes</button>
You can use any value defined in your opacity scale, or use arbitrary values if you need to deviate from your design tokens.
<button class="outline-4 outline-pink-400/[.55] ..."></button>
Applying conditionally
Hover, focus, and other states
Tailwind lets you conditionally apply utility classes in different states using variant modifiers. For example, use hover:outline-blue-400
to only apply the outline-blue-400
utility on hover.
<button class="outline hover:outline-blue-400">
<!-- ... -->
</button>
For a complete list of all available state modifiers, check out the Hover, Focus, & Other States documentation.
Breakpoints and media queries
You can also use variant modifiers to target media queries like responsive breakpoints, dark mode, prefers-reduced-motion, and more. For example, use md:outline-blue-400
to apply the outline-blue-400
utility at only medium screen sizes and above.
<button class="outline md:outline-blue-400">
<!-- ... -->
</button>
To learn more, check out the documentation on Responsive Design, Dark Mode and other media query modifiers.
Using custom values
Customizing your theme
By default, Tailwind makes the entire default color palette available as outline colors. You can customize your color palette by editing theme.colors
or theme.extend.colors
in your tailwind.config.js
file.
tailwind.config.js
module.exports = { theme: { extend: { colors: { 'regal-blue': '#243c5a', }, } }}
Alternatively, you can customize just your outline colors by editing theme.outlineColor
or theme.extend.outlineColor
in your tailwind.config.js
file.
Learn more about customizing the default theme in the theme customization documentation.
Arbitrary values
If you need to use a one-off outline-color
value that doesn’t make sense to include in your theme, use square brackets to generate a property on the fly using any arbitrary value.
<button class="outline-[#243c5a]">
<!-- ... -->
</button>
Learn more about arbitrary value support in the arbitrary values documentation.