A toolkit for integrating Outseta with Framer. Provides authentication state management, custom property display, and conditional visibility functions.
🔧 Authentication Controls: Show/hide content based on login status, trigger login/register/profile popups and logout action
👤 User Data Display: Automatically populate components with user names, email, avatar, and account info
💳 Access Management: Control component visibility based on subscription plans and add-ons
🔖 Bookmark System: Ready-made bookmark functionality
📚 Lesson Tracking: Ready-made lesson completion tracking and management
📝 Build Your Own: Build overrides for any custom property, user and account properties\
Choose your approach based on your project needs:
The all-in-one override file provides all the most common Outseta integration functions in a single file.
Copy the code from Outseta.tsx into a code file in your Framer project.
The file contains all of the functions listed in the Modular Overrides section below, prefixed with the module name for easy navigation in the override selector.
Benefits: Everything in one place, comprehensive functionality, single file to manage Downside: The file is large and may be difficult to navigate
The modular overrides are a set of focused override files for specific functionality.
For each set of overrides, copy the following code into a code file in your Framer project:
-
showForAnonymous- Component visible for anonymous usersshowForAuthenticated- Component visible for authenticated usersselectAuthStatusVariant- Selects variants based on auth statusselectPrimaryVariantForAuthenticated- Selects primary variant for authenticated users, keeps configured variant for non-authenticated userstriggerLogout- Component triggers logout (shows for authenticated users only)
-
popupLoginEmbed- Component opens login embed as popuppopupRegisterEmbed- Component opens registration embed as popuppopupProfileEmbed- Component opens profile embed as popup
-
withFirstName- Display user's first name as component textwithLastName- Display user's last name as component textwithFullName- Display user's full name as component textwithEmail- Display user's email address as component textwithAvatar- Display user's avatar/profile image as component imagewithAccountName- Display account name as component text
-
withPlanUid- Display current plan UID as component textselectPlanUidVariant- Selects variant based on plan UIDshowForPlan- Generic function to show component when user is on a specific plan (requires plan UID parameter)showForNotPlan- Generic function to show component when user is not on a specific plan (requires plan UID parameter)showForGoldPlan- Component visible for users on specific plan (customizable)showForNotGoldPlan- Component visible for users not on specific plan (customizable)selectPrimaryVariantForGoldPlan- Selects primary variant for users on the Gold plan, keeps configured variant for users not on the Gold plan (customize to your plans)
-
withAddOnUids- Display current add-on UIDs as component textshowForBoostAddOn- Component visible for users with specific add-on (customizable)showForNotBoostAddOn- Component visible for users without specific add-on (customizable)selectPrimaryVariantForBoostAddOn- Selects primary variant for users with the Boost add-on, keeps configured variant for users without the Boost add-on (customizable)
-
- 🚨 REQUIRES a person custom property with system name: Bookmarks
showForBookmarked- Component visible if item is bookmarkedtoggleBookmarked- Toggle bookmark statusselectCollectionVariant- SelectsEmpty Statevariant when there are no bookmarks, uses primary variant when there are bookmarks
-
- 🚨 REQUIRES a person custom property with system name: LessonsCompleted
showForCompleted- Component visible if lesson is completedtoggleCompleted- Toggle lesson completion status
-
dynamicGridHeight- Automatically hides empty grid items- ℹ️ NOTE: Use for grids containing items conditionally rendered with
showForBookmarkedorshowForCompleted
Benefits: Smaller files, easier to customize, only include what you need Downside: Multiple files to manage and copy
For custom properties and advanced use cases, you may create your own overrides. Here are some examples:
The toolkit supports four comparison operators for custom properties:
equal- Exact match (case-sensitive by default)not-equal- Not an exact match (case-sensitive by default)includes- Value is present in an array or stringnot-includes- Value is not present in an array or string
ℹ️ NOTE: Use the flags: ["ignore-case"] option to make comparisons case-insensitive.
import { custom } from "https://cdn.jsdelivr.net/npm/@outseta/toolkit@v0.7/dist/framer/overrides.js";
//// EXAMPLES OF CUSTOM PROPERTIES ////
/*
***********************************************************
** 🚨 **REQUIRES** an account custom property with system name: Mascot **
***********************************************************
1. Go to CRM > Custom Properties > Account > Add Property
2. Make sure the system name is "Mascot"
3. and the control type is "text"
*/
// Display company mascot as component text
export function withCompanyMascot(Component): React.ComponentType {
return custom.withTextProperty(Component, "Account.Mascot");
}
/*
***********************************************************
** 🚨 **REQUIRES** a person custom property with system name: CoffeePreference **
***********************************************************
1. Go to CRM > Custom Properties > Person > Add Property
2. Make sure the system name is "CoffeePreference"
3. and the control type is "text"
*/
// Component visible when coffee preference is Espresso
export function showForCoffeePreference_Espresso(
Component
): React.ComponentType {
return custom.showForProperty(Component, "CoffeePreference", {
value: "Espresso",
compare: "equal",
flags: ["ignore-case"],
});
}
// Component visible when coffee preference is NOT Espresso
export function showForCoffeePreference_NotEspresso(
Component
): React.ComponentType {
return custom.showForProperty(Component, "CoffeePreference", {
value: "Espresso",
compare: "not-equal",
flags: ["ignore-case"],
});
}
/*
***********************************************************
** 🚨 **REQUIRES** a person custom property with system name: Skills **
***********************************************************
1. Go to CRM > Custom Properties > Person > Add Property
2. Make sure the system name is "Skills"
3. and the control type is "select"
4. Add the following options: `JavaScript`, `Design`, `Marketing`
*/
// Toggle skill tag
// Selects variant `Active` when slug is present in skills
// Selects variant `Inactive` when slug is not present in skills
// ℹ️ **NOTE:** Requires a `slug` property on the component
export function toggleSkillTag(Component): React.ComponentType {
return custom.toggleProperty(Component, "Skills", {
value: "props.slug", // e.g. one of: `JavaScript`, `Design`, `Marketing`,
trueVariant: "Active",
falseVariant: "Inactive",
});
}
// Component visible when user does NOT have JavaScript skill
export function showForNotJavaScriptSkill(Component): React.ComponentType {
return custom.showForProperty(Component, "Skills", {
value: "JavaScript",
compare: "not-includes",
});
}
/*
***********************************************************
** 🚨 **REQUIRES** a person custom property with system name: WatchLater **
***********************************************************
1. Go to CRM > Custom Properties > Person > Add Property
2. Make sure the system name is "WatchLater"
3. and the control type is "text"
*/
// Selects variant `OnWatchLaterList` when slug is present in watch later
// Selects variant `NotOnWatchLaterList` when slug is not present in watch later
// ℹ️ **NOTE:** Requires a `slug` property on the component
export function selectVariantFromWatchLaterStatus(
Component
): React.ComponentType {
return custom.selectVariantForProperty(Component, "WatchLater", {
value: "props.slug", // e.g. one of: `video1`, `video2`, `video3` etc.
compare: "includes",
trueVariant: null, // Use the primary variant
falseVariant: "props.variant", // Use the configured variant
});
}MIT License - see LICENSE for details.
Contributions welcome. View the contributing guide for more information.