Gate
Gate(
__namedParameters):any
Access-gate surface slot — renders children when entitled (allowed or
limited), or a gated placement when access is denied.
Checks entitlements and/or usage thresholds. On denial, displays the configured
gated placement (or deniedFallback if no placement matches). On success,
renders children — or limitedFallback when the entitlement is limited.
Parameters
Section titled “Parameters”__namedParameters
Section titled “__namedParameters”AccessGateSurfaceSlotProps
Returns
Section titled “Returns”any
Example
Section titled “Example”// `can` shorthand — mirrors useCan('mp4_download')<AccessGateSurfaceSlot id="export-gate" can="mp4_download" deniedFallback={<span>Upgrade to export</span>}> <ExportButton /></AccessGateSurfaceSlot>
// soft-warn while still granting access when the balance runs low<AccessGateSurfaceSlot id="credits-gate" can="core_credits" limitedFallback={<LowBalanceNotice />}> <RecordButton /></AccessGateSurfaceSlot>
<AccessGateSurfaceSlot id="usage-gate" check={[ { entitlement: 'core_credits' }, { usage: 'core_credits', threshold: 100 }, ]} deniedFallback={<QuotaExhausted />}> <RecordButton /></AccessGateSurfaceSlot>