Skip to content

Search documentation

Search guides, examples, and component APIs.

Quick links
↑↓ NavigateEnter OpenEsc Close
Get started

Documentation navigation

Guide

Design foundations

The defaults help Buttons, fields, cards, and menus feel like one interface. Start by choosing a size. The tables further down explain the spacing and color rules behind it.

Choose a control size

Pass a size prop to a control when the default medium size does not fit. Medium is for most forms, small fits dense toolbars, and large gives a main action more room. Not every component has all three sizes; check its API page first.

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>
SizePropTypical heightGood for
Smallsm32pxDense toolbars and tables
Mediummd40pxMost forms and actions
Largelg48pxProminent actions and spacious layouts

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 @getweini/vue/styles/default.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.