React Preferences Component
Learn how to use and customize the Preferences component in React to manage notification settings.
By default, Novu will show the subscriber preferences cog icon on the Inbox component.
Users can enable/disable any active channel in the workflow using subscriber preferences or they can update the preference globally for all workflows under the Global Preferences
.

Basic usage
The Preferences
component is used to display the subscriber preferences. Use it when you want to render preferences in another part of your application or create a custom layout for the Inbox.
Customization options
Filtering preferences
You can filter the preferences visible by the user by specifying the preferenceFilter
on the
Inbox
component. Learn more about it
here.
Hiding global preferences
Global subscriber preferences are shown by default. To hide them, add the following code to your global CSS file:
Grouping preferences
Preference grouping lets you organize extensive lists of workflows into well-organized, meaningful groups. This ensures that your end-users get a better experience when managing their preferences.
Note: Grouping preference is supported in client-side SDKs starting from version 3.4.0.
To implement preference grouping, use the preferenceGroups
prop on the Inbox
component. Each group requires:
name
: The text displayed for the groupfilter
: Criteria for which preferences appear in the group (object or function)
Here are the key ways to filter preferences:
Filter by tags
Use this approach to group preferences that share specific tags.
Filter by tags and workflow IDs:
Combine tags and workflow IDs to define a more targeted group of preferences.
Include all workflows
Include every available workflow, regardless of its tag or grouping, by returning the full preferences list.
Custom filtering logic
You can implement custom filtering logic using a function that receives the preferences array (excluding global preferences) and returns filtered preferences based on your criteria.
The Global Preferences are always visible and cannot be removed from the list.
Here’s how the preferenceGroups
prop fits into the full <Inbox /> component:
