Guide

Design foundations

Weini UI gives your Vue app a consistent scale for controls, spacing, surfaces, and motion. Start with the defaults, then adjust the parts that need to fit your product.

Choose a control size

Many controls share three sizes. Medium is the default for everyday forms. Small keeps dense interfaces comfortable; large gives important actions more room. Check each component page for its supported sizes.

SizePropTypical heightGood for
Smallsm32pxDense toolbars and tables
Mediummd40pxMost forms and actions
Largelg48pxProminent actions and spacious layouts
Button sizes
<script setup lang="ts">
import Button from './components/ui/button/Button.vue'
</script>

<template>
  <Button size="sm">Compact</Button>
  <Button size="md">Default</Button>
  <Button size="lg">Prominent</Button>
</template>

Icon buttons keep a compact visual footprint while their whole control responds to clicks. Menu and picker options use the full row as the target. On touch-heavy screens, choose a roomier size and leave space between nearby actions.

Spacing that works together

Controls follow a 4px spacing rhythm. The values below show the default horizontal padding for common parts, so fields and actions line up when you compose them. Cards use the same scale for their inner space.

ComponentSmallMediumLarge
Input, select, or combobox8px12px16px
Button12px16px24px
Card16px24px32px

Menus and lists use roomy rows, while calendars keep their grid alignment. These are starting points: your copied component source can be adjusted when your layout needs a different density.

Colors, corners, and depth

Components use semantic CSS variables, so one theme change can update every matching surface. Neutral borders stay quiet; focus, selection, validation, and status colors remain distinct in light and dark themes.

TokenWhere it appears
--borderNeutral outlines and dividers
--ringKeyboard focus
--radiusCorners throughout the library
--elevation-cardDepth for contained surfaces
--elevation-popoverDepth for floating surfaces
app.css
/* Add after importing weini-theme.css. */
:root {
  --radius: 16px;
  --border: oklch(0.86 0.01 260);
  --elevation-popover: 0 16px 40px oklch(0 0 0 / 0.12);
}

See Theming for the full palette and light and dark overrides.

Interaction and accessibility

Weini controls show when they are focused, open, selected, disabled, or invalid where those states apply. Navigation keeps the current destination visible after the pointer leaves. Keyboard users can see focus, and animations respect reduced-motion preferences.

Layout-relative spacing and corners adapt to right-to-left pages. You can set dir="rtl" on an app or section; a placement prop such as side="left" still refers to that physical edge.

When building a form, add visible labels and connect error text to its field. The Forms and accessibility guide shows the pattern in Vue.

Weini UIDesign system · Vue component library · Free and public