File: blockui.md | Updated: 11/15/2025
Primary
Surface
PresetsAuraMaterialLaraNora
Ripple
RTL
v20
FEATURES
API
THEMING
PASSTHROUGH
BlockUI can either block other components or the whole page.
import { BlockUIModule } from 'primeng/blockui';
The element to block should be placed as a child of BlockUI and blocked property is required to control the state.
BlockUnblock
Header
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
<p-button label="Block" (click)="blockedPanel = true" /> <p-button label="Unblock" (click)="blockedPanel = false" /> <p-blockui [target]="pnl" [blocked]="blockedPanel" /> <p-panel #pnl header="Header" class="mt-6"> <p class="m-0"> Lorem ipsum dolor sit amet, consectetur adipiscing elit... </p> </p-panel>
If the target element is not specified, BlockUI blocks the document by default.
Block
<p-blockui [blocked]="blockedDocument" />
BlockUI manages aria-busy state attribute when the UI gets blocked and unblocked. Any valid attribute is passed to the root element so additional attributes like role and aria-live can be used to define live regions.
Component does not include any interactive elements.
Import
Basic
Document
Accessibility


Theme Designer
Theme Designer is the ultimate tool to customize and design your own themes featuring a visual editor, figma to theme code, cloud storage, and migration assistant.
PrimeNG 20.3.0 by PrimeTek