Vue Material Component Framework implementing Google's Material Design specification with comprehensive UI components, theming system, and accessibility features.
npx @tessl/cli install tessl/npm-vuetify@3.9.0Vuetify is a comprehensive Vue.js component framework that implements Google's Material Design specification. It provides a rich collection of pre-built, customizable UI components including buttons, forms, navigation elements, data tables, and layout components, along with a powerful theming system that supports custom color palettes, typography scales, and responsive breakpoints.
npm install vuetifyimport { createVuetify } from 'vuetify';
import * as components from 'vuetify/components';
import * as directives from 'vuetify/directives';For individual component imports:
import { VApp, VBtn, VCard } from 'vuetify/components';
import { Ripple, ClickOutside } from 'vuetify/directives';CommonJS (not recommended for Vue 3):
const { createVuetify } = require('vuetify');import { createApp } from 'vue';
import { createVuetify } from 'vuetify';
import { VApp, VBtn } from 'vuetify/components';
// Create Vuetify instance
const vuetify = createVuetify({
components: {
VApp,
VBtn,
},
theme: {
defaultTheme: 'light'
}
});
// Create and mount app
const app = createApp({
template: `
<v-app>
<v-btn color="primary">Click me</v-btn>
</v-app>
`
});
app.use(vuetify);
app.mount('#app');Vuetify is built around several key architectural patterns:
createVuetify()Core Vuetify framework initialization and configuration functionality.
function createVuetify(options?: VuetifyOptions): VuetifyInstance;
interface VuetifyOptions {
aliases?: Record<string, any>;
blueprint?: Blueprint;
components?: Record<string, any>;
date?: DateOptions;
directives?: Record<string, any>;
defaults?: DefaultsOptions;
display?: DisplayOptions;
goTo?: GoToOptions;
theme?: ThemeOptions;
icons?: IconOptions;
locale?: LocaleOptions & RtlOptions;
ssr?: SSROptions;
}
interface VuetifyInstance {
install(app: App): void;
unmount(): void;
defaults: DefaultsInstance;
display: DisplayInstance;
theme: ThemeInstance;
icons: IconSet;
locale: LocaleInstance;
date: DateInstance;
goTo: GoToInstance;
}Comprehensive collection of Material Design components for building user interfaces.
// Core UI Components
const VApp: Component;
const VBtn: Component;
const VCard: Component;
const VTextField: Component;
const VSelect: Component;
const VCheckbox: Component;
const VIcon: Component;
const VImg: Component;
// Layout Components
const VContainer: Component;
const VRow: Component;
const VCol: Component;
const VSheet: Component;
const VMain: Component;Components for creating navigation structures and user flows.
const VAppBar: Component;
const VNavigationDrawer: Component;
const VBottomNavigation: Component;
const VTabs: Component;
const VBreadcrumbs: Component;
const VMenu: Component;
const VToolbar: Component;
const VSystemBar: Component;Components for displaying and managing data in various formats.
const VDataTable: Component;
const VDataIterator: Component;
const VList: Component;
const VTable: Component;
const VTreeview: Component;
const VTimeline: Component;
const VVirtualScroll: Component;
const VInfiniteScroll: Component;Input components and form management utilities.
const VForm: Component;
const VTextField: Component;
const VTextarea: Component;
const VSelect: Component;
const VCombobox: Component;
const VAutocomplete: Component;
const VCheckbox: Component;
const VRadio: Component;
const VRadioGroup: Component;
const VSwitch: Component;
const VSlider: Component;
const VRangeSlider: Component;
const VFileInput: Component;
const VNumberInput: Component;
const VOtpInput: Component;Components for providing user feedback and displaying status.
const VAlert: Component;
const VSnackbar: Component;
const VProgressLinear: Component;
const VProgressCircular: Component;
const VSkeletonLoader: Component;
const VTooltip: Component;
const VDialog: Component;
const VBottomSheet: Component;Vue directives for adding interactive behaviors to DOM elements.
const ClickOutside: Directive;
const Intersect: Directive;
const Mutate: Directive;
const Resize: Directive;
const Ripple: Directive;
const Scroll: Directive;
const Touch: Directive;
const Tooltip: Directive;Reactive composition functions for accessing Vuetify's framework features.
function useTheme(): ThemeInstance;
function useDisplay(): DisplayInstance;
function useLocale(): LocaleInstance;
function useRtl(): RtlInstance;
function useDefaults(): DefaultsInstance;
function useDate(): DateInstance;
function useGoTo(): GoToInstance;
function useLayout(): LayoutInstance;
function useHotkey(): HotkeyInstance;Comprehensive theming and design system functionality.
interface ThemeDefinition {
dark: boolean;
colors: Record<string, string>;
variables: Record<string, string | number>;
}
interface ThemeOptions {
defaultTheme?: string;
themes?: Record<string, ThemeDefinition>;
variations?: {
colors: string[];
lighten: number;
darken: number;
};
}Icon management and display system with multiple icon set support.
interface IconOptions {
defaultSet?: string;
aliases?: IconAliases;
sets?: Record<string, IconSet>;
}
interface IconSet {
component: Component;
props?: IconProps;
}Locale and right-to-left text direction support.
interface LocaleOptions {
locale?: string;
fallback?: string;
messages?: Record<string, LocaleMessages>;
rtl?: Record<string, boolean>;
}
interface LocaleInstance {
current: Ref<string>;
fallback: Ref<string>;
messages: Ref<Record<string, LocaleMessages>>;
t(key: string, ...params: unknown[]): string;
n(value: number): string;
provide: Record<string, any>;
}Experimental components for testing new features and functionality.
const VCalendar: Component;
const VColorInput: Component;
const VDateInput: Component;
const VFileUpload: Component;
const VHotkey: Component;
const VPie: Component;
const VPullToRefresh: Component;
const VVideo: Component;Helper functions and utility modules for common operations.
// Color utilities
function parseColor(color: string): Record<string, number>;
function colorToHex(color: string): string;
function colorToRgb(color: string): { r: number; g: number; b: number };
// Animation utilities
const easings: Record<string, string>;
function genericComponent(options: ComponentOptions): Component;Built-in transition components for smooth animations between states and elements.
const VFadeTransition: Component;
const VSlideYTransition: Component;
const VSlideXTransition: Component;
const VExpandTransition: Component;
const VDialogTransition: Component;
const VScaleTransition: Component;// Core framework types
type Anchor =
| 'top' | 'bottom' | 'left' | 'right'
| 'center' | 'top left' | 'top right'
| 'bottom left' | 'bottom right';
interface JSXComponent {
[key: string]: any;
}
// Display system types
interface DisplayBreakpoint {
xs: boolean;
sm: boolean;
md: boolean;
lg: boolean;
xl: boolean;
xxl: boolean;
}
interface DisplayThresholds {
xs: number;
sm: number;
md: number;
lg: number;
xl: number;
xxl: number;
}
// Validation types
type ValidationRule<T = any> =
| true
| string
| ((value: T) => true | string);
// Data table types
interface DataTableHeader {
key: string;
value?: string;
title?: string;
colspan?: number;
rowspan?: number;
fixed?: boolean;
align?: 'start' | 'center' | 'end';
width?: string | number;
minWidth?: string | number;
maxWidth?: string | number;
sortable?: boolean;
sort?: DataTableCompareFunction;
}
type DataTableCompareFunction<T = any> = (a: T, b: T) => number;
// Strategy types for nested components
type SelectStrategy = 'single-leaf' | 'leaf' | 'independent' | 'single-independent' | 'multiple-leaf' | 'multiple-independent';
type OpenStrategy = 'single' | 'multiple' | 'list';
type ActiveStrategy = 'single-leaf' | 'leaf' | 'independent' | 'single-independent';
// Location and scroll strategies for overlays
type LocationStrategyFunction = (
data: StrategyProps,
props: LocationStrategyData,
contentStyles: Ref<Record<string, string>>
) => void;
type ScrollStrategyFunction = (
data: StrategyProps,
props: ScrollStrategyData
) => void;