{"id":6404,"date":"2024-01-11T16:40:00","date_gmt":"2024-01-11T16:40:00","guid":{"rendered":"https:\/\/codehim.com\/?p=6404"},"modified":"2024-01-22T14:43:47","modified_gmt":"2024-01-22T09:43:47","slug":"simple-toast-notification-in-javascript","status":"publish","type":"post","link":"https:\/\/codehim.com\/vanilla-javascript\/simple-toast-notification-in-javascript\/","title":{"rendered":"Simple Toast Notification in JavaScript"},"content":{"rendered":"<p>This JavaScript code snippet helps you to create a simple toast notification. It allows you to display various types of alerts including success, warning, and danger with predefined themes. The styles and notifications can be customized according to your needs. The toast can be triggered with any event and closed with the close button or after a specific time.<\/p>\n<h2>How to Create Simple Toast Notification in JavaScript<\/h2>\n<p>1. First of all, create the HTML structure as follows:<\/p>\n<pre class=\"prettyprint linenums lang-html\">&lt;button id=\"toast-button-succes\" style=\"background-color:#6c5ce7;width:150px;height:50px;border:none;border-radius:5px;margin-top:100px;margin-left:100px;color:white;font-size:20px;cursor:pointer;box-shadow: rgba(100, 100, 111, 0.2) 0px 7px 29px 0px;\"&gt;Toast Succes&lt;\/button&gt;\r\n\r\n&lt;button id=\"toast-button-warning\" style=\"background-color:#6c5ce7;width:150px;height:50px;border:none;border-radius:5px;margin-top:100px;margin-left:100px;color:white;font-size:20px;cursor:pointer;box-shadow: rgba(100, 100, 111, 0.2) 0px 7px 29px 0px;\"&gt;Toast Warning&lt;\/button&gt;\r\n\r\n&lt;button id=\"toast-button-danger\" style=\"background-color:#6c5ce7;width:150px;height:50px;border:none;border-radius:5px;margin-top:100px;margin-left:100px;color:white;font-size:20px;cursor:pointer;box-shadow: rgba(100, 100, 111, 0.2) 0px 7px 29px 0px;\"&gt;Toast Danger&lt;\/button&gt;\r\n<\/pre>\n<p>2. After that, add the following CSS styles to your project:<\/p>\n<pre class=\"prettyprint linenums lang-css\">*{\r\n  margin:0;\r\n  padding:0;\r\n}\r\n\r\n.toast-notification{\r\n  min-width: 200px;\r\n  height:50px;\r\n  background-color:white;\r\n  border-radius: 10px;\r\n  box-shadow: rgba(100, 100, 111, 0.2) 0px 7px 29px 0px;\r\n  bottom:0;\r\n  margin-bottom:20px;\r\n  margin-left:0;\r\n  position:fixed;\r\n  z-index:1;\r\n  display:flex;\r\n  flex-direction:row;\r\n}\r\n\r\n.message-container{\r\n  width:80%;\r\n  padding-top:13px;\r\n  padding-left: 20px;\r\n  font-family:'Roboto';\r\n  color:white;\r\n}\r\n\r\n.close-notification{\r\n  width:20%;\r\n}\r\n.close-notification &gt; i {\r\n  padding-top:15px;\r\n  padding-left:5px;\r\n  font-weight:900;\r\n  color:white;\r\n  cursor:pointer;\r\n}<\/pre>\n<p>3. Finally, add the following JavaScript code and done.<\/p>\n<pre class=\"prettyprint linenums lang-js\">class Toast {\r\n  constructor(message,color,time){\r\n    this.message = message;\r\n    this.color = color;\r\n    this.time = time;\r\n    this.element = null;\r\n    var element = document.createElement('div');\r\n    element.className = \"toast-notification\";\r\n    this.element = element;\r\n    var countElements = document.getElementsByClassName(\"toast-notification\");\r\n    \r\n    element.style.opacity=0.8;\r\n    \r\n    element.style.marginBottom = (countElements.length * 55) + \"px\";\r\n    \r\n    element.style.backgroundColor = this.color;\r\n    \r\n    var message = document.createElement(\"div\");\r\n    message.className = \"message-container\";\r\n    message.textContent = this.message;\r\n    \r\n    element.appendChild(message);\r\n    \r\n    var close = document.createElement(\"div\");\r\n    close.className = \"close-notification\";\r\n    \r\n    var icon = document.createElement(\"i\");\r\n    icon.className = \"lni lni-close\";\r\n    \r\n    \r\n    \r\n    \r\n    close.appendChild(icon);\r\n    \r\n    \r\n    element.append(close);\r\n    \r\n    document.body.appendChild(element);\r\n    \r\n    setTimeout(function() {\r\n      element.remove();\r\n    }, this.time);\r\n    \r\n    close.addEventListener(\"click\",()=&gt;{\r\n      element.remove();\r\n    })\r\n  }\r\n  \r\n}\r\n\r\nconst ToastType = {\r\n  Danger : \"#eb3b5a\",\r\n  Warning: \"#fdcb6e\",\r\n  Succes : \"#00b894\",\r\n}\r\n\r\n\r\n\r\nvar count = 0;\r\n\r\ndocument.querySelector(\"#toast-button-succes\").addEventListener(\"click\",()=&gt;{\r\n  \r\n  new Toast(\"Toast Message \" + count,ToastType.Succes,5000);\r\n  count++;\r\n})\r\n\r\ndocument.querySelector(\"#toast-button-warning\").addEventListener(\"click\",()=&gt;{\r\n  \r\n  new Toast(\"Toast Message \" + count,ToastType.Warning,5000);\r\n  count++;\r\n})\r\n\r\ndocument.querySelector(\"#toast-button-danger\").addEventListener(\"click\",()=&gt;{\r\n  \r\n  new Toast(\"Toast Message \" + count,ToastType.Danger,5000);\r\n  count++;\r\n})<\/pre>\n<p>That&#8217;s all! hopefully, you have successfully integrated this toast notification code snippet into your project. If you have any questions or facing any issues, feel free to comment below.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This JavaScript code snippet helps you to create a simple toast notification. It allows you to display various types of&#8230;<\/p>\n","protected":false},"author":1,"featured_media":6411,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[116],"tags":[],"class_list":["post-6404","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-vanilla-javascript"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Simple Toast Notification in JavaScript &#8212; CodeHim<\/title>\n<meta name=\"description\" content=\"Here is a lightweight JavaScript code snippet to create simple toast notification. You can view demo and download source code.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/codehim.com\/vanilla-javascript\/simple-toast-notification-in-javascript\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Simple Toast Notification in JavaScript &#8212; CodeHim\" \/>\n<meta property=\"og:description\" content=\"Here is a lightweight JavaScript code snippet to create simple toast notification. You can view demo and download source code.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/codehim.com\/vanilla-javascript\/simple-toast-notification-in-javascript\/\" \/>\n<meta property=\"og:site_name\" content=\"CodeHim\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/codehimofficial\" \/>\n<meta property=\"article:published_time\" content=\"2024-01-11T16:40:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-01-22T09:43:47+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/codehim.com\/wp-content\/uploads\/2022\/04\/www.codehim-12.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1280\" \/>\n\t<meta property=\"og:image:height\" content=\"960\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Asif Mughal\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@CodeHimOfficial\" \/>\n<meta name=\"twitter:site\" content=\"@CodeHimOfficial\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Asif Mughal\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/codehim.com\/vanilla-javascript\/simple-toast-notification-in-javascript\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/codehim.com\/vanilla-javascript\/simple-toast-notification-in-javascript\/\"},\"author\":{\"name\":\"Asif Mughal\",\"@id\":\"https:\/\/codehim.com\/#\/schema\/person\/cc48f1dbe072a89a62a98171b7db43ed\"},\"headline\":\"Simple Toast Notification in JavaScript\",\"datePublished\":\"2024-01-11T16:40:00+00:00\",\"dateModified\":\"2024-01-22T09:43:47+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/codehim.com\/vanilla-javascript\/simple-toast-notification-in-javascript\/\"},\"wordCount\":129,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/codehim.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/codehim.com\/vanilla-javascript\/simple-toast-notification-in-javascript\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/codehim.com\/wp-content\/uploads\/2022\/04\/www.codehim-12.png\",\"articleSection\":[\"Vanilla JavaScript\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/codehim.com\/vanilla-javascript\/simple-toast-notification-in-javascript\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/codehim.com\/vanilla-javascript\/simple-toast-notification-in-javascript\/\",\"url\":\"https:\/\/codehim.com\/vanilla-javascript\/simple-toast-notification-in-javascript\/\",\"name\":\"Simple Toast Notification in JavaScript &#8212; CodeHim\",\"isPartOf\":{\"@id\":\"https:\/\/codehim.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/codehim.com\/vanilla-javascript\/simple-toast-notification-in-javascript\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/codehim.com\/vanilla-javascript\/simple-toast-notification-in-javascript\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/codehim.com\/wp-content\/uploads\/2022\/04\/www.codehim-12.png\",\"datePublished\":\"2024-01-11T16:40:00+00:00\",\"dateModified\":\"2024-01-22T09:43:47+00:00\",\"description\":\"Here is a lightweight JavaScript code snippet to create simple toast notification. You can view demo and download source code.\",\"breadcrumb\":{\"@id\":\"https:\/\/codehim.com\/vanilla-javascript\/simple-toast-notification-in-javascript\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/codehim.com\/vanilla-javascript\/simple-toast-notification-in-javascript\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/codehim.com\/vanilla-javascript\/simple-toast-notification-in-javascript\/#primaryimage\",\"url\":\"https:\/\/codehim.com\/wp-content\/uploads\/2022\/04\/www.codehim-12.png\",\"contentUrl\":\"https:\/\/codehim.com\/wp-content\/uploads\/2022\/04\/www.codehim-12.png\",\"width\":1280,\"height\":960,\"caption\":\"Simple Toast Notification in JavaScript\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/codehim.com\/vanilla-javascript\/simple-toast-notification-in-javascript\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/codehim.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Vanilla JavaScript\",\"item\":\"https:\/\/codehim.com\/category\/vanilla-javascript\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Simple Toast Notification in JavaScript\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/codehim.com\/#website\",\"url\":\"https:\/\/codehim.com\/\",\"name\":\"CodeHim\",\"description\":\"Web Design Code Snippets\",\"publisher\":{\"@id\":\"https:\/\/codehim.com\/#organization\"},\"alternateName\":\"Web Design Codes\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/codehim.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/codehim.com\/#organization\",\"name\":\"CodeHim - Web Design Code & Scripts\",\"url\":\"https:\/\/codehim.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/codehim.com\/#\/schema\/logo\/image\/\",\"url\":\"http:\/\/codehim.com\/wp-content\/uploads\/2023\/06\/Codehim-short-logo.jpg\",\"contentUrl\":\"http:\/\/codehim.com\/wp-content\/uploads\/2023\/06\/Codehim-short-logo.jpg\",\"width\":280,\"height\":280,\"caption\":\"CodeHim - Web Design Code & Scripts\"},\"image\":{\"@id\":\"https:\/\/codehim.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/codehimofficial\",\"https:\/\/x.com\/CodeHimOfficial\",\"https:\/\/www.instagram.com\/codehim\/\",\"https:\/\/www.linkedin.com\/company\/codehim\",\"https:\/\/co.pinterest.com\/codehim\/\",\"https:\/\/www.youtube.com\/@codehim\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/codehim.com\/#\/schema\/person\/cc48f1dbe072a89a62a98171b7db43ed\",\"name\":\"Asif Mughal\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/codehim.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/b25bfcd7d4e341c2c6f785a88d8ad2a4?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/b25bfcd7d4e341c2c6f785a88d8ad2a4?s=96&d=mm&r=g\",\"caption\":\"Asif Mughal\"},\"description\":\"I code and create web elements for amazing people around the world. I like work with new people. New people new Experiences. I truly enjoy what I'm doing, which makes me more passionate about web development and coding. I am always ready to do challenging tasks whether it is about creating a custom CMS from scratch or customizing an existing system.\",\"sameAs\":[\"https:\/\/codehim.com\"],\"url\":\"https:\/\/codehim.com\/author\/asif-mughal\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Simple Toast Notification in JavaScript &#8212; CodeHim","description":"Here is a lightweight JavaScript code snippet to create simple toast notification. You can view demo and download source code.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/codehim.com\/vanilla-javascript\/simple-toast-notification-in-javascript\/","og_locale":"en_US","og_type":"article","og_title":"Simple Toast Notification in JavaScript &#8212; CodeHim","og_description":"Here is a lightweight JavaScript code snippet to create simple toast notification. You can view demo and download source code.","og_url":"https:\/\/codehim.com\/vanilla-javascript\/simple-toast-notification-in-javascript\/","og_site_name":"CodeHim","article_publisher":"https:\/\/www.facebook.com\/codehimofficial","article_published_time":"2024-01-11T16:40:00+00:00","article_modified_time":"2024-01-22T09:43:47+00:00","og_image":[{"width":1280,"height":960,"url":"https:\/\/codehim.com\/wp-content\/uploads\/2022\/04\/www.codehim-12.png","type":"image\/png"}],"author":"Asif Mughal","twitter_card":"summary_large_image","twitter_creator":"@CodeHimOfficial","twitter_site":"@CodeHimOfficial","twitter_misc":{"Written by":"Asif Mughal","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/codehim.com\/vanilla-javascript\/simple-toast-notification-in-javascript\/#article","isPartOf":{"@id":"https:\/\/codehim.com\/vanilla-javascript\/simple-toast-notification-in-javascript\/"},"author":{"name":"Asif Mughal","@id":"https:\/\/codehim.com\/#\/schema\/person\/cc48f1dbe072a89a62a98171b7db43ed"},"headline":"Simple Toast Notification in JavaScript","datePublished":"2024-01-11T16:40:00+00:00","dateModified":"2024-01-22T09:43:47+00:00","mainEntityOfPage":{"@id":"https:\/\/codehim.com\/vanilla-javascript\/simple-toast-notification-in-javascript\/"},"wordCount":129,"commentCount":0,"publisher":{"@id":"https:\/\/codehim.com\/#organization"},"image":{"@id":"https:\/\/codehim.com\/vanilla-javascript\/simple-toast-notification-in-javascript\/#primaryimage"},"thumbnailUrl":"https:\/\/codehim.com\/wp-content\/uploads\/2022\/04\/www.codehim-12.png","articleSection":["Vanilla JavaScript"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/codehim.com\/vanilla-javascript\/simple-toast-notification-in-javascript\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/codehim.com\/vanilla-javascript\/simple-toast-notification-in-javascript\/","url":"https:\/\/codehim.com\/vanilla-javascript\/simple-toast-notification-in-javascript\/","name":"Simple Toast Notification in JavaScript &#8212; CodeHim","isPartOf":{"@id":"https:\/\/codehim.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/codehim.com\/vanilla-javascript\/simple-toast-notification-in-javascript\/#primaryimage"},"image":{"@id":"https:\/\/codehim.com\/vanilla-javascript\/simple-toast-notification-in-javascript\/#primaryimage"},"thumbnailUrl":"https:\/\/codehim.com\/wp-content\/uploads\/2022\/04\/www.codehim-12.png","datePublished":"2024-01-11T16:40:00+00:00","dateModified":"2024-01-22T09:43:47+00:00","description":"Here is a lightweight JavaScript code snippet to create simple toast notification. You can view demo and download source code.","breadcrumb":{"@id":"https:\/\/codehim.com\/vanilla-javascript\/simple-toast-notification-in-javascript\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/codehim.com\/vanilla-javascript\/simple-toast-notification-in-javascript\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/codehim.com\/vanilla-javascript\/simple-toast-notification-in-javascript\/#primaryimage","url":"https:\/\/codehim.com\/wp-content\/uploads\/2022\/04\/www.codehim-12.png","contentUrl":"https:\/\/codehim.com\/wp-content\/uploads\/2022\/04\/www.codehim-12.png","width":1280,"height":960,"caption":"Simple Toast Notification in JavaScript"},{"@type":"BreadcrumbList","@id":"https:\/\/codehim.com\/vanilla-javascript\/simple-toast-notification-in-javascript\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/codehim.com\/"},{"@type":"ListItem","position":2,"name":"Vanilla JavaScript","item":"https:\/\/codehim.com\/category\/vanilla-javascript\/"},{"@type":"ListItem","position":3,"name":"Simple Toast Notification in JavaScript"}]},{"@type":"WebSite","@id":"https:\/\/codehim.com\/#website","url":"https:\/\/codehim.com\/","name":"CodeHim","description":"Web Design Code Snippets","publisher":{"@id":"https:\/\/codehim.com\/#organization"},"alternateName":"Web Design Codes","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/codehim.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/codehim.com\/#organization","name":"CodeHim - Web Design Code & Scripts","url":"https:\/\/codehim.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/codehim.com\/#\/schema\/logo\/image\/","url":"http:\/\/codehim.com\/wp-content\/uploads\/2023\/06\/Codehim-short-logo.jpg","contentUrl":"http:\/\/codehim.com\/wp-content\/uploads\/2023\/06\/Codehim-short-logo.jpg","width":280,"height":280,"caption":"CodeHim - Web Design Code & Scripts"},"image":{"@id":"https:\/\/codehim.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/codehimofficial","https:\/\/x.com\/CodeHimOfficial","https:\/\/www.instagram.com\/codehim\/","https:\/\/www.linkedin.com\/company\/codehim","https:\/\/co.pinterest.com\/codehim\/","https:\/\/www.youtube.com\/@codehim"]},{"@type":"Person","@id":"https:\/\/codehim.com\/#\/schema\/person\/cc48f1dbe072a89a62a98171b7db43ed","name":"Asif Mughal","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/codehim.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/b25bfcd7d4e341c2c6f785a88d8ad2a4?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/b25bfcd7d4e341c2c6f785a88d8ad2a4?s=96&d=mm&r=g","caption":"Asif Mughal"},"description":"I code and create web elements for amazing people around the world. I like work with new people. New people new Experiences. I truly enjoy what I'm doing, which makes me more passionate about web development and coding. I am always ready to do challenging tasks whether it is about creating a custom CMS from scratch or customizing an existing system.","sameAs":["https:\/\/codehim.com"],"url":"https:\/\/codehim.com\/author\/asif-mughal\/"}]}},"views":6338,"_links":{"self":[{"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/posts\/6404","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/comments?post=6404"}],"version-history":[{"count":0,"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/posts\/6404\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/media\/6411"}],"wp:attachment":[{"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/media?parent=6404"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/categories?post=6404"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/tags?post=6404"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}