{"id":10546,"date":"2024-03-03T10:30:00","date_gmt":"2024-03-03T10:30:00","guid":{"rendered":"https:\/\/codehim.com\/?p=10546"},"modified":"2024-03-04T08:30:47","modified_gmt":"2024-03-04T03:30:47","slug":"ios-style-toggle-button-using-css","status":"publish","type":"post","link":"https:\/\/codehim.com\/text-input\/ios-style-toggle-button-using-css\/","title":{"rendered":"iOS Style Toggle Buttons Using CSS"},"content":{"rendered":"<p>If you&#8217;re looking to enhance your web design with sleek iOS style toggle buttons, this step-by-step guide will walk you through the process using CSS. These buttons not only offer a modern aesthetic but also provide a user-friendly interface without the need for JavaScript.<\/p>\n<p>The code provided in this tutorial hides checkboxes and styles labels to mimic IOS toggle buttons. The labels change text and color based on the checkbox state, providing a sleek and user-friendly interface. Helpful for creating modern, visually appealing toggles without JavaScript.<\/p>\n<h2>How to Create Ios Style Toggle Button Using CSS<\/h2>\n<p>1. Before diving into the toggle button styling, make sure to include the <a href=\"https:\/\/meyerweb.com\/eric\/tools\/css\/reset\/\" target=\"_blank\" rel=\"noopener\">Meyer Reset CSS<\/a> to ensure a consistent starting point across different browsers.<\/p>\n<pre class=\"prettyprint linenums lang-html\">&lt;link rel=\"stylesheet\" href=\"https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/meyer-reset\/2.0\/reset.min.css\"&gt;<\/pre>\n<p>2. Create a table structure in your HTML, incorporating the necessary checkboxes and labels for each toggle button. Customize the labels and checkbox IDs as needed for your project.<\/p>\n<p>Edit the labels within the HTML to reflect the specific functionality of each toggle button. Adjust the <code>data-on<\/code> and <code>data-off<\/code> attributes according to your application&#8217;s requirements.<\/p>\n<pre class=\"prettyprint linenums lang-html\">&lt;table&gt;\r\n  &lt;thead&gt;\r\n    &lt;tr&gt;\r\n      &lt;th&gt;Description&lt;\/th&gt;\r\n      &lt;th&gt;Mail&lt;\/th&gt;\r\n      &lt;th&gt;SMS&lt;\/th&gt;\r\n    &lt;\/tr&gt;\r\n  &lt;\/thead&gt;\r\n  &lt;tbody&gt;\r\n    &lt;tr&gt;\r\n      &lt;td&gt;Notifications&lt;\/td&gt;\r\n      &lt;td&gt;\r\n        &lt;input type=\"checkbox\" id=\"closed\" class=\"toggle\" checked&gt;\r\n        &lt;label for=\"closed\" data-on=\"Open\" data-off=\"Close\"&gt;Open \/ Close&lt;\/label&gt;\r\n      &lt;\/td&gt;\r\n      &lt;td&gt;\r\n        &lt;input type=\"checkbox\" id=\"open\" class=\"toggle\"&gt;\r\n        &lt;label for=\"open\" data-on=\"Yes\" data-off=\"No\"&gt;Yes \/ No&lt;\/label&gt;\r\n      &lt;\/td&gt;\r\n    &lt;\/tr&gt;\r\n    &lt;tr&gt;\r\n      &lt;td&gt;Opportunities&lt;\/td&gt;\r\n      &lt;td&gt;\r\n        &lt;input type=\"checkbox\" id=\"disabled\" class=\"toggle\" checked disabled&gt;\r\n        &lt;label for=\"disabled\" data-on=\"On\" data-off=\"Off\"&gt;Disabled&lt;\/label&gt;\r\n      &lt;\/td&gt;\r\n      &lt;td&gt;\r\n        &lt;input type=\"checkbox\" id=\"empty\" class=\"toggle\" disabled&gt;\r\n        &lt;label for=\"empty\" data-on=\"On\" data-off=\"Off\"&gt;Empty&lt;\/label&gt;\r\n      &lt;\/td&gt;\r\n      &lt;\/td&gt;\r\n    &lt;\/tr&gt;\r\n    &lt;tr&gt;\r\n      &lt;td&gt;Messages&lt;\/td&gt;\r\n      &lt;td&gt;\r\n        &lt;input type=\"checkbox\" id=\"checked\" class=\"toggle\" checked&gt;\r\n        &lt;label for=\"checked\"&gt;Checked&lt;\/label&gt;\r\n      &lt;\/td&gt;\r\n      &lt;td&gt;\r\n        &lt;input type=\"checkbox\" id=\"notChecked\" class=\"toggle\"&gt;\r\n        &lt;label for=\"notChecked\"&gt;Not Checked&lt;\/label&gt;\r\n      &lt;\/td&gt;\r\n      &lt;\/td&gt;\r\n    &lt;\/tr&gt;\r\n  &lt;\/tbody&gt;\r\n&lt;\/table&gt;\r\n<\/pre>\n<p>3. Now, let&#8217;s add the CSS styles to achieve the IOS-style toggle button appearance. The provided CSS code includes both the styling for normal and disabled toggle buttons.<\/p>\n<pre class=\"prettyprint linenums lang-css\">\/*\r\n*\r\n* Pure CSS IOS Style Checkbox\r\n*\r\n*\/\r\n.toggle {\r\n  display: none;\r\n}\r\n.toggle+label {\r\n  display: inline-block;\r\n  width: 64px;\r\n  height: 27px;\r\n  background: #ededed;\r\n  color: transparent;\r\n  cursor: pointer;\r\n  -webkit-box-shadow: -1px 1px 1px 1px #d2d2d2 inset;\r\n  box-shadow: -1px 1px 1px 1px #d2d2d2 inset;\r\n  border-radius: 15px;\r\n  overflow: hidden;\r\n  -webkit-user-select: none;\r\n  -moz-user-select: none;\r\n  -ms-user-select: none;\r\n  user-select: none;\r\n  position: relative;\r\n}\r\n.toggle+label:before {\r\n  content: \"\";\r\n  display: inline-block;\r\n  height: 19px;\r\n  width: 19px;\r\n  background-color: #fdfdfd;\r\n  background-image: -webkit-linear-gradient(top, transparent 0%, rgba(0,0,0,0.2) 100%);\r\n  background-image: -moz-linear-gradient(top, transparent 0%, rgba(0,0,0,0.2) 100%);\r\n  background-image: -o-linear-gradient(top, transparent 0%, rgba(0,0,0,0.2) 100%);\r\n  background-image: -ms-linear-gradient(top, transparent 0%, rgba(0,0,0,0.2) 100%);\r\n  background-image: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.2) 100%);\r\n  border: 1px solid #bababa;\r\n  border-radius: 50%;\r\n  -webkit-box-shadow: -1px 1px 1px 1px #d2d2d2, 0px 0px 1px 1px rgba(255,255,255,0.2) inset;\r\n  box-shadow: -1px 1px 1px 1px #d2d2d2, 0px 0px 1px 1px rgba(255,255,255,0.2) inset;\r\n  z-index: 3;\r\n  position: absolute;\r\n  top: 3px;\r\n  left: 4px;\r\n  -webkit-transition: all 0.3s linear;\r\n  -moz-transition: all 0.3s linear;\r\n  -o-transition: all 0.3s linear;\r\n  -ms-transition: all 0.3s linear;\r\n  transition: all 0.3s linear;\r\n}\r\n.toggle+label:after {\r\n  content: attr(data-off);\r\n  font-size: 10px;\r\n  font-weight: 700;\r\n  color: #333;\r\n  z-index: 2;\r\n  -webkit-user-select: none;\r\n  -moz-user-select: none;\r\n  -ms-user-select: none;\r\n  user-select: none;\r\n  position: absolute;\r\n  top: 9px;\r\n  left: 28px;\r\n  -webkit-transition: all 0.3s linear;\r\n  -moz-transition: all 0.3s linear;\r\n  -o-transition: all 0.3s linear;\r\n  -ms-transition: all 0.3s linear;\r\n  transition: all 0.3s linear;\r\n}\r\n.toggle:checked+label:before {\r\n  background-color: #3fbd92;\r\n  background-image: -webkit-linear-gradient(top, transparent 0%, rgba(0,0,0,0.15) 100%);\r\n  background-image: -moz-linear-gradient(top, transparent 0%, rgba(0,0,0,0.15) 100%);\r\n  background-image: -o-linear-gradient(top, transparent 0%, rgba(0,0,0,0.15) 100%);\r\n  background-image: -ms-linear-gradient(top, transparent 0%, rgba(0,0,0,0.15) 100%);\r\n  background-image: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.15) 100%);\r\n  border: 1px solid #229671;\r\n  left: 39px;\r\n}\r\n.toggle:checked+label:after {\r\n  content: attr(data-on);\r\n  left: 9px;\r\n}\r\n.toggle:disabled+label:after,\r\n.toggle:checked:disabled+label:after {\r\n  color: #999;\r\n}\r\n.toggle:checked:disabled+label:before {\r\n  background: -webkit-linear-gradient(top, #9fd6c3 0%, #9bccbd 100%);\r\n  background: -moz-linear-gradient(top, #9fd6c3 0%, #9bccbd 100%);\r\n  background: -o-linear-gradient(top, #9fd6c3 0%, #9bccbd 100%);\r\n  background: -ms-linear-gradient(top, #9fd6c3 0%, #9bccbd 100%);\r\n  background: linear-gradient(to bottom, #9fd6c3 0%, #9bccbd 100%);\r\n  border: 1px solid #abdaca;\r\n}\r\n\/*\r\n*\r\n* For Codepen Presention\r\n*\r\n*\/\r\nbody {\r\n  font-family: \"Helvetica\", Arial, Sans;\r\n}\r\nbody table {\r\n  margin: 25px auto;\r\n}\r\nbody table th {\r\n  font-weight: 700;\r\n  padding: 10px;\r\n}\r\nbody table td {\r\n  width: 100px;\r\n  text-align: center;\r\n  padding: 10px;\r\n}\r\nbody table td:first-child {\r\n  width: 400px;\r\n  text-align: left;\r\n  color: #333;\r\n  font-size: 12px;\r\n}\r\nbody table tbody td {\r\n  border: 1px solid #dbdbdb;\r\n}<\/pre>\n<p>That&#8217;s all! hopefully, you have successfully created the iOS Style Toggle Button Using CSS. If you have any questions or suggestions, feel free to comment below.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you&#8217;re looking to enhance your web design with sleek iOS style toggle buttons, this step-by-step guide will walk you&#8230;<\/p>\n","protected":false},"author":1,"featured_media":10550,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[97],"tags":[],"class_list":["post-10546","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-text-input"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>iOS Style Toggle Buttons Using CSS &#8212; CodeHim<\/title>\n<meta name=\"description\" content=\"Here is a free code snippet to create a iOS Style Toggle Buttons Using CSS. You can view demo and download the 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\/text-input\/ios-style-toggle-button-using-css\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"iOS Style Toggle Buttons Using CSS &#8212; CodeHim\" \/>\n<meta property=\"og:description\" content=\"Here is a free code snippet to create a iOS Style Toggle Buttons Using CSS. You can view demo and download the source code.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/codehim.com\/text-input\/ios-style-toggle-button-using-css\/\" \/>\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-03-03T10:30:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-03-04T03:30:47+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/codehim.com\/wp-content\/uploads\/2024\/01\/IOS-Style-Toggle-Button-Using-CSS.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1280\" \/>\n\t<meta property=\"og:image:height\" content=\"980\" \/>\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\/text-input\/ios-style-toggle-button-using-css\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/codehim.com\/text-input\/ios-style-toggle-button-using-css\/\"},\"author\":{\"name\":\"Asif Mughal\",\"@id\":\"https:\/\/codehim.com\/#\/schema\/person\/cc48f1dbe072a89a62a98171b7db43ed\"},\"headline\":\"iOS Style Toggle Buttons Using CSS\",\"datePublished\":\"2024-03-03T10:30:00+00:00\",\"dateModified\":\"2024-03-04T03:30:47+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/codehim.com\/text-input\/ios-style-toggle-button-using-css\/\"},\"wordCount\":234,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/codehim.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/codehim.com\/text-input\/ios-style-toggle-button-using-css\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/codehim.com\/wp-content\/uploads\/2024\/01\/IOS-Style-Toggle-Button-Using-CSS.png\",\"articleSection\":[\"Text &amp; Input\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/codehim.com\/text-input\/ios-style-toggle-button-using-css\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/codehim.com\/text-input\/ios-style-toggle-button-using-css\/\",\"url\":\"https:\/\/codehim.com\/text-input\/ios-style-toggle-button-using-css\/\",\"name\":\"iOS Style Toggle Buttons Using CSS &#8212; CodeHim\",\"isPartOf\":{\"@id\":\"https:\/\/codehim.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/codehim.com\/text-input\/ios-style-toggle-button-using-css\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/codehim.com\/text-input\/ios-style-toggle-button-using-css\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/codehim.com\/wp-content\/uploads\/2024\/01\/IOS-Style-Toggle-Button-Using-CSS.png\",\"datePublished\":\"2024-03-03T10:30:00+00:00\",\"dateModified\":\"2024-03-04T03:30:47+00:00\",\"description\":\"Here is a free code snippet to create a iOS Style Toggle Buttons Using CSS. You can view demo and download the source code.\",\"breadcrumb\":{\"@id\":\"https:\/\/codehim.com\/text-input\/ios-style-toggle-button-using-css\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/codehim.com\/text-input\/ios-style-toggle-button-using-css\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/codehim.com\/text-input\/ios-style-toggle-button-using-css\/#primaryimage\",\"url\":\"https:\/\/codehim.com\/wp-content\/uploads\/2024\/01\/IOS-Style-Toggle-Button-Using-CSS.png\",\"contentUrl\":\"https:\/\/codehim.com\/wp-content\/uploads\/2024\/01\/IOS-Style-Toggle-Button-Using-CSS.png\",\"width\":1280,\"height\":980,\"caption\":\"IOS Style Toggle Button Using CSS\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/codehim.com\/text-input\/ios-style-toggle-button-using-css\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/codehim.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Text &amp; Input\",\"item\":\"https:\/\/codehim.com\/category\/text-input\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"iOS Style Toggle Buttons Using CSS\"}]},{\"@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":"iOS Style Toggle Buttons Using CSS &#8212; CodeHim","description":"Here is a free code snippet to create a iOS Style Toggle Buttons Using CSS. You can view demo and download the 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\/text-input\/ios-style-toggle-button-using-css\/","og_locale":"en_US","og_type":"article","og_title":"iOS Style Toggle Buttons Using CSS &#8212; CodeHim","og_description":"Here is a free code snippet to create a iOS Style Toggle Buttons Using CSS. You can view demo and download the source code.","og_url":"https:\/\/codehim.com\/text-input\/ios-style-toggle-button-using-css\/","og_site_name":"CodeHim","article_publisher":"https:\/\/www.facebook.com\/codehimofficial","article_published_time":"2024-03-03T10:30:00+00:00","article_modified_time":"2024-03-04T03:30:47+00:00","og_image":[{"width":1280,"height":980,"url":"https:\/\/codehim.com\/wp-content\/uploads\/2024\/01\/IOS-Style-Toggle-Button-Using-CSS.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\/text-input\/ios-style-toggle-button-using-css\/#article","isPartOf":{"@id":"https:\/\/codehim.com\/text-input\/ios-style-toggle-button-using-css\/"},"author":{"name":"Asif Mughal","@id":"https:\/\/codehim.com\/#\/schema\/person\/cc48f1dbe072a89a62a98171b7db43ed"},"headline":"iOS Style Toggle Buttons Using CSS","datePublished":"2024-03-03T10:30:00+00:00","dateModified":"2024-03-04T03:30:47+00:00","mainEntityOfPage":{"@id":"https:\/\/codehim.com\/text-input\/ios-style-toggle-button-using-css\/"},"wordCount":234,"commentCount":0,"publisher":{"@id":"https:\/\/codehim.com\/#organization"},"image":{"@id":"https:\/\/codehim.com\/text-input\/ios-style-toggle-button-using-css\/#primaryimage"},"thumbnailUrl":"https:\/\/codehim.com\/wp-content\/uploads\/2024\/01\/IOS-Style-Toggle-Button-Using-CSS.png","articleSection":["Text &amp; Input"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/codehim.com\/text-input\/ios-style-toggle-button-using-css\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/codehim.com\/text-input\/ios-style-toggle-button-using-css\/","url":"https:\/\/codehim.com\/text-input\/ios-style-toggle-button-using-css\/","name":"iOS Style Toggle Buttons Using CSS &#8212; CodeHim","isPartOf":{"@id":"https:\/\/codehim.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/codehim.com\/text-input\/ios-style-toggle-button-using-css\/#primaryimage"},"image":{"@id":"https:\/\/codehim.com\/text-input\/ios-style-toggle-button-using-css\/#primaryimage"},"thumbnailUrl":"https:\/\/codehim.com\/wp-content\/uploads\/2024\/01\/IOS-Style-Toggle-Button-Using-CSS.png","datePublished":"2024-03-03T10:30:00+00:00","dateModified":"2024-03-04T03:30:47+00:00","description":"Here is a free code snippet to create a iOS Style Toggle Buttons Using CSS. You can view demo and download the source code.","breadcrumb":{"@id":"https:\/\/codehim.com\/text-input\/ios-style-toggle-button-using-css\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/codehim.com\/text-input\/ios-style-toggle-button-using-css\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/codehim.com\/text-input\/ios-style-toggle-button-using-css\/#primaryimage","url":"https:\/\/codehim.com\/wp-content\/uploads\/2024\/01\/IOS-Style-Toggle-Button-Using-CSS.png","contentUrl":"https:\/\/codehim.com\/wp-content\/uploads\/2024\/01\/IOS-Style-Toggle-Button-Using-CSS.png","width":1280,"height":980,"caption":"IOS Style Toggle Button Using CSS"},{"@type":"BreadcrumbList","@id":"https:\/\/codehim.com\/text-input\/ios-style-toggle-button-using-css\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/codehim.com\/"},{"@type":"ListItem","position":2,"name":"Text &amp; Input","item":"https:\/\/codehim.com\/category\/text-input\/"},{"@type":"ListItem","position":3,"name":"iOS Style Toggle Buttons Using CSS"}]},{"@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":1157,"_links":{"self":[{"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/posts\/10546","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=10546"}],"version-history":[{"count":1,"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/posts\/10546\/revisions"}],"predecessor-version":[{"id":11286,"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/posts\/10546\/revisions\/11286"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/media\/10550"}],"wp:attachment":[{"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/media?parent=10546"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/categories?post=10546"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/tags?post=10546"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}