maud-ui 0.1.0

58 headless, accessible UI components for Rust web apps. Built on maud + htmx, styled like shadcn/ui.
Documentation
/* Table component — shadcn-quality data table */

.mui-table-wrapper {
  position: relative;
  overflow: auto;
  width: 100%;
}

.mui-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  caption-side: bottom;
}

/* Caption — bottom, muted, left-aligned */
.mui-table__caption {
  padding: 0.75rem 0;
  color: var(--mui-text-muted);
  font-size: 0.875rem;
  text-align: left;
}

/* Header cells — subtle weight, muted color, bottom border */
.mui-table__th {
  text-align: left;
  font-weight: 500;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--mui-border);
  color: var(--mui-text-muted);
  font-size: 0.875rem;
  white-space: nowrap;
  height: 2.5rem;
}

/* Body cells */
.mui-table__td {
  padding: 0.75rem 1rem;
  color: var(--mui-text);
  vertical-align: middle;
}

/* Row borders */
.mui-table__row {
  border-bottom: 1px solid var(--mui-border);
  transition: background-color var(--mui-transition);
}

/* Remove border on last row */
.mui-table tbody tr:last-child {
  border-bottom: none;
}

.mui-table tbody tr:last-child .mui-table__row {
  border-bottom: none;
}

/* Striped variant — muted bg on even rows */
.mui-table--striped tbody tr:nth-child(even) {
  background-color: var(--mui-bg-input);
}

/* Hoverable variant */
.mui-table--hoverable tbody tr:hover {
  background-color: var(--mui-bg-input);
}

/* Compact variant */
.mui-table--compact .mui-table__th {
  padding: 0.375rem 0.75rem;
  height: 2rem;
}

.mui-table--compact .mui-table__td {
  padding: 0.375rem 0.75rem;
}