Skip to main content
Checks whether the tenant’s active plan includes a given feature key. Supports multi-product orgs via a productSlug option and an optional remote API check.

Usage

Parameters

Return Value

How Access Is Determined

By default this is a local check — no API call is made. The subscription data fetched by CrovverProvider on mount is used:
  1. No active subscription → hasAccess: false
  2. Feature not in plan.featureshasAccess: false
  3. plan.features[featureKey] === truehasAccess: true
When checkRemote: true, the hook calls POST /api/public/can-access on every render cycle change, which supports productSlug scoping.

Examples

Disable a button instead of hiding it

Multi-product: scope to a specific product

Subscription-existence check

Check multiple features