@primereact/types
v11.1.0
Published
Type definitions for PrimeReact.
Readme
@primereact/types
TypeScript definitions shared across PrimeReact: prop interfaces, instance shapes, Pass Through contracts and the core infrastructure types that @primereact/core, @primereact/headless, @primereact/styles and @primereact/ui are built on.
Every component already re-exports its own types, so a separate install is only needed to reference a type without pulling in the runtime, or to author a component against PrimeReact's contracts.
npm install -D @primereact/typesUsage
Per-component types live under @primereact/types/primitive/<name>, and the matching hook types under @primereact/types/headless/<name>.
import type { ButtonProps, ButtonInstance } from '@primereact/types/primitive/button';Each component contributes a consistent set: Props extending BaseComponentProps, State for the exposed internal state, Instance for what a ref returns and what Pass Through functions receive, PassThrough with one entry per internal element, and ClassNames for the .p- names the styled layer emits.
BaseComponentProps combines the headless props, the global component props (unstyled, pt, ptOptions, as) and the intrinsic props of the rendered element. A component's prop interface extends it rather than restating any of them.
Documentation
License
Licensed under the PrimeUI License - Copyright (c) PrimeTek Informatics

