zero-ui-kit
Version:
A modern React UI component library with Button, Input, and other essential components
179 lines (155 loc) • 3.57 kB
CSS
/* Button Base Styles */
.zero-button {
font-family: inherit;
font-weight: 500;
border: none;
border-radius: 8px;
cursor: pointer;
display: inline-flex;
align-items: center;
justify-content: center;
text-decoration: none;
transition: all 0.2s ease-in-out;
position: relative;
overflow: hidden;
outline: none;
box-sizing: border-box;
}
.zero-button:focus {
outline: 2px solid #3b82f6;
outline-offset: 2px;
}
/* Button Sizes */
.zero-button--small {
padding: 6px 12px;
font-size: 0.875rem;
line-height: 1.25rem;
min-height: 32px;
}
.zero-button--medium {
padding: 8px 16px;
font-size: 1rem;
line-height: 1.5rem;
min-height: 40px;
}
.zero-button--large {
padding: 12px 24px;
font-size: 1.125rem;
line-height: 1.75rem;
min-height: 48px;
}
/* Button Variants */
.zero-button--primary {
background-color: #3b82f6;
color: white;
border: 1px solid #3b82f6;
}
.zero-button--primary:hover {
background-color: #2563eb;
border-color: #2563eb;
transform: translateY(-1px);
box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
}
.zero-button--secondary {
background-color: #6b7280;
color: white;
border: 1px solid #6b7280;
}
.zero-button--secondary:hover {
background-color: #4b5563;
border-color: #4b5563;
transform: translateY(-1px);
box-shadow: 0 4px 8px rgba(107, 114, 128, 0.3);
}
.zero-button--success {
background-color: #10b981;
color: white;
border: 1px solid #10b981;
}
.zero-button--success:hover {
background-color: #059669;
border-color: #059669;
transform: translateY(-1px);
box-shadow: 0 4px 8px rgba(16, 185, 129, 0.3);
}
.zero-button--danger {
background-color: #ef4444;
color: white;
border: 1px solid #ef4444;
}
.zero-button--danger:hover {
background-color: #dc2626;
border-color: #dc2626;
transform: translateY(-1px);
box-shadow: 0 4px 8px rgba(239, 68, 68, 0.3);
}
.zero-button--warning {
background-color: #f59e0b;
color: white;
border: 1px solid #f59e0b;
}
.zero-button--warning:hover {
background-color: #d97706;
border-color: #d97706;
transform: translateY(-1px);
box-shadow: 0 4px 8px rgba(245, 158, 11, 0.3);
}
.zero-button--info {
background-color: #06b6d4;
color: white;
border: 1px solid #06b6d4;
}
.zero-button--info:hover {
background-color: #0891b2;
border-color: #0891b2;
transform: translateY(-1px);
box-shadow: 0 4px 8px rgba(6, 182, 212, 0.3);
}
.zero-button--outline {
background-color: transparent;
color: #3b82f6;
border: 1px solid #3b82f6;
}
.zero-button--outline:hover {
background-color: #3b82f6;
color: white;
transform: translateY(-1px);
box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
}
/* Disabled State */
.zero-button--disabled {
opacity: 0.6;
cursor: not-allowed;
pointer-events: none;
}
.zero-button--disabled:hover {
transform: none;
box-shadow: none;
}
/* Loading Animation */
.zero-button--loading {
position: relative;
color: transparent;
}
.zero-button--loading::after {
content: '';
position: absolute;
width: 16px;
height: 16px;
top: 50%;
left: 50%;
margin-left: -8px;
margin-top: -8px;
border: 2px solid #ffffff;
border-radius: 50%;
border-top-color: transparent;
animation: button-loading-spinner 1s ease infinite;
}
@keyframes button-loading-spinner {
from {
transform: rotate(0turn);
}
to {
transform: rotate(1turn);
}
}