maud-ui 0.1.0

58 headless, accessible UI components for Rust web apps. Built on maud + htmx, styled like shadcn/ui.
Documentation
/* InputOTP component — one-time password input slots */

.mui-input-otp {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
}

/* Individual character slot */
.mui-input-otp__slot {
  width: 2.5rem;
  height: 2.75rem;
  text-align: center;
  font-size: 1.25rem;
  font-weight: 500;
  font-family: var(--mui-font-mono);
  color: var(--mui-text);
  background: transparent;
  border: 1px solid var(--mui-border);
  border-radius: var(--mui-radius-md);
  caret-color: var(--mui-accent);
  transition: border-color 150ms cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

.mui-input-otp__slot::placeholder {
  color: var(--mui-text-muted);
  opacity: 0.4;
}

/* Hover */
.mui-input-otp__slot:hover:not(:disabled):not(:focus) {
  border-color: var(--mui-border-hover);
}

/* Focus ring — matching Input component style */
.mui-input-otp__slot:focus-visible {
  outline: none;
  border-color: transparent;
  box-shadow: 0 0 0 2px var(--mui-bg), 0 0 0 4px var(--mui-border-focus);
}

/* Filled slot — slightly bolder for visual feedback */
.mui-input-otp__slot:not(:placeholder-shown) {
  font-weight: 600;
}

.mui-input-otp__slot:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* Group separator (dash between slot groups) */
.mui-input-otp__separator {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.125rem;
}

.mui-input-otp__separator-dash {
  width: 0.625rem;
  height: 2px;
  background: var(--mui-border);
  border-radius: 1px;
}

/* Hidden composite value input */
.mui-input-otp__value {
  display: none;
}