@memori.ai/memori-react
Version:
[](https://www.npmjs.com/package/@memori.ai/memori-react)   • 3.44 kB
CSS
.memori--slider-container {
position: relative;
width: 100%;
max-width: 100%;
padding: 12px 12px;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
touch-action: none;
user-select: none;
}
.memori--slider-disabled {
cursor: not-allowed;
opacity: 0.6;
}
.memori--slider-header {
position: absolute;
display: flex;
width: 100%;
align-items: center;
justify-content: space-between;
margin-bottom: 16px;
/* max-height: 10px; */
}
.memori--slider-label {
max-width: 70%;
font-size: 1.2rem;
font-weight: 500;
line-height: 1.2;
}
.memori--slider-value {
min-width: 40px;
max-width: 30%;
font-size: 1rem;
font-weight: 500;
text-align: right;
}
.memori--slider-track-container {
position: relative;
display: flex;
height: 96px;
max-height: 96px;
align-items: center;
margin-top: 8px;
cursor: pointer;
touch-action: none;
}
.memori--slider-track {
position: absolute;
overflow: hidden;
width: 100%;
height: 16px;
max-height: 16px;
border-radius: 8px;
background-color: #e5e5e5;
}
.memori--slider-track-fill {
position: absolute;
width: var(--percentage);
height: 100%;
border-radius: 8px;
background-color: var(--memori-primary, #2563eb);
transition: width 0.15s ease;
}
.memori--slider-marks {
position: absolute;
display: flex;
width: 100%;
justify-content: space-between;
padding: 0 8px;
padding-top: 24px;
pointer-events: none;
}
.memori--slider-mark {
display: flex;
min-width: 40px;
flex-direction: column;
align-items: center;
}
.memori--slider-mark-line {
width: 3px;
height: 8px;
max-height: 8px;
margin-bottom: 8px;
background-color: #9ca3af;
}
.memori--slider-mark-value {
color: #666;
font-size: 1rem;
font-weight: 500;
white-space: nowrap;
}
.memori--slider-thumb {
position: absolute;
z-index: 1;
left: var(--percentage);
width: 40px;
max-width: 40px;
height: 40px;
max-height: 40px;
border: 4px solid var(--memori-primary, #2563eb);
border-radius: 50%;
background-color: white;
box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
touch-action: none;
transform: translateX(-50%);
transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.memori--slider-thumb:hover,
.memori--slider-thumb:active {
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.25);
transform: translateX(-50%) scale(1.1);
}
/* Portrait/Totem specific styles */
@media screen and (max-aspect-ratio: 3/4) {
.memori--slider-container {
padding: 16px;
}
.memori--slider-header {
margin-bottom: 16px;
}
.memori--slider-label {
font-size: 1.3rem;
}
.memori--slider-value {
min-width: 50px;
font-size: 1.1rem;
}
.memori--slider-track-container {
height: 80px;
margin-top: 8px;
}
.memori--slider-track {
height: 16px;
border-radius: 10px;
}
.memori--slider-thumb {
width: 48px;
height: 48px;
border-width: 4px;
}
.memori--slider-mark-value {
margin-top: 4px;
font-size: 1.1rem;
}
}
/* Very tall displays */
@media screen and (min-height: 1200px) {
.memori--slider-container {
padding: 24px 20px;
}
.memori--slider-header {
margin-bottom: 24px;
}
.memori--slider-label {
font-size: 1.4rem;
}
.memori--slider-track-container {
height: 96px;
margin-top: 12px;
}
.memori--slider-thumb {
width: 56px;
height: 56px;
border-width: 5px;
}
}