Bind

The Bind directive dynamically applies DOM element attributes using properties defined in an object.


import { BindModule } from 'primeng/bind'

The pBind is a directive that accepts an object of HTML attributes.

Static
Dynamic

<div [pBind]="{ 'aria-label': 'basic-box', class: 'bg-primary text-primary-contrast flex items-center justify-center p-4 rounded-lg w-32 font-medium' }">
    Static
</div>

<div [pBind]="boxBinding" pTooltip="Click to change color">
    Dynamic
</div>

Figma UI Kit
The official Figma UI Kit for Prime UI libraries, the essential resource for designing with PrimeOne components.
November Sale 2025
Limited coupons for PrimeStore's biggest sale. Claim yours before they're gone!