Most Popular
Courier is a notification service that centralizes all of your templates and messaging channels in one place which increases visibility and reduces engineering time.
Sign-up
We are excited to announce the availability of Courier’s newest provider, Courier Push! We have released Inbox and Toast, two open source React components that exemplify the potential future applications of this feature. With Toast, you can send your user a notification within your web application and Inbox allows you to create an embeddable notification repository so that your user can access all past in-app notifications.
Most importantly, Courier Push allows us the flexibility and customization to do app-to-user communication right. As software users ourselves, we are bombarded with messages constantly, which can...really suck. Yet, notifications are necessary to communicate with users. With Courier Toast and Inbox, developers can support custom notifications for their users’ specificities and communicate through multiple wide-ranging channels while maintaining a single in-app notifications repository. We are particularly excited about all the potential future applications of Courier Push in addition to Toast and Inbox and are looking forward to expanding its uses.
Here at Courier, we want to improve the integration experience for you, the developer, and the notification experience for your customers. We’ve done this with Courier Toast and Inbox.
One of the major tenets of Courier’s product offerings is sending notifications. Receiving them and displaying them in your application is game changing. The ease of implementation makes your job as a developer simple and enables you to build real-time web applications that provide a better user experience for your customers. Your end-users can see customized notifications pop up in your web application through a modular system you can easily customize.
Alongside Toast messages is a customizable inbox, which is essentially a notification history. This takes the pressure off users to respond immediately, lessening the anxiety around the experience in general. Inside Inbox, a user can:
Let’s walk through how you can integrate Courier Toast and Inbox React Components in a React app. Check out the Courier React Components repository on GitHub.
Step 1: Install CourierProvider
1@trycourier/react-provider
...to handle all of the authentication and integration with the backend.
1yarn add @trycourier/react-provider or npm i @trycourier/react-provider
Step 2: At the top level in your React tree, add something that resembles the following code. The Client Key can be found here and the User Id is the identifier for identifying your user. Note that it will be used later in the API call to courier.
1import { CourierProvider } from "@trycourier/react-provider";2import { Toast } from "@trycourier/react-toast";34const MyApp = ({ children }) => {5return (6<CourierProvider clientKey={CLIENT_KEY} userId={USER_ID}>7<Toast />8{children}9</CourierProvider>10);11};
N/B: You can add Toast to the frontend anywhere as long as it’s a child of the CourierProvider.
Step 3: Inbox should be added in the application as a child of CourierProvider, but where you want the Bell icon to display. For this example, we will just put it right next to Toast.
yarn add @trycourier/react-inbox
or npm i @trycourier/react-inbox
1import { CourierProvider } from "@trycourier/react-provider";2import { Toast } from "@trycourier/react-toast";3import { Inbox } from "@trycourier/react-inbox";45const MyApp = ({ children }) => {6return (7<CourierProvider clientKey={CLIENT_KEY} userId={USER_ID}>8<Toast />9<Inbox />10{children}11</CourierProvider>12);13};
There are two ways to customize your Inbox and Toast. First you can use the studio
to customize your application and the components will automatically update when the brand is published.
The second, you can pass properties right into each component. Each component supports a theme and also supports render properties. Here’s the code for props:
1interface InboxProps = {2//Icon Class Name3className?: string;45// Default Icon to use if no Icon is present in Message6defaultIcon?: false | string;78// Placement of the Bell relative to the Inbox9placement?: "top" | "left" | "right" | "bottom";1011// Render Props for Custom Rendering12renderTabs?: React.FunctionComponent<{13currentTab?: ITab;14tabs?: ITab[];15}>;16renderFooter?: React.FunctionComponent;17renderHeader?: React.FunctionComponent;18renderIcon?: React.FunctionComponent<{19unreadMessageCount?: number;20}>;21renderMessage?: React.FunctionComponent<IMessage>;22renderNoMessages?: React.FunctionComponent;2324// Tab Overrides25tabs?: Array<ITab>;26theme?: ThemeObject;2728// Inbox Title Override29title?: string;30trigger?: "click" | "hover";31}
Courier Push opens the doors to perfecting app-to-human communication with its flexibility and potential for customization. Communication is a two-way street that requires not only good messaging, but also a channel and style that works uniquely for a specific type of user using a specific app. With Toast and Inbox, developers can create an effective notifications system that reaches end users when they want, how they want, and the way they want. To learn more, check out the documentation.
We believe that providing contextual notifications from within your app is an opportunity to provide better, more intuitive, and more interesting user experiences. We also believe that if done right, these can take us a long way towards accomplishing our goal of making computer to human communication delightful. This is just the beginning of our investment in solving this problem, so please stay tuned for more.
Check out Inbox and Toast and let us know what you think! Your feedback helps us to continuously improve.
Courier is a notification service that centralizes all of your templates and messaging channels in one place which increases visibility and reduces engineering time.
Sign-up
Tools and Techniques to Establish Your Data Team Early
How tools like Segment, Metabase, Snowflake, Census, and others, can help establish a data team from the very early stages in a startup.
Raymond See
February 16, 2023
Develop a Motivational QOTD with Courier and GPT2
Courier and OpenGPT2 in action: build a service that sends friends and family an AI generated motivational quote of the day.
Prakhar Srivastav
February 09, 2023
Free Tools
Comparison Guides
Send up to 10,000 notifications every month, for free.
Get started for free
Send up to 10,000 notifications every month, for free.
Get started for free
© 2024 Courier. All rights reserved.