Loading...
New Winner – Cross-Border Excellence | Payoneer India 2026 Check out
Featured Recognized by Salesforce; Proven by impact! Check out

Sticky notes aren’t just for your desk anymore! In this tutorial, we’ll create a Lightning Web Component (LWC) in Salesforce that allows you to pin notes on your app page or record page. With a clean, interactive UI, these digital sticky notes ensure you never forget important tasks or details.

What Will You Learn?

By the end of this guide, you’ll understand how to:

Prerequisite

Let’s Create the Metadata first

Step 1: To create the Metadata, first click on the gear icon that is on the top right, and then click on setup.

01 2

Step 2: Now, in the Quick find, search for custom metadata and then click on it; then click on the “New Custom Metadata Types” button.

02 3
03 3

Step 3: For this example, you can set the Label as “Sticky Note Color Schema” and click on save.

04 3

Step 4: Create these fields once the metadata is created.

05 2

Now, we can move forward to the Apex class and Lightning Web Components.

Let’s Create the Apex Class

Step 1: To create an Apex Class, use the below line in the terminal.

  • sfdx force:apex:class:create -n stickyNoteHandler

Copy and paste the below code.

Now that we have Metadata and an Apex class, we can create a Lightning Web Component.

Let’s Create the Lightning Web Component

Step 1: To create the LWC, you can put the below command in the terminal.

  • sfdx force:lightning:component:create –type lwc -n stickyNotePanel -d force-app/main/default/lwc
  • sfdx force:lightning:component:create –type lwc -n stickyNotes -d force-app/main/default/lwc

Step 2: You can change the component names according to your preference; for example, we are using the stickyNotePanel and stickyNotes.

You can copy and paste the code provided below.

stickyNotePanel

HTML

JavaScript

CSS

stickyNotes
HTML

JavaScript

CSS

That’s it for creating and displaying the notes on the page. Now, let us show you a glimpse of how it will look in your Salesforce org.

06 2
07 2

Watch Live Demo

Here’s How the Moving of Sticky Notes Works

Mousedown

  • Think of mousedown as grabbing something. In this case, we make it so that we now tell the js that we are holding it.
  • isDragging = true – tells your component, “Okay, the user is moving me now.”
  • Offsets – figure out where inside the note you clicked, so the note moves smoothly without “jumping” to put the cursor at the corner.

Mousemove

  • This mentions what happens when the mouse is moving.
  • ClientX, ClientY – Tracks current mouse position.

By combining these two, you can obtain the current mouse position and, based on that, set the top and left CSS properties of the Sticky note.

Here you can see the live demo with the link below: Click Here

No Data Found.

Related Articles
From SMBs to Enterprises: Why Salesforce CRM Remains the Choice for Every Business Size

Running a modern business requires a robust Salesforce CRM platform that connects teams, organizes customer data, and delivers real-time operational insights. In today’s competitive environment, waiting for information across disconnected systems is no longer practical, especially when modern buyers expect immediate responses across every channel. For years, the software was primarily associated with large corporate […]

Read More
How to Integrate NikoHealth to Salesforce

Healthcare organizations using NikoHealth often need patient, insurance, order, invoice, and prescription data available inside Salesforce. As data grows, manually updating records across systems becomes difficult and can lead to delays, duplicate work, and data inconsistencies. NikoHealth to Salesforce integration helps solve this challenge by automatically synchronizing data between both platforms. Instead of building custom […]

Read More
Flow Orchestrator vs. Traditional Flows: When to Use Each for Salesforce Automation

Businesses use Salesforce automation to reduce manual work, improve efficiency, and automate repetitive business processes. Two commonly used automation approaches inside Salesforce are Traditional Flows and Flow Orchestrator. Traditional Flows are mainly used for simple automation tasks such as updating records, sending notifications, creating tasks, and automating business logic. Flow Orchestrator is designed for more […]

Read More
The Rise of Agentic Government: How AI Agents Are Transforming Public Services

Government technology has often been seen as slower to evolve than the private sector. But Salesforce’s latest research challenges that idea in a big way. In fact, the new findings suggest that public sector organizations may now be moving faster than many businesses when it comes to adopting AI agents and preparing for a more […]

Read More
How To Use Email Service in APEX

Managing approvals, updates, and record changes directly from email can significantly improve efficiency within Salesforce workflows. Instead of logging in, navigating records, and manually updating fields, users can simply respond to emails and trigger automated updates using Email Service in APEX. This approach is especially useful for businesses leveraging Salesforce automation and looking to enhance […]

Read More
Design and Implementation of Salesforce-Jira Task Integration

Businesses have been using Salesforce for CRM operations and Jira for Agile project tracking. However, without integration, teams manually update both systems, leading to data inconsistency and inefficiency.This mechanism establishes a real-time integration between Salesforce and Jira, allowing seamless synchronization of tasks and agile board statuses.  A custom Salesforce dashboard was developed that replicates Jira-style […]

Read More
Our Location worldwide
Indian Flag India
7th Floor, A-10, Pegasus Tower, Sector 68, Noida, Uttar Pradesh 201301 +91-1203669505
United States of America Flag USA
333 West Brown Deer Road Unit G – 366 Milwaukee WI, USA 53217 +1(262) 310-7818
United Kingdom Flag UK
7 Bell Yard, London, WC2A 2JR +44 20 3239 9428
CA Flag Canada
HIC Global Solutions INC
6D - 7398 Yonge St #1124 Thornhill, ON L4J 8J2 Canada +1(262) 310-7818