Skip to content

Interfaces, in harmony.

Vue components for Nuxt and Tailwind CSS v4. Four small edits, one interface: apply them in turn and watch it become yours.

Get started
  1. Give the primary role one colour. Hover, pressed, text and focus values are derived from it, in light and dark.

    nuxt.config.ts
    import { defineColorFromSeed } from '@sewadah/selaras/theme'
    
    export default defineNuxtConfig({
      selaras: {
        theme: {
          colors: { primary: defineColorFromSeed('#0F766E') },
        },
      },
    })
  2. One radius token. The small, medium and large radii are derived from it.

    main.css
    :root {
      --selaras-radius-base: 0px;
    }
  3. Add classes to a component everywhere it appears, without wrapping it.

    app.config.ts
    export default defineAppConfig({
      selaras: {
        ui: {
          button: { slots: { base: 'uppercase tracking-wider' } },
        },
      },
    })
  4. The :ui prop changes a single instance, and wins over everything above.

    BookingForm.vue
    <SButton :ui="{ base: 'rounded-full' }">
      Request booking
    </SButton>

Explore the library

Building with a coding agent? Give it the component APIs, examples, and the Selaras skill.

Selaras 1.3.0, MIT licensed.