Gradient Color Stops

Utilities for controlling the color stops in background gradients.

Default class reference

Class
Properties
Preview 
from-transparent—tw-gradient-from: transparent; —tw-gradient-stops: var(—tw-gradient-from), var(—tw-gradient-to, rgba(0, 0, 0, 0));
from-current—tw-gradient-from: currentColor; —tw-gradient-stops: var(—tw-gradient-from), var(—tw-gradient-to, rgba(255, 255, 255, 0));
from-black—tw-gradient-from: #000; —tw-gradient-stops: var(—tw-gradient-from), var(—tw-gradient-to, rgba(0, 0, 0, 0));
from-white—tw-gradient-from: #fff; —tw-gradient-stops: var(—tw-gradient-from), var(—tw-gradient-to, rgba(255, 255, 255, 0));
from-gray-50—tw-gradient-from: #f9fafb; —tw-gradient-stops: var(—tw-gradient-from), var(—tw-gradient-to, rgba(249, 250, 251, 0));
from-gray-100—tw-gradient-from: #f3f4f6; —tw-gradient-stops: var(—tw-gradient-from), var(—tw-gradient-to, rgba(243, 244, 246, 0));
from-gray-200—tw-gradient-from: #e5e7eb; —tw-gradient-stops: var(—tw-gradient-from), var(—tw-gradient-to, rgba(229, 231, 235, 0));
from-gray-300—tw-gradient-from: #d1d5db; —tw-gradient-stops: var(—tw-gradient-from), var(—tw-gradient-to, rgba(209, 213, 219, 0));
from-gray-400—tw-gradient-from: #9ca3af; —tw-gradient-stops: var(—tw-gradient-from), var(—tw-gradient-to, rgba(156, 163, 175, 0));
from-gray-500—tw-gradient-from: #6b7280; —tw-gradient-stops: var(—tw-gradient-from), var(—tw-gradient-to, rgba(107, 114, 128, 0));
from-gray-600—tw-gradient-from: #4b5563; —tw-gradient-stops: var(—tw-gradient-from), var(—tw-gradient-to, rgba(75, 85, 99, 0));
from-gray-700—tw-gradient-from: #374151; —tw-gradient-stops: var(—tw-gradient-from), var(—tw-gradient-to, rgba(55, 65, 81, 0));
from-gray-800—tw-gradient-from: #1f2937; —tw-gradient-stops: var(—tw-gradient-from), var(—tw-gradient-to, rgba(31, 41, 55, 0));
from-gray-900—tw-gradient-from: #111827; —tw-gradient-stops: var(—tw-gradient-from), var(—tw-gradient-to, rgba(17, 24, 39, 0));
from-red-50—tw-gradient-from: #fef2f2; —tw-gradient-stops: var(—tw-gradient-from), var(—tw-gradient-to, rgba(254, 242, 242, 0));
from-red-100—tw-gradient-from: #fee2e2; —tw-gradient-stops: var(—tw-gradient-from), var(—tw-gradient-to, rgba(254, 226, 226, 0));
from-red-200—tw-gradient-from: #fecaca; —tw-gradient-stops: var(—tw-gradient-from), var(—tw-gradient-to, rgba(254, 202, 202, 0));
from-red-300—tw-gradient-from: #fca5a5; —tw-gradient-stops: var(—tw-gradient-from), var(—tw-gradient-to, rgba(252, 165, 165, 0));
from-red-400—tw-gradient-from: #f87171; —tw-gradient-stops: var(—tw-gradient-from), var(—tw-gradient-to, rgba(248, 113, 113, 0));
from-red-500—tw-gradient-from: #ef4444; —tw-gradient-stops: var(—tw-gradient-from), var(—tw-gradient-to, rgba(239, 68, 68, 0));
from-red-600—tw-gradient-from: #dc2626; —tw-gradient-stops: var(—tw-gradient-from), var(—tw-gradient-to, rgba(220, 38, 38, 0));
from-red-700—tw-gradient-from: #b91c1c; —tw-gradient-stops: var(—tw-gradient-from), var(—tw-gradient-to, rgba(185, 28, 28, 0));
from-red-800—tw-gradient-from: #991b1b; —tw-gradient-stops: var(—tw-gradient-from), var(—tw-gradient-to, rgba(153, 27, 27, 0));
from-red-900—tw-gradient-from: #7f1d1d; —tw-gradient-stops: var(—tw-gradient-from), var(—tw-gradient-to, rgba(127, 29, 29, 0));
from-yellow-50—tw-gradient-from: #fffbeb; —tw-gradient-stops: var(—tw-gradient-from), var(—tw-gradient-to, rgba(255, 251, 235, 0));
from-yellow-100—tw-gradient-from: #fef3c7; —tw-gradient-stops: var(—tw-gradient-from), var(—tw-gradient-to, rgba(254, 243, 199, 0));
from-yellow-200—tw-gradient-from: #fde68a; —tw-gradient-stops: var(—tw-gradient-from), var(—tw-gradient-to, rgba(253, 230, 138, 0));
from-yellow-300—tw-gradient-from: #fcd34d; —tw-gradient-stops: var(—tw-gradient-from), var(—tw-gradient-to, rgba(252, 211, 77, 0));
from-yellow-400—tw-gradient-from: #fbbf24; —tw-gradient-stops: var(—tw-gradient-from), var(—tw-gradient-to, rgba(251, 191, 36, 0));
from-yellow-500—tw-gradient-from: #f59e0b; —tw-gradient-stops: var(—tw-gradient-from), var(—tw-gradient-to, rgba(245, 158, 11, 0));
from-yellow-600—tw-gradient-from: #d97706; —tw-gradient-stops: var(—tw-gradient-from), var(—tw-gradient-to, rgba(217, 119, 6, 0));
from-yellow-700—tw-gradient-from: #b45309; —tw-gradient-stops: var(—tw-gradient-from), var(—tw-gradient-to, rgba(180, 83, 9, 0));
from-yellow-800—tw-gradient-from: #92400e; —tw-gradient-stops: var(—tw-gradient-from), var(—tw-gradient-to, rgba(146, 64, 14, 0));
from-yellow-900—tw-gradient-from: #78350f; —tw-gradient-stops: var(—tw-gradient-from), var(—tw-gradient-to, rgba(120, 53, 15, 0));
from-green-50—tw-gradient-from: #ecfdf5; —tw-gradient-stops: var(—tw-gradient-from), var(—tw-gradient-to, rgba(236, 253, 245, 0));
from-green-100—tw-gradient-from: #d1fae5; —tw-gradient-stops: var(—tw-gradient-from), var(—tw-gradient-to, rgba(209, 250, 229, 0));
from-green-200—tw-gradient-from: #a7f3d0; —tw-gradient-stops: var(—tw-gradient-from), var(—tw-gradient-to, rgba(167, 243, 208, 0));
from-green-300—tw-gradient-from: #6ee7b7; —tw-gradient-stops: var(—tw-gradient-from), var(—tw-gradient-to, rgba(110, 231, 183, 0));
from-green-400—tw-gradient-from: #34d399; —tw-gradient-stops: var(—tw-gradient-from), var(—tw-gradient-to, rgba(52, 211, 153, 0));
from-green-500—tw-gradient-from: #10b981; —tw-gradient-stops: var(—tw-gradient-from), var(—tw-gradient-to, rgba(16, 185, 129, 0));
from-green-600—tw-gradient-from: #059669; —tw-gradient-stops: var(—tw-gradient-from), var(—tw-gradient-to, rgba(5, 150, 105, 0));
from-green-700—tw-gradient-from: #047857; —tw-gradient-stops: var(—tw-gradient-from), var(—tw-gradient-to, rgba(4, 120, 87, 0));
from-green-800—tw-gradient-from: #065f46; —tw-gradient-stops: var(—tw-gradient-from), var(—tw-gradient-to, rgba(6, 95, 70, 0));
from-green-900—tw-gradient-from: #064e3b; —tw-gradient-stops: var(—tw-gradient-from), var(—tw-gradient-to, rgba(6, 78, 59, 0));
from-blue-50—tw-gradient-from: #eff6ff; —tw-gradient-stops: var(—tw-gradient-from), var(—tw-gradient-to, rgba(239, 246, 255, 0));
from-blue-100—tw-gradient-from: #dbeafe; —tw-gradient-stops: var(—tw-gradient-from), var(—tw-gradient-to, rgba(219, 234, 254, 0));
from-blue-200—tw-gradient-from: #bfdbfe; —tw-gradient-stops: var(—tw-gradient-from), var(—tw-gradient-to, rgba(191, 219, 254, 0));
from-blue-300—tw-gradient-from: #93c5fd; —tw-gradient-stops: var(—tw-gradient-from), var(—tw-gradient-to, rgba(147, 197, 253, 0));
from-blue-400—tw-gradient-from: #60a5fa; —tw-gradient-stops: var(—tw-gradient-from), var(—tw-gradient-to, rgba(96, 165, 250, 0));
from-blue-500—tw-gradient-from: #3b82f6; —tw-gradient-stops: var(—tw-gradient-from), var(—tw-gradient-to, rgba(59, 130, 246, 0));
from-blue-600—tw-gradient-from: #2563eb; —tw-gradient-stops: var(—tw-gradient-from), var(—tw-gradient-to, rgba(37, 99, 235, 0));
from-blue-700—tw-gradient-from: #1d4ed8; —tw-gradient-stops: var(—tw-gradient-from), var(—tw-gradient-to, rgba(29, 78, 216, 0));
from-blue-800—tw-gradient-from: #1e40af; —tw-gradient-stops: var(—tw-gradient-from), var(—tw-gradient-to, rgba(30, 64, 175, 0));
from-blue-900—tw-gradient-from: #1e3a8a; —tw-gradient-stops: var(—tw-gradient-from), var(—tw-gradient-to, rgba(30, 58, 138, 0));
from-indigo-50—tw-gradient-from: #eef2ff; —tw-gradient-stops: var(—tw-gradient-from), var(—tw-gradient-to, rgba(238, 242, 255, 0));
from-indigo-100—tw-gradient-from: #e0e7ff; —tw-gradient-stops: var(—tw-gradient-from), var(—tw-gradient-to, rgba(224, 231, 255, 0));
from-indigo-200—tw-gradient-from: #c7d2fe; —tw-gradient-stops: var(—tw-gradient-from), var(—tw-gradient-to, rgba(199, 210, 254, 0));
from-indigo-300—tw-gradient-from: #a5b4fc; —tw-gradient-stops: var(—tw-gradient-from), var(—tw-gradient-to, rgba(165, 180, 252, 0));
from-indigo-400—tw-gradient-from: #818cf8; —tw-gradient-stops: var(—tw-gradient-from), var(—tw-gradient-to, rgba(129, 140, 248, 0));
from-indigo-500—tw-gradient-from: #6366f1; —tw-gradient-stops: var(—tw-gradient-from), var(—tw-gradient-to, rgba(99, 102, 241, 0));
from-indigo-600—tw-gradient-from: #4f46e5; —tw-gradient-stops: var(—tw-gradient-from), var(—tw-gradient-to, rgba(79, 70, 229, 0));
from-indigo-700—tw-gradient-from: #4338ca; —tw-gradient-stops: var(—tw-gradient-from), var(—tw-gradient-to, rgba(67, 56, 202, 0));
from-indigo-800—tw-gradient-from: #3730a3; —tw-gradient-stops: var(—tw-gradient-from), var(—tw-gradient-to, rgba(55, 48, 163, 0));
from-indigo-900—tw-gradient-from: #312e81; —tw-gradient-stops: var(—tw-gradient-from), var(—tw-gradient-to, rgba(49, 46, 129, 0));
from-purple-50—tw-gradient-from: #f5f3ff; —tw-gradient-stops: var(—tw-gradient-from), var(—tw-gradient-to, rgba(245, 243, 255, 0));
from-purple-100—tw-gradient-from: #ede9fe; —tw-gradient-stops: var(—tw-gradient-from), var(—tw-gradient-to, rgba(237, 233, 254, 0));
from-purple-200—tw-gradient-from: #ddd6fe; —tw-gradient-stops: var(—tw-gradient-from), var(—tw-gradient-to, rgba(221, 214, 254, 0));
from-purple-300—tw-gradient-from: #c4b5fd; —tw-gradient-stops: var(—tw-gradient-from), var(—tw-gradient-to, rgba(196, 181, 253, 0));
from-purple-400—tw-gradient-from: #a78bfa; —tw-gradient-stops: var(—tw-gradient-from), var(—tw-gradient-to, rgba(167, 139, 250, 0));
from-purple-500—tw-gradient-from: #8b5cf6; —tw-gradient-stops: var(—tw-gradient-from), var(—tw-gradient-to, rgba(139, 92, 246, 0));
from-purple-600—tw-gradient-from: #7c3aed; —tw-gradient-stops: var(—tw-gradient-from), var(—tw-gradient-to, rgba(124, 58, 237, 0));
from-purple-700—tw-gradient-from: #6d28d9; —tw-gradient-stops: var(—tw-gradient-from), var(—tw-gradient-to, rgba(109, 40, 217, 0));
from-purple-800—tw-gradient-from: #5b21b6; —tw-gradient-stops: var(—tw-gradient-from), var(—tw-gradient-to, rgba(91, 33, 182, 0));
from-purple-900—tw-gradient-from: #4c1d95; —tw-gradient-stops: var(—tw-gradient-from), var(—tw-gradient-to, rgba(76, 29, 149, 0));
from-pink-50—tw-gradient-from: #fdf2f8; —tw-gradient-stops: var(—tw-gradient-from), var(—tw-gradient-to, rgba(253, 242, 248, 0));
from-pink-100—tw-gradient-from: #fce7f3; —tw-gradient-stops: var(—tw-gradient-from), var(—tw-gradient-to, rgba(252, 231, 243, 0));
from-pink-200—tw-gradient-from: #fbcfe8; —tw-gradient-stops: var(—tw-gradient-from), var(—tw-gradient-to, rgba(251, 207, 232, 0));
from-pink-300—tw-gradient-from: #f9a8d4; —tw-gradient-stops: var(—tw-gradient-from), var(—tw-gradient-to, rgba(249, 168, 212, 0));
from-pink-400—tw-gradient-from: #f472b6; —tw-gradient-stops: var(—tw-gradient-from), var(—tw-gradient-to, rgba(244, 114, 182, 0));
from-pink-500—tw-gradient-from: #ec4899; —tw-gradient-stops: var(—tw-gradient-from), var(—tw-gradient-to, rgba(236, 72, 153, 0));
from-pink-600—tw-gradient-from: #db2777; —tw-gradient-stops: var(—tw-gradient-from), var(—tw-gradient-to, rgba(219, 39, 119, 0));
from-pink-700—tw-gradient-from: #be185d; —tw-gradient-stops: var(—tw-gradient-from), var(—tw-gradient-to, rgba(190, 24, 93, 0));
from-pink-800—tw-gradient-from: #9d174d; —tw-gradient-stops: var(—tw-gradient-from), var(—tw-gradient-to, rgba(157, 23, 77, 0));
from-pink-900—tw-gradient-from: #831843; —tw-gradient-stops: var(—tw-gradient-from), var(—tw-gradient-to, rgba(131, 24, 67, 0));
via-transparent—tw-gradient-stops: var(—tw-gradient-from), transparent, var(—tw-gradient-to, rgba(0, 0, 0, 0));
via-current—tw-gradient-stops: var(—tw-gradient-from), currentColor, var(—tw-gradient-to, rgba(255, 255, 255, 0));
via-black—tw-gradient-stops: var(—tw-gradient-from), #000, var(—tw-gradient-to, rgba(0, 0, 0, 0));
via-white—tw-gradient-stops: var(—tw-gradient-from), #fff, var(—tw-gradient-to, rgba(255, 255, 255, 0));
via-gray-50—tw-gradient-stops: var(—tw-gradient-from), #f9fafb, var(—tw-gradient-to, rgba(249, 250, 251, 0));
via-gray-100—tw-gradient-stops: var(—tw-gradient-from), #f3f4f6, var(—tw-gradient-to, rgba(243, 244, 246, 0));
via-gray-200—tw-gradient-stops: var(—tw-gradient-from), #e5e7eb, var(—tw-gradient-to, rgba(229, 231, 235, 0));
via-gray-300—tw-gradient-stops: var(—tw-gradient-from), #d1d5db, var(—tw-gradient-to, rgba(209, 213, 219, 0));
via-gray-400—tw-gradient-stops: var(—tw-gradient-from), #9ca3af, var(—tw-gradient-to, rgba(156, 163, 175, 0));
via-gray-500—tw-gradient-stops: var(—tw-gradient-from), #6b7280, var(—tw-gradient-to, rgba(107, 114, 128, 0));
via-gray-600—tw-gradient-stops: var(—tw-gradient-from), #4b5563, var(—tw-gradient-to, rgba(75, 85, 99, 0));
via-gray-700—tw-gradient-stops: var(—tw-gradient-from), #374151, var(—tw-gradient-to, rgba(55, 65, 81, 0));
via-gray-800—tw-gradient-stops: var(—tw-gradient-from), #1f2937, var(—tw-gradient-to, rgba(31, 41, 55, 0));
via-gray-900—tw-gradient-stops: var(—tw-gradient-from), #111827, var(—tw-gradient-to, rgba(17, 24, 39, 0));
via-red-50—tw-gradient-stops: var(—tw-gradient-from), #fef2f2, var(—tw-gradient-to, rgba(254, 242, 242, 0));
via-red-100—tw-gradient-stops: var(—tw-gradient-from), #fee2e2, var(—tw-gradient-to, rgba(254, 226, 226, 0));
via-red-200—tw-gradient-stops: var(—tw-gradient-from), #fecaca, var(—tw-gradient-to, rgba(254, 202, 202, 0));
via-red-300—tw-gradient-stops: var(—tw-gradient-from), #fca5a5, var(—tw-gradient-to, rgba(252, 165, 165, 0));
via-red-400—tw-gradient-stops: var(—tw-gradient-from), #f87171, var(—tw-gradient-to, rgba(248, 113, 113, 0));
via-red-500—tw-gradient-stops: var(—tw-gradient-from), #ef4444, var(—tw-gradient-to, rgba(239, 68, 68, 0));
via-red-600—tw-gradient-stops: var(—tw-gradient-from), #dc2626, var(—tw-gradient-to, rgba(220, 38, 38, 0));
via-red-700—tw-gradient-stops: var(—tw-gradient-from), #b91c1c, var(—tw-gradient-to, rgba(185, 28, 28, 0));
via-red-800—tw-gradient-stops: var(—tw-gradient-from), #991b1b, var(—tw-gradient-to, rgba(153, 27, 27, 0));
via-red-900—tw-gradient-stops: var(—tw-gradient-from), #7f1d1d, var(—tw-gradient-to, rgba(127, 29, 29, 0));
via-yellow-50—tw-gradient-stops: var(—tw-gradient-from), #fffbeb, var(—tw-gradient-to, rgba(255, 251, 235, 0));
via-yellow-100—tw-gradient-stops: var(—tw-gradient-from), #fef3c7, var(—tw-gradient-to, rgba(254, 243, 199, 0));
via-yellow-200—tw-gradient-stops: var(—tw-gradient-from), #fde68a, var(—tw-gradient-to, rgba(253, 230, 138, 0));
via-yellow-300—tw-gradient-stops: var(—tw-gradient-from), #fcd34d, var(—tw-gradient-to, rgba(252, 211, 77, 0));
via-yellow-400—tw-gradient-stops: var(—tw-gradient-from), #fbbf24, var(—tw-gradient-to, rgba(251, 191, 36, 0));
via-yellow-500—tw-gradient-stops: var(—tw-gradient-from), #f59e0b, var(—tw-gradient-to, rgba(245, 158, 11, 0));
via-yellow-600—tw-gradient-stops: var(—tw-gradient-from), #d97706, var(—tw-gradient-to, rgba(217, 119, 6, 0));
via-yellow-700—tw-gradient-stops: var(—tw-gradient-from), #b45309, var(—tw-gradient-to, rgba(180, 83, 9, 0));
via-yellow-800—tw-gradient-stops: var(—tw-gradient-from), #92400e, var(—tw-gradient-to, rgba(146, 64, 14, 0));
via-yellow-900—tw-gradient-stops: var(—tw-gradient-from), #78350f, var(—tw-gradient-to, rgba(120, 53, 15, 0));
via-green-50—tw-gradient-stops: var(—tw-gradient-from), #ecfdf5, var(—tw-gradient-to, rgba(236, 253, 245, 0));
via-green-100—tw-gradient-stops: var(—tw-gradient-from), #d1fae5, var(—tw-gradient-to, rgba(209, 250, 229, 0));
via-green-200—tw-gradient-stops: var(—tw-gradient-from), #a7f3d0, var(—tw-gradient-to, rgba(167, 243, 208, 0));
via-green-300—tw-gradient-stops: var(—tw-gradient-from), #6ee7b7, var(—tw-gradient-to, rgba(110, 231, 183, 0));
via-green-400—tw-gradient-stops: var(—tw-gradient-from), #34d399, var(—tw-gradient-to, rgba(52, 211, 153, 0));
via-green-500—tw-gradient-stops: var(—tw-gradient-from), #10b981, var(—tw-gradient-to, rgba(16, 185, 129, 0));
via-green-600—tw-gradient-stops: var(—tw-gradient-from), #059669, var(—tw-gradient-to, rgba(5, 150, 105, 0));
via-green-700—tw-gradient-stops: var(—tw-gradient-from), #047857, var(—tw-gradient-to, rgba(4, 120, 87, 0));
via-green-800—tw-gradient-stops: var(—tw-gradient-from), #065f46, var(—tw-gradient-to, rgba(6, 95, 70, 0));
via-green-900—tw-gradient-stops: var(—tw-gradient-from), #064e3b, var(—tw-gradient-to, rgba(6, 78, 59, 0));
via-blue-50—tw-gradient-stops: var(—tw-gradient-from), #eff6ff, var(—tw-gradient-to, rgba(239, 246, 255, 0));
via-blue-100—tw-gradient-stops: var(—tw-gradient-from), #dbeafe, var(—tw-gradient-to, rgba(219, 234, 254, 0));
via-blue-200—tw-gradient-stops: var(—tw-gradient-from), #bfdbfe, var(—tw-gradient-to, rgba(191, 219, 254, 0));
via-blue-300—tw-gradient-stops: var(—tw-gradient-from), #93c5fd, var(—tw-gradient-to, rgba(147, 197, 253, 0));
via-blue-400—tw-gradient-stops: var(—tw-gradient-from), #60a5fa, var(—tw-gradient-to, rgba(96, 165, 250, 0));
via-blue-500—tw-gradient-stops: var(—tw-gradient-from), #3b82f6, var(—tw-gradient-to, rgba(59, 130, 246, 0));
via-blue-600—tw-gradient-stops: var(—tw-gradient-from), #2563eb, var(—tw-gradient-to, rgba(37, 99, 235, 0));
via-blue-700—tw-gradient-stops: var(—tw-gradient-from), #1d4ed8, var(—tw-gradient-to, rgba(29, 78, 216, 0));
via-blue-800—tw-gradient-stops: var(—tw-gradient-from), #1e40af, var(—tw-gradient-to, rgba(30, 64, 175, 0));
via-blue-900—tw-gradient-stops: var(—tw-gradient-from), #1e3a8a, var(—tw-gradient-to, rgba(30, 58, 138, 0));
via-indigo-50—tw-gradient-stops: var(—tw-gradient-from), #eef2ff, var(—tw-gradient-to, rgba(238, 242, 255, 0));
via-indigo-100—tw-gradient-stops: var(—tw-gradient-from), #e0e7ff, var(—tw-gradient-to, rgba(224, 231, 255, 0));
via-indigo-200—tw-gradient-stops: var(—tw-gradient-from), #c7d2fe, var(—tw-gradient-to, rgba(199, 210, 254, 0));
via-indigo-300—tw-gradient-stops: var(—tw-gradient-from), #a5b4fc, var(—tw-gradient-to, rgba(165, 180, 252, 0));
via-indigo-400—tw-gradient-stops: var(—tw-gradient-from), #818cf8, var(—tw-gradient-to, rgba(129, 140, 248, 0));
via-indigo-500—tw-gradient-stops: var(—tw-gradient-from), #6366f1, var(—tw-gradient-to, rgba(99, 102, 241, 0));
via-indigo-600—tw-gradient-stops: var(—tw-gradient-from), #4f46e5, var(—tw-gradient-to, rgba(79, 70, 229, 0));
via-indigo-700—tw-gradient-stops: var(—tw-gradient-from), #4338ca, var(—tw-gradient-to, rgba(67, 56, 202, 0));
via-indigo-800—tw-gradient-stops: var(—tw-gradient-from), #3730a3, var(—tw-gradient-to, rgba(55, 48, 163, 0));
via-indigo-900—tw-gradient-stops: var(—tw-gradient-from), #312e81, var(—tw-gradient-to, rgba(49, 46, 129, 0));
via-purple-50—tw-gradient-stops: var(—tw-gradient-from), #f5f3ff, var(—tw-gradient-to, rgba(245, 243, 255, 0));
via-purple-100—tw-gradient-stops: var(—tw-gradient-from), #ede9fe, var(—tw-gradient-to, rgba(237, 233, 254, 0));
via-purple-200—tw-gradient-stops: var(—tw-gradient-from), #ddd6fe, var(—tw-gradient-to, rgba(221, 214, 254, 0));
via-purple-300—tw-gradient-stops: var(—tw-gradient-from), #c4b5fd, var(—tw-gradient-to, rgba(196, 181, 253, 0));
via-purple-400—tw-gradient-stops: var(—tw-gradient-from), #a78bfa, var(—tw-gradient-to, rgba(167, 139, 250, 0));
via-purple-500—tw-gradient-stops: var(—tw-gradient-from), #8b5cf6, var(—tw-gradient-to, rgba(139, 92, 246, 0));
via-purple-600—tw-gradient-stops: var(—tw-gradient-from), #7c3aed, var(—tw-gradient-to, rgba(124, 58, 237, 0));
via-purple-700—tw-gradient-stops: var(—tw-gradient-from), #6d28d9, var(—tw-gradient-to, rgba(109, 40, 217, 0));
via-purple-800—tw-gradient-stops: var(—tw-gradient-from), #5b21b6, var(—tw-gradient-to, rgba(91, 33, 182, 0));
via-purple-900—tw-gradient-stops: var(—tw-gradient-from), #4c1d95, var(—tw-gradient-to, rgba(76, 29, 149, 0));
via-pink-50—tw-gradient-stops: var(—tw-gradient-from), #fdf2f8, var(—tw-gradient-to, rgba(253, 242, 248, 0));
via-pink-100—tw-gradient-stops: var(—tw-gradient-from), #fce7f3, var(—tw-gradient-to, rgba(252, 231, 243, 0));
via-pink-200—tw-gradient-stops: var(—tw-gradient-from), #fbcfe8, var(—tw-gradient-to, rgba(251, 207, 232, 0));
via-pink-300—tw-gradient-stops: var(—tw-gradient-from), #f9a8d4, var(—tw-gradient-to, rgba(249, 168, 212, 0));
via-pink-400—tw-gradient-stops: var(—tw-gradient-from), #f472b6, var(—tw-gradient-to, rgba(244, 114, 182, 0));
via-pink-500—tw-gradient-stops: var(—tw-gradient-from), #ec4899, var(—tw-gradient-to, rgba(236, 72, 153, 0));
via-pink-600—tw-gradient-stops: var(—tw-gradient-from), #db2777, var(—tw-gradient-to, rgba(219, 39, 119, 0));
via-pink-700—tw-gradient-stops: var(—tw-gradient-from), #be185d, var(—tw-gradient-to, rgba(190, 24, 93, 0));
via-pink-800—tw-gradient-stops: var(—tw-gradient-from), #9d174d, var(—tw-gradient-to, rgba(157, 23, 77, 0));
via-pink-900—tw-gradient-stops: var(—tw-gradient-from), #831843, var(—tw-gradient-to, rgba(131, 24, 67, 0));
to-transparent—tw-gradient-to: transparent;
to-current—tw-gradient-to: currentColor;
to-black—tw-gradient-to: #000;
to-white—tw-gradient-to: #fff;
to-gray-50—tw-gradient-to: #f9fafb;
to-gray-100—tw-gradient-to: #f3f4f6;
to-gray-200—tw-gradient-to: #e5e7eb;
to-gray-300—tw-gradient-to: #d1d5db;
to-gray-400—tw-gradient-to: #9ca3af;
to-gray-500—tw-gradient-to: #6b7280;
to-gray-600—tw-gradient-to: #4b5563;
to-gray-700—tw-gradient-to: #374151;
to-gray-800—tw-gradient-to: #1f2937;
to-gray-900—tw-gradient-to: #111827;
to-red-50—tw-gradient-to: #fef2f2;
to-red-100—tw-gradient-to: #fee2e2;
to-red-200—tw-gradient-to: #fecaca;
to-red-300—tw-gradient-to: #fca5a5;
to-red-400—tw-gradient-to: #f87171;
to-red-500—tw-gradient-to: #ef4444;
to-red-600—tw-gradient-to: #dc2626;
to-red-700—tw-gradient-to: #b91c1c;
to-red-800—tw-gradient-to: #991b1b;
to-red-900—tw-gradient-to: #7f1d1d;
to-yellow-50—tw-gradient-to: #fffbeb;
to-yellow-100—tw-gradient-to: #fef3c7;
to-yellow-200—tw-gradient-to: #fde68a;
to-yellow-300—tw-gradient-to: #fcd34d;
to-yellow-400—tw-gradient-to: #fbbf24;
to-yellow-500—tw-gradient-to: #f59e0b;
to-yellow-600—tw-gradient-to: #d97706;
to-yellow-700—tw-gradient-to: #b45309;
to-yellow-800—tw-gradient-to: #92400e;
to-yellow-900—tw-gradient-to: #78350f;
to-green-50—tw-gradient-to: #ecfdf5;
to-green-100—tw-gradient-to: #d1fae5;
to-green-200—tw-gradient-to: #a7f3d0;
to-green-300—tw-gradient-to: #6ee7b7;
to-green-400—tw-gradient-to: #34d399;
to-green-500—tw-gradient-to: #10b981;
to-green-600—tw-gradient-to: #059669;
to-green-700—tw-gradient-to: #047857;
to-green-800—tw-gradient-to: #065f46;
to-green-900—tw-gradient-to: #064e3b;
to-blue-50—tw-gradient-to: #eff6ff;
to-blue-100—tw-gradient-to: #dbeafe;
to-blue-200—tw-gradient-to: #bfdbfe;
to-blue-300—tw-gradient-to: #93c5fd;
to-blue-400—tw-gradient-to: #60a5fa;
to-blue-500—tw-gradient-to: #3b82f6;
to-blue-600—tw-gradient-to: #2563eb;
to-blue-700—tw-gradient-to: #1d4ed8;
to-blue-800—tw-gradient-to: #1e40af;
to-blue-900—tw-gradient-to: #1e3a8a;
to-indigo-50—tw-gradient-to: #eef2ff;
to-indigo-100—tw-gradient-to: #e0e7ff;
to-indigo-200—tw-gradient-to: #c7d2fe;
to-indigo-300—tw-gradient-to: #a5b4fc;
to-indigo-400—tw-gradient-to: #818cf8;
to-indigo-500—tw-gradient-to: #6366f1;
to-indigo-600—tw-gradient-to: #4f46e5;
to-indigo-700—tw-gradient-to: #4338ca;
to-indigo-800—tw-gradient-to: #3730a3;
to-indigo-900—tw-gradient-to: #312e81;
to-purple-50—tw-gradient-to: #f5f3ff;
to-purple-100—tw-gradient-to: #ede9fe;
to-purple-200—tw-gradient-to: #ddd6fe;
to-purple-300—tw-gradient-to: #c4b5fd;
to-purple-400—tw-gradient-to: #a78bfa;
to-purple-500—tw-gradient-to: #8b5cf6;
to-purple-600—tw-gradient-to: #7c3aed;
to-purple-700—tw-gradient-to: #6d28d9;
to-purple-800—tw-gradient-to: #5b21b6;
to-purple-900—tw-gradient-to: #4c1d95;
to-pink-50—tw-gradient-to: #fdf2f8;
to-pink-100—tw-gradient-to: #fce7f3;
to-pink-200—tw-gradient-to: #fbcfe8;
to-pink-300—tw-gradient-to: #f9a8d4;
to-pink-400—tw-gradient-to: #f472b6;
to-pink-500—tw-gradient-to: #ec4899;
to-pink-600—tw-gradient-to: #db2777;
to-pink-700—tw-gradient-to: #be185d;
to-pink-800—tw-gradient-to: #9d174d;
to-pink-900—tw-gradient-to: #831843;

Starting color

Set the starting color of a gradient using the from-{color} utilities.

Gradient Color Stops - 图1

  1. <div class="bg-gradient-to-r from-red-500 ..."></div>

Ending color

Set the ending color of a gradient using the to-{color} utilities.

Gradient Color Stops - 图2

  1. <div class="bg-gradient-to-r from-green-400 to-blue-500 ..."></div>

Gradients to do not fade in from transparent by default. To fade in from transparent, reverse the gradient direction and use a from-{color} utility.

Middle color

Add a middle color to a gradient using the via-{color} utilities.

Gradient Color Stops - 图3

  1. <div class="bg-gradient-to-r from-purple-400 via-pink-500 to-red-500 ..."></div>

Gradients with a from-{color} and via-{color} will fade out to transparent by default if no to-{color} is present.

Fading to transparent

Gradients fade out to transparent by default, without requiring you to add to-transparent explicitly. Tailwind intelligently calculates the right “transparent” value to use based on the starting color to avoid a bug in Safari that causes fading to simply the transparent keyword to fade through gray, which just looks awful.

Gradient Color Stops - 图4Don’t add `to-transparent` explicitly

  1. <div class="bg-gradient-to-r from-blue-500 to-transparent">
  2. <!-- ... -->
  3. </div>

Gradient Color Stops - 图5Only specify a from color and fade to transparent automatically

  1. <div class="bg-gradient-to-r from-blue-500">
  2. <!-- ... -->
  3. </div>

Responsive

To control the gradient color stops of an element at a specific breakpoint, add a {screen}: prefix to any existing gradient color stop utility. For example, use md:from-green-500 to apply the from-green-500 utility at only medium screen sizes and above.

  1. <div class="bg-gradient-to-r from-purple-400 md:from-yellow-500"></div>

For more information about Tailwind’s responsive design features, check out the Responsive Design documentation.

Hover

To control the gradient color stops of an element on hover, add the hover: prefix to any existing gradient color stop utility. For example, use hover:bg-blue-500 to apply the bg-blue-500 utility on hover.

Gradient Color Stops - 图6

  1. <button type="button" class="bg-gradient-to-r from-green-400 to-blue-500 hover:from-pink-500 hover:to-yellow-500 ...">
  2. Hover me
  3. </button>

Hover utilities can also be combined with responsive utilities by adding the responsive {screen}: prefix before the focus: prefix.

  1. <button class="... md:from-blue-500 md:hover:from-blue-700 ...">Button</button>

Focus

To control the gradient color stops of an element on focus, add the focus: prefix to any existing gradient color stop utility. For example, use focus:bg-blue-500 to apply the bg-blue-500 utility on focus.

Gradient Color Stops - 图7

  1. <button type="button" class="bg-gradient-to-r from-green-400 to-blue-500 focus:from-pink-500 focus:to-yellow-500">
  2. Focus me
  3. </button>

Focus utilities can also be combined with responsive utilities by adding the responsive {screen}: prefix before the focus: prefix.

  1. <button class="... md:from-blue-500 md:focus:from-blue-700 ...">Button</button>

Customizing

Background Colors

By default, Tailwind makes the entire default color palette available as gradient color stops.

You can customize your color palette by editing the theme.colors variable in your tailwind.config.js file, or customize just your gradient color stop colors using the theme.gradientColorStops section of your Tailwind config.

  1. // tailwind.config.js
  2. module.exports = {
  3. theme: {
  4. gradientColorStops: theme => ({
  5. - ...theme('colors'),
  6. + 'primary': '#3490dc',
  7. + 'secondary': '#ffed4a',
  8. + 'danger': '#e3342f',
  9. })
  10. }
  11. }

Variants

By default, only responsive, dark mode (if enabled), hover and focus variants are generated for gradient color stops utilities.

You can control which variants are generated for the gradient color stops utilities by modifying the gradientColorStops property in the variants section of your tailwind.config.js file.

For example, this config will also generate active and group-hover variants:

  1. // tailwind.config.js
  2. module.exports = {
  3. variants: {
  4. extend: {
  5. // ...
  6. + gradientColorStops: ['active', 'group-hover'],
  7. }
  8. }
  9. }

Disabling

If you don’t plan to use the gradient color stops utilities in your project, you can disable them entirely by setting the gradientColorStops property to false in the corePlugins section of your config file:

  1. // tailwind.config.js
  2. module.exports = {
  3. corePlugins: {
  4. // ...
  5. + gradientColorStops: false,
  6. }
  7. }

←Background Image Border Radius→

Edit this page on GitHub