axonyx-ui 0.0.48

Foundry CSS, JavaScript helpers, and Axonyx-native .ax components for Axonyx UI.
Documentation
.ax-checkbox,
.ax-switch {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    color: var(--ax-text);
    font-weight: 700;
}

.ax-checkbox input {
    width: 1.05rem;
    height: 1.05rem;
    accent-color: var(--ax-primary);
}

.ax-switch input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.ax-switch__track {
    position: relative;
    width: 2.8rem;
    height: 1.5rem;
    border: 1px solid var(--ax-border-strong);
    border-radius: 999px;
    background: var(--ax-surface-2);
    transition:
        background 140ms ease,
        border-color 140ms ease;
}

.ax-switch__thumb {
    position: absolute;
    top: 0.16rem;
    left: 0.16rem;
    width: 1.05rem;
    height: 1.05rem;
    border-radius: 999px;
    background: var(--ax-text-muted);
    transition:
        transform 140ms ease,
        background 140ms ease;
}

.ax-switch input:checked + .ax-switch__track,
.ax-switch[data-checked='true'] .ax-switch__track {
    border-color: color-mix(in srgb, var(--ax-primary) 70%, var(--ax-border-strong));
    background: color-mix(in srgb, var(--ax-primary) 28%, var(--ax-surface-2));
}

.ax-switch input:checked + .ax-switch__track .ax-switch__thumb,
.ax-switch[data-checked='true'] .ax-switch__thumb {
    transform: translateX(1.3rem);
    background: var(--ax-primary);
}

.ax-switch input:focus-visible + .ax-switch__track {
    outline: 2px solid var(--ax-cyan);
    outline-offset: 2px;
}