npm.io
11.0.0 • Published 5d ago

@primereact/types

Licence
SEE LICENSE IN LICENSE.md
Version
11.0.0
Deps
0
Size
1.7 MB
Vulns
0
Weekly
0
Stars
8.3K

PrimeReact Types

TypeScript type definitions shared across PrimeReact packages. Provides the type contracts for component props, instance shapes, Pass Through, and core infrastructure.

Component base types

BaseComponentProps and CommonComponentProps are the foundations every component's prop interface builds on. They include PT props, unstyled mode, and global config overrides.

Pass Through types

PassThroughType<I, Attrs> types PT values as either a static object or a function that receives the component instance and returns an object. PassThroughMethodOptions<I> describes what's available inside those functions (instance, props, state, context).

Instance types

Each component exposes an instance type (e.g., ButtonInstance, AccordionInstance) describing what useRef-attached handles and internal state look like.

Utilities

ExtractProps<T> for inferring JSX prop types, shared primitive types, and headless/style type utilities.

These types are consumed by @primereact/core, @primereact/headless, @primereact/styles, and @primereact/ui. Application code can import them for typed component refs and PT definitions.

License

Licensed under the PrimeUI License - Copyright (c) PrimeTek Informatics