Skip to content

useEntitlement

useEntitlement(__namedParameters): UseEntitlementResult

React hook that wraps sdk.checkEntitlement().

Returns a reactive entitlement result that can drive access-gate UI.

Until the first check resolves, allowed and denied are both false and result is null — the three-state model. Consumers decide from the triple (isLoading / allowed / denied), never from denied alone; the SDK is fail-closed, so “not yet allowed” is the default. Evaluation is local to the loaded Playbook — there is no per-check network call.

UseEntitlementOptions

UseEntitlementResult

function BrandKitSection() {
const { allowed, denied, result } = useEntitlement({ handle: 'brand_kit' });
if (denied) return <UpgradePrompt reason={result?.reason} />;
return <BrandKitEditor />;
}