Core utilities and base functionality for PrimeVue UI component library
npx @tessl/cli install tessl/npm-primevue--core@4.3.0@primevue/core provides the foundational infrastructure for PrimeVue, a comprehensive Vue.js UI component library. It contains essential utilities, base components, services, and configuration systems that power the entire PrimeVue ecosystem, including filtering services, icon constants, component base classes, styling utilities, and Vue composables.
npm install @primevue/coreimport { FilterService, PrimeIcons, PrimeVue } from "@primevue/core";
import { BaseComponent, BaseDirective } from "@primevue/core";
import { useStyle, useId } from "@primevue/core";Modular imports:
import { FilterService, FilterMatchMode } from "@primevue/core/api";
import PrimeVue from "@primevue/core/config";
import BaseComponent from "@primevue/core/basecomponent";
import { useStyle } from "@primevue/core/usestyle";import { createApp } from 'vue';
import PrimeVue from '@primevue/core/config';
import { FilterService, FilterMatchMode, PrimeIcons } from '@primevue/core/api';
// Configure PrimeVue
const app = createApp(App);
app.use(PrimeVue, {
theme: 'aura-light-green',
ripple: true
});
// Use filtering service
const filteredData = FilterService.filter(
users,
['name', 'email'],
'john',
FilterMatchMode.CONTAINS
);
// Use icon constants
const searchIcon = PrimeIcons.SEARCH; // 'pi pi-search'@primevue/core is organized into several key areas:
Core API services for data manipulation and UI constants. Essential for building data-driven components with filtering capabilities.
declare namespace FilterService {
function filter(
value: any[],
fields: string[],
filterValue: any,
filterMatchMode: string,
filterLocale?: string
): any[];
}
declare const FilterMatchMode: {
readonly CONTAINS: string;
readonly STARTS_WITH: string;
readonly ENDS_WITH: string;
// ... more filter modes
};
declare const PrimeIcons: {
readonly SEARCH: string;
readonly CHECK: string;
readonly TIMES: string;
// ... 200+ icon constants
};PrimeVue configuration plugin providing theming, localization, and global settings management.
declare const PrimeVue: {
install(app: any, options?: PrimeVueConfiguration): void;
};
interface PrimeVueConfiguration {
theme?: any;
ripple?: boolean;
locale?: PrimeVueLocaleOptions;
unstyled?: boolean;
pt?: any;
// ... more configuration options
}
declare function usePrimeVue(): {
config: PrimeVueConfiguration;
};Foundation classes for building PrimeVue components with consistent behavior, styling, and theming support.
declare const BaseComponent: DefineComponent<{
pt?: Object;
ptOptions?: Object;
unstyled?: Boolean;
dt?: Object;
}>;
declare const BaseDirective: {
extend(name: string, options?: any): any;
};Utility composables for common functionality like ID generation, dynamic styling, and attribute selection.
declare function useId(initialValue?: string): string;
declare function useStyle(css: string, options?: UseStyleOptions): {
load: (css?: string, props?: any) => void;
unload: () => void;
isLoaded: Readonly<Ref<boolean>>;
};Helper classes and utility functions for component development and data manipulation.
declare class ConnectedOverlayScrollHandler {
constructor(element: any, listener?: () => void);
bindScrollListener(): void;
unbindScrollListener(): void;
destroy(): void;
}
declare function getVNodeProp(vnode: any, prop: string): any;type Booleanish = boolean | 'true' | 'false';
type Numberish = number | string;
type Nullable<T = void> = T | null | undefined;
type PassThrough<T = void> = T | object | undefined;
type DesignToken<T = void> = T | object | undefined;
type EmitFn<Options = ObjectEmitsOptions, Event extends keyof Options = keyof Options> =
Options extends Array<infer V>
? (e: V, ...args: any[]) => void
: {} extends Options
? (e: string, ...args: any[]) => void
: UnionToIntersection<{
[key in Event]: Options[key] extends (...args: infer Args) => any
? (e: key, ...args: Args) => void
: (e: key, ...args: any[]) => void;
}[Event]>;
type DefineComponent<P = {}, S = {}, E = {}, M = {}> = {
new (): {
$props: P & PublicProps;
$slots: S;
$emit: E;
} & M;
};