{"id":1405,"date":"2023-07-14T14:35:24","date_gmt":"2023-07-14T13:35:24","guid":{"rendered":"https:\/\/codeflarelimited.com\/blog\/?p=1405"},"modified":"2023-07-14T14:35:26","modified_gmt":"2023-07-14T13:35:26","slug":"how-to-implement-toggle-password-visibility-in-react-js","status":"publish","type":"post","link":"https:\/\/codeflarelimited.com\/blog\/how-to-implement-toggle-password-visibility-in-react-js\/","title":{"rendered":"How to Implement Toggle Password Visibility in React JS"},"content":{"rendered":"\n<p>Toggle password visibility in React can be done easily with the following steps.<\/p>\n\n\n\n<p>Toggle password visibility is a feature commonly found in password input fields on websites or applications. It allows users to switch between displaying the characters they type in a password field as plain text or as masked characters (usually dots or asterisks). The purpose of this feature is to provide users with the option to view their entered password temporarily, enabling them to verify its accuracy or to make any necessary corrections.<\/p>\n\n\n\n<p>By clicking or tapping on an icon or checkbox labeled &#8220;Toggle Password Visibility&#8221; or an eye symbol, the user can switch between the visible and masked modes. When the visibility is toggled on, the characters they type will be shown as plain text, allowing them to see exactly what they are entering. Conversely, when the visibility is toggled off, the characters are hidden behind masked characters, which are commonly used to protect sensitive information from prying eyes.<\/p>\n\n\n\n<p>This feature is particularly useful when entering passwords on devices or in environments where privacy is not a concern. It helps users ensure that they have entered their passwords correctly, reducing the likelihood of errors during the authentication process.<\/p>\n\n\n\n<p>In this article, we are going to see how we can implement the toggle password visibility in React.<\/p>\n\n\n\n<p>First, we will create a new React project with just a basic setup: an input field and a checkbox. We will also use Bootstrap for easy styling.<\/p>\n\n\n\n<p><a href=\"https:\/\/codeflarelimited.com\/blog\/validate-checkbox-in-react-js\/\" target=\"_blank\" rel=\"noreferrer noopener\">See how to validate a checkbox in React<\/a><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">npx create-react-app my-web-project<\/code><\/pre>\n\n\n\n<p>Next, we will add our JSX code as seen below.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"jsx\" class=\"language-jsx\">import React, { PureComponent } from 'react';\nimport '.\/App.css';\n\n class App extends PureComponent {\n   render(){\n     return(\n   &lt;div className=\"container\">\n  &lt;form>\n  &lt;div className=\"mb-3\">\n    &lt;label for=\"exampleInputPassword1\" className=\"form-label\">Password&lt;\/label>\n    &lt;input type=\"password\" className=\"form-control\" id=\"exampleInputPassword1\" \/>\n  &lt;\/div>\n  &lt;div className=\"mb-3 form-check\">\n    &lt;input type=\"checkbox\" className=\"form-check-input\" id=\"exampleCheck1\" \/>\n    &lt;label class=\"form-check-label\" for=\"exampleCheck1\">Check me out&lt;\/label>\n  &lt;\/div>\n  &lt;button type=\"submit\" className=\"btn btn-primary\">Submit&lt;\/button>\n&lt;\/form>\n&lt;\/div>\n     )\n   }\n }\n\nexport default App;\n<\/code><\/pre>\n\n\n\n<p>Next, we will create a state variable called &#8220;<strong>showPassword<\/strong>&#8221; and set its initial value false.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"jsx\" class=\"language-jsx\">constructor(props){\nsuper(props);\nthis.state = {\nshowPassword: false,\n}\n}<\/code><\/pre>\n\n\n\n<p>Next, we will create a function called <strong>&#8220;togglePassword<\/strong>&#8221; as follows:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"jsx\" class=\"language-jsx\">togglePassword = (e) => {\n  this.setState({ showPassword: e.target.checked});\n}<\/code><\/pre>\n\n\n\n<p>Don&#8217;t forget that we need to bind this function to our state. We will do that as follows:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"jsx\" class=\"language-jsx\">constructor(props){\nsuper(props);\nthis.state = {\nshowPassword: false,\n}\nthis.togglePassword = this.togglePassword.bind(this);\n}<\/code><\/pre>\n\n\n\n<p>Next, we will call this function in our JSX as follows:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"jsx\" class=\"language-jsx\">  &lt;div className=\"mb-3 form-check\">\n    &lt;input type=\"checkbox\" onChange={this.togglePassword} className=\"form-check-input\" id=\"exampleCheck1\" \/>\n    &lt;label class=\"form-check-label\" for=\"exampleCheck1\">{showPassword ? 'Hide password' : 'Show password'}&lt;\/label>\n  &lt;\/div><\/code><\/pre>\n\n\n\n<p>What we are really doing here is to check if the checkbox has been clicked. If it has been clicked that means it&#8217;s true, so we update our state variable to <strong>true <\/strong>and set the text to <strong>&#8216;Hide password&#8217;<\/strong> and vice versa.<\/p>\n\n\n\n<p>Finally, we need to use a ternary operator to update the <strong><em>type<\/em><\/strong> attribute for our password input. If the &#8220;<strong>showPassword<\/strong>&#8221; value is <strong>true<\/strong>, we set the type to <strong><em>text<\/em><\/strong> else we set it to <strong><em>password<\/em><\/strong>.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"jsx\" class=\"language-jsx\">&lt;input type={showPassword ? 'text' : 'password'} className=\"form-control\" id=\"exampleInputPassword1\" \/><\/code><\/pre>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-full-working-code\">Full Working Code<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"jsx\" class=\"language-jsx\">import React, { PureComponent } from 'react';\nimport '.\/App.css';\n\n class App extends PureComponent {\n\n    constructor(props){\n    super(props);\n    this.state = {\n    showPassword: false,\n    }\n    this.togglePassword = this.togglePassword.bind(this);\n    }\n\n    togglePassword = (e) => {\n      this.setState({ showPassword: e.target.checked});\n    }\n\n   render(){\n     const { showPassword } = this.state\n     return(\n       &lt;div className=\"container\">\n  &lt;form>\n  &lt;div className=\"mb-3\">\n    &lt;label for=\"exampleInputPassword1\" className=\"form-label\">Password&lt;\/label>\n    &lt;input type={showPassword ? 'text' : 'password'} className=\"form-control\" id=\"exampleInputPassword1\" \/>\n  &lt;\/div>\n  &lt;div className=\"mb-3 form-check\">\n    &lt;input type=\"checkbox\" onChange={this.togglePassword} className=\"form-check-input\" id=\"exampleCheck1\" \/>\n    &lt;label class=\"form-check-label\" for=\"exampleCheck1\">{showPassword ? 'Hide password' : 'Show password'}&lt;\/label>\n  &lt;\/div>\n  &lt;button type=\"submit\" className=\"btn btn-primary\">Submit&lt;\/button>\n&lt;\/form>\n       &lt;\/div>\n     )\n   }\n }\n\nexport default App;\n<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-vimeo wp-block-embed-vimeo\"><div class=\"wp-block-embed__wrapper\">\n <iframe loading=\"lazy\" title=\"Toggle Password Visibility in React JS\" src=\"https:\/\/player.vimeo.com\/video\/845286726?dnt=1&amp;app_id=122963\" width=\"640\" height=\"399\" frameborder=\"0\" allow=\"autoplay; fullscreen; picture-in-picture; clipboard-write\"><\/iframe>\n<\/div><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Toggle password visibility in React can be done easily with the following steps. Toggle password visibility is a<\/p>\n","protected":false},"author":1,"featured_media":1406,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[98],"tags":[],"class_list":["post-1405","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-softare-development"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Implement Toggle Password Visibility in React JS<\/title>\n<meta name=\"description\" content=\"Toggle password visibility in React is a feature commonly found in password input fields on websites or applications.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/codeflarelimited.com\/blog\/how-to-implement-toggle-password-visibility-in-react-js\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Implement Toggle Password Visibility in React JS\" \/>\n<meta property=\"og:description\" content=\"Toggle password visibility in React is a feature commonly found in password input fields on websites or applications.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/codeflarelimited.com\/blog\/how-to-implement-toggle-password-visibility-in-react-js\/\" \/>\n<meta property=\"article:author\" content=\"https:\/\/facebook.com\/codeflretech\" \/>\n<meta property=\"article:published_time\" content=\"2023-07-14T13:35:24+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-07-14T13:35:26+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/codeflarelimited.com\/blog\/wp-content\/uploads\/2023\/07\/Untitled-Design.jpeg\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"628\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"codeflare\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@codeflaretech\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"TechArticle\",\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/how-to-implement-toggle-password-visibility-in-react-js\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/how-to-implement-toggle-password-visibility-in-react-js\\\/\"},\"author\":{\"name\":\"codeflare\",\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/#\\\/schema\\\/person\\\/7e65653d49add95629f8c1053c5cd76a\"},\"headline\":\"How to Implement Toggle Password Visibility in React JS\",\"datePublished\":\"2023-07-14T13:35:24+00:00\",\"dateModified\":\"2023-07-14T13:35:26+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/how-to-implement-toggle-password-visibility-in-react-js\\\/\"},\"wordCount\":412,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/how-to-implement-toggle-password-visibility-in-react-js\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/07\\\/Untitled-Design.jpeg\",\"articleSection\":[\"softare development\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/how-to-implement-toggle-password-visibility-in-react-js\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/how-to-implement-toggle-password-visibility-in-react-js\\\/\",\"url\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/how-to-implement-toggle-password-visibility-in-react-js\\\/\",\"name\":\"How to Implement Toggle Password Visibility in React JS\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/how-to-implement-toggle-password-visibility-in-react-js\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/how-to-implement-toggle-password-visibility-in-react-js\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/07\\\/Untitled-Design.jpeg\",\"datePublished\":\"2023-07-14T13:35:24+00:00\",\"dateModified\":\"2023-07-14T13:35:26+00:00\",\"description\":\"Toggle password visibility in React is a feature commonly found in password input fields on websites or applications.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/how-to-implement-toggle-password-visibility-in-react-js\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/how-to-implement-toggle-password-visibility-in-react-js\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/how-to-implement-toggle-password-visibility-in-react-js\\\/#primaryimage\",\"url\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/07\\\/Untitled-Design.jpeg\",\"contentUrl\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/07\\\/Untitled-Design.jpeg\",\"width\":1200,\"height\":628,\"caption\":\"toggle password visibility in React\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/how-to-implement-toggle-password-visibility-in-react-js\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"softare development\",\"item\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/softare-development\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"How to Implement Toggle Password Visibility in React JS\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/\",\"name\":\"\",\"description\":\"Sustainable solutions\",\"publisher\":{\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/#organization\",\"name\":\"Codeflare Limited\",\"url\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/11\\\/codeflare.png\",\"contentUrl\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/11\\\/codeflare.png\",\"width\":1040,\"height\":263,\"caption\":\"Codeflare Limited\"},\"image\":{\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/#\\\/schema\\\/person\\\/7e65653d49add95629f8c1053c5cd76a\",\"name\":\"codeflare\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/59cef917c86d965eea581d2747f51bd6382003a68bfce7c8a4dfec98b4cd838d?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/59cef917c86d965eea581d2747f51bd6382003a68bfce7c8a4dfec98b4cd838d?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/59cef917c86d965eea581d2747f51bd6382003a68bfce7c8a4dfec98b4cd838d?s=96&d=mm&r=g\",\"caption\":\"codeflare\"},\"description\":\"Latest tech news and coding tips.\",\"sameAs\":[\"https:\\\/\\\/codeflarelimited.com\\\/blog\",\"https:\\\/\\\/facebook.com\\\/codeflretech\",\"https:\\\/\\\/instagram.com\\\/codeflaretech\",\"https:\\\/\\\/x.com\\\/codeflaretech\",\"https:\\\/\\\/www.youtube.com\\\/channel\\\/UCuBLtiYqsajHdqw0uyt7Ofw?sub_confirmation=1\"],\"url\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/author\\\/watcher\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Implement Toggle Password Visibility in React JS","description":"Toggle password visibility in React is a feature commonly found in password input fields on websites or applications.","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:\/\/codeflarelimited.com\/blog\/how-to-implement-toggle-password-visibility-in-react-js\/","og_locale":"en_US","og_type":"article","og_title":"How to Implement Toggle Password Visibility in React JS","og_description":"Toggle password visibility in React is a feature commonly found in password input fields on websites or applications.","og_url":"https:\/\/codeflarelimited.com\/blog\/how-to-implement-toggle-password-visibility-in-react-js\/","article_author":"https:\/\/facebook.com\/codeflretech","article_published_time":"2023-07-14T13:35:24+00:00","article_modified_time":"2023-07-14T13:35:26+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/codeflarelimited.com\/blog\/wp-content\/uploads\/2023\/07\/Untitled-Design.jpeg","type":"image\/jpeg"}],"author":"codeflare","twitter_card":"summary_large_image","twitter_creator":"@codeflaretech","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"TechArticle","@id":"https:\/\/codeflarelimited.com\/blog\/how-to-implement-toggle-password-visibility-in-react-js\/#article","isPartOf":{"@id":"https:\/\/codeflarelimited.com\/blog\/how-to-implement-toggle-password-visibility-in-react-js\/"},"author":{"name":"codeflare","@id":"https:\/\/codeflarelimited.com\/blog\/#\/schema\/person\/7e65653d49add95629f8c1053c5cd76a"},"headline":"How to Implement Toggle Password Visibility in React JS","datePublished":"2023-07-14T13:35:24+00:00","dateModified":"2023-07-14T13:35:26+00:00","mainEntityOfPage":{"@id":"https:\/\/codeflarelimited.com\/blog\/how-to-implement-toggle-password-visibility-in-react-js\/"},"wordCount":412,"commentCount":0,"publisher":{"@id":"https:\/\/codeflarelimited.com\/blog\/#organization"},"image":{"@id":"https:\/\/codeflarelimited.com\/blog\/how-to-implement-toggle-password-visibility-in-react-js\/#primaryimage"},"thumbnailUrl":"https:\/\/codeflarelimited.com\/blog\/wp-content\/uploads\/2023\/07\/Untitled-Design.jpeg","articleSection":["softare development"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/codeflarelimited.com\/blog\/how-to-implement-toggle-password-visibility-in-react-js\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/codeflarelimited.com\/blog\/how-to-implement-toggle-password-visibility-in-react-js\/","url":"https:\/\/codeflarelimited.com\/blog\/how-to-implement-toggle-password-visibility-in-react-js\/","name":"How to Implement Toggle Password Visibility in React JS","isPartOf":{"@id":"https:\/\/codeflarelimited.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/codeflarelimited.com\/blog\/how-to-implement-toggle-password-visibility-in-react-js\/#primaryimage"},"image":{"@id":"https:\/\/codeflarelimited.com\/blog\/how-to-implement-toggle-password-visibility-in-react-js\/#primaryimage"},"thumbnailUrl":"https:\/\/codeflarelimited.com\/blog\/wp-content\/uploads\/2023\/07\/Untitled-Design.jpeg","datePublished":"2023-07-14T13:35:24+00:00","dateModified":"2023-07-14T13:35:26+00:00","description":"Toggle password visibility in React is a feature commonly found in password input fields on websites or applications.","breadcrumb":{"@id":"https:\/\/codeflarelimited.com\/blog\/how-to-implement-toggle-password-visibility-in-react-js\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/codeflarelimited.com\/blog\/how-to-implement-toggle-password-visibility-in-react-js\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/codeflarelimited.com\/blog\/how-to-implement-toggle-password-visibility-in-react-js\/#primaryimage","url":"https:\/\/codeflarelimited.com\/blog\/wp-content\/uploads\/2023\/07\/Untitled-Design.jpeg","contentUrl":"https:\/\/codeflarelimited.com\/blog\/wp-content\/uploads\/2023\/07\/Untitled-Design.jpeg","width":1200,"height":628,"caption":"toggle password visibility in React"},{"@type":"BreadcrumbList","@id":"https:\/\/codeflarelimited.com\/blog\/how-to-implement-toggle-password-visibility-in-react-js\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/codeflarelimited.com\/blog\/"},{"@type":"ListItem","position":2,"name":"softare development","item":"https:\/\/codeflarelimited.com\/blog\/softare-development\/"},{"@type":"ListItem","position":3,"name":"How to Implement Toggle Password Visibility in React JS"}]},{"@type":"WebSite","@id":"https:\/\/codeflarelimited.com\/blog\/#website","url":"https:\/\/codeflarelimited.com\/blog\/","name":"","description":"Sustainable solutions","publisher":{"@id":"https:\/\/codeflarelimited.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/codeflarelimited.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/codeflarelimited.com\/blog\/#organization","name":"Codeflare Limited","url":"https:\/\/codeflarelimited.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/codeflarelimited.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/codeflarelimited.com\/blog\/wp-content\/uploads\/2020\/11\/codeflare.png","contentUrl":"https:\/\/codeflarelimited.com\/blog\/wp-content\/uploads\/2020\/11\/codeflare.png","width":1040,"height":263,"caption":"Codeflare Limited"},"image":{"@id":"https:\/\/codeflarelimited.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/codeflarelimited.com\/blog\/#\/schema\/person\/7e65653d49add95629f8c1053c5cd76a","name":"codeflare","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/59cef917c86d965eea581d2747f51bd6382003a68bfce7c8a4dfec98b4cd838d?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/59cef917c86d965eea581d2747f51bd6382003a68bfce7c8a4dfec98b4cd838d?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/59cef917c86d965eea581d2747f51bd6382003a68bfce7c8a4dfec98b4cd838d?s=96&d=mm&r=g","caption":"codeflare"},"description":"Latest tech news and coding tips.","sameAs":["https:\/\/codeflarelimited.com\/blog","https:\/\/facebook.com\/codeflretech","https:\/\/instagram.com\/codeflaretech","https:\/\/x.com\/codeflaretech","https:\/\/www.youtube.com\/channel\/UCuBLtiYqsajHdqw0uyt7Ofw?sub_confirmation=1"],"url":"https:\/\/codeflarelimited.com\/blog\/author\/watcher\/"}]}},"jetpack_featured_media_url":"https:\/\/codeflarelimited.com\/blog\/wp-content\/uploads\/2023\/07\/Untitled-Design.jpeg","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/codeflarelimited.com\/blog\/wp-json\/wp\/v2\/posts\/1405","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/codeflarelimited.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/codeflarelimited.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/codeflarelimited.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/codeflarelimited.com\/blog\/wp-json\/wp\/v2\/comments?post=1405"}],"version-history":[{"count":1,"href":"https:\/\/codeflarelimited.com\/blog\/wp-json\/wp\/v2\/posts\/1405\/revisions"}],"predecessor-version":[{"id":1407,"href":"https:\/\/codeflarelimited.com\/blog\/wp-json\/wp\/v2\/posts\/1405\/revisions\/1407"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/codeflarelimited.com\/blog\/wp-json\/wp\/v2\/media\/1406"}],"wp:attachment":[{"href":"https:\/\/codeflarelimited.com\/blog\/wp-json\/wp\/v2\/media?parent=1405"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/codeflarelimited.com\/blog\/wp-json\/wp\/v2\/categories?post=1405"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/codeflarelimited.com\/blog\/wp-json\/wp\/v2\/tags?post=1405"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}