features map.
How It Works
When you callcanAccess:
- Crovver looks up the tenant’s active subscription
- Fetches the associated plan
- Checks
plan.features[featureKey] === true - Returns
canAccess: trueorfalse
canAccess: false.
Subscription in past_due → canAccess: false.
Subscription in trialing → canAccess: true (trial counts as active).
Checking Access — Frontend
Use theuseFeatureAccess hook:
Checking Access — API
Blocking UI with FeatureGuard
The<FeatureGuard> component handles the gate declaratively: