Skip to main content
You are viewing Pre-Alpha documentation.
Vuetify0 Logo

Components

v0 components are Vue wrappers around composables. Composables hold logic, components provide Vue integration via slots, props, and emits.

Edit this page
Report a Bug
Copy Page as Markdown
IntermediateJan 11, 2026

Component Philosophy

  • Headless: Zero styling - you own all CSS
  • Slot-driven: All customization through scoped slots
  • Accessible: ARIA attributes via attrs object
  • Composable-backed: Use components or composables directly
Tip

Always spread the attrs object onto your elements. It contains ARIA attributes and data attributes for accessibility and styling.

Ask AI
How do I add styling or CSS classes to headless components?

Component Categories

CategoryPurposeExamples
PrimitivesBase building blocksAtom
ProvidersPure state management, no DOMSelection, Single, Group, Step
SemanticMeaningful HTML defaultsAvatar, Pagination
DisclosureShow/hide patternsExpansionPanel, Popover

Atom: The Foundation

The Atom component is a polymorphic base element supporting any HTML tag:

vue
<script lang="ts" setup>
  function onClick() {
    console.log('clicked')
  }
</script>

<template>
  <!-- Render as button -->
  <Atom as="button" @click="onClick">Click me</Atom>

  <!-- Render as link -->
  <Atom as="a" href="/path">Navigate</Atom>

  <!-- Renderless mode - slot only -->
  <Atom :as="null" v-slot="{ attrs }">
    <MyCustomComponent v-bind="attrs" />
  </Atom>
</template>

Rendering Modes

ModeUsageOutput
Elementas="button"<button> with slot content
Renderless:as="null" or renderlessSlot only, no wrapper

Slot Props Pattern

Every component exposes attrs in its default slot. Spread onto your element for behavior and accessibility:

vue
<script setup lang="ts">
  import { Selection } from '@vuetify/v0'

  const items = ['Apple', 'Banana', 'Cherry']
</script>

<template>
  <Selection.Root>
    <Selection.Item v-for="item in items" v-slot="{ attrs, isSelected, toggle }">
      <button
        v-bind="attrs"
        :class="{ 'bg-primary': isSelected }"
        @click="toggle"
      >
        {{ item }}
      </button>
    </Selection.Item>
  </Selection.Root>
</template>

Common Slot Props

Component TypeSlot Props
Selection.Itemattrs, isSelected, toggle, select, unselect
Group.Itemattrs, isSelected, isMixed, toggle
ExpansionPanel.Activatorattrs, isSelected, toggle
Popover.Rootid, isSelected, toggle
Popover.Activatorattrs, isOpen
Popover.Contentattrs, isOpen

Data Attributes

Components emit data attributes for CSS styling:

css
[data-selected] { background: var(--primary); }
[data-disabled] { opacity: 0.5; }
[data-mixed] { /* tri-state checkbox */ }
[data-popover-open] { /* popover is visible */ }

Component Reference

Primitives

  • Atom — Polymorphic base element

Providers

  • Selection — Multi-selection state
  • Single — Single-selection state
  • Group — Multi-select with tri-state
  • Step — Sequential navigation

Semantic

Disclosure


© 2016-1970 Vuetify, LLC
Ctrl+/