maud-ui 0.1.0

58 headless, accessible UI components for Rust web apps. Built on maud + htmx, styled like shadcn/ui.
Documentation
/* NativeSelect component — styled native <select> matching Input appearance */

.mui-native-select {
  position: relative;
  display: inline-flex;
  width: 100%;
}

.mui-native-select__select {
  appearance: none;
  -webkit-appearance: none;
  display: block;
  width: 100%;
  height: 2.25rem;
  padding: 0.5rem 2.25rem 0.5rem 0.75rem;
  background: transparent;
  color: var(--mui-text);
  border: 1px solid var(--mui-border);
  border-radius: var(--mui-radius-md);
  font-family: inherit;
  font-size: 0.875rem;
  line-height: 1.25;
  cursor: pointer;
  transition: border-color 150ms cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 150ms cubic-bezier(0.4, 0, 0.2, 1);
  box-sizing: border-box;
}

.mui-native-select__select:hover:not(:disabled) {
  border-color: var(--mui-border-hover);
}

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

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

/* Placeholder option styling */
.mui-native-select__select:invalid,
.mui-native-select__select option[value=""][disabled] {
  color: var(--mui-text-muted);
}

/* Chevron indicator — subtle, right-aligned */
.mui-native-select__chevron {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  height: 1rem;
  color: var(--mui-text-muted);
  pointer-events: none;
  opacity: 0.7;
}