"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[5323],{3905:function(e,t,a){a.d(t,{Zo:function(){return h},kt:function(){return d}});var r=a(7294);function s(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function n(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function l(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?n(Object(a),!0).forEach((function(t){s(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):n(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}function c(e,t){if(null==e)return{};var a,r,s=function(e,t){if(null==e)return{};var a,r,s={},n=Object.keys(e);for(r=0;r<n.length;r++)a=n[r],t.indexOf(a)>=0||(s[a]=e[a]);return s}(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(r=0;r<n.length;r++)a=n[r],t.indexOf(a)>=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(s[a]=e[a])}return s}var i=r.createContext({}),o=function(e){var t=r.useContext(i),a=t;return e&&(a="function"==typeof e?e(t):l(l({},t),e)),a},h=function(e){var t=o(e.components);return r.createElement(i.Provider,{value:t},e.children)},u={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},p=r.forwardRef((function(e,t){var a=e.components,s=e.mdxType,n=e.originalType,i=e.parentName,h=c(e,["components","mdxType","originalType","parentName"]),p=o(a),d=s,b=p["".concat(i,".").concat(d)]||p[d]||u[d]||n;return a?r.createElement(b,l(l({ref:t},h),{},{components:a})):r.createElement(b,l({ref:t},h))}));function d(e,t){var a=arguments,s=t&&t.mdxType;if("string"==typeof e||s){var n=a.length,l=new Array(n);l[0]=p;var c={};for(var i in t)hasOwnProperty.call(t,i)&&(c[i]=t[i]);c.originalType=e,c.mdxType="string"==typeof e?e:s,l[1]=c;for(var o=2;o<n;o++)l[o]=a[o];return r.createElement.apply(null,l)}return r.createElement.apply(null,a)}p.displayName="MDXCreateElement"},2695:function(e,t,a){a.d(t,{Z:function(){return c}});var r=a(7462),s=a(3366),n=a(7294),l=["isBad","isGood","children","disableFullscreen","limitWidth"];function c(e){var t=e.isBad,a=e.isGood,c=e.children,i=e.disableFullscreen,o=e.limitWidth,h=(0,s.Z)(e,l),u=(0,n.useState)(!1),p=u[0],d=u[1];return n.createElement("div",{className:"preview-box-wrapper",style:o?{width:o,display:"table",margin:"0 auto"}:{}},!i&&n.createElement("button",{"aria-label":p?"Minimize the example":"Fullscreen the example",className:"preview-box-fullscreen-toggle",onClick:function(e){var t=e.target.closest(".preview-box-wrapper");p?document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.msExitFullscreen&&document.msExitFullscreen():t.requestFullscreen?t.requestFullscreen():t.webkitRequestFullscreen?t.webkitRequestFullscreen():t.msRequestFullscreen&&t.msRequestFullscreen(),d(!p)}},p?n.createElement("svg",{"aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",x:"0",y:"0",viewBox:"0 0 24 24"},n.createElement("path",{d:"M19.707 18.293a1 1 0 01-1.414 1.414L16 17.414V18a1 1 0 01-2 0v-3a1 1 0 011-1h3a1 1 0 010 2h-.586zM9 14H6a1 1 0 000 2h.586l-2.293 2.293a1 1 0 001.414 1.414L8 17.414V18a1 1 0 002 0v-3a1 1 0 00-1-1zm0-9a1 1 0 00-1 1v.586L5.707 4.293a1 1 0 00-1.414 1.414L6.586 8H6a1 1 0 000 2h3a1 1 0 001-1V6a1 1 0 00-1-1zm6 5h3a1 1 0 000-2h-.586l2.293-2.293a1 1 0 00-1.414-1.414L16 6.586V6a1 1 0 00-2 0v3a1 1 0 001 1z"})):n.createElement("svg",{"aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",x:"0",y:"0",viewBox:"26 26 48 48"},n.createElement("path",{d:"M54.347 57.882A8.96 8.96 0 0150 59a8.96 8.96 0 01-4.347-1.118L40.736 62.8c-.38.38-.257.701.29.701h.98A2.503 2.503 0 0144.5 66c0 1.39-1.122 2.5-2.507 2.5h-7.986a2.505 2.505 0 01-2.507-2.507v-7.986A2.502 2.502 0 0134 55.5a2.49 2.49 0 012.5 2.493v.98c0 .547.314.678.7.29l4.918-4.916A8.96 8.96 0 0141 50a8.96 8.96 0 011.118-4.347L37.2 40.736c-.38-.38-.701-.257-.701.29v.98A2.503 2.503 0 0134 44.5c-1.39 0-2.5-1.122-2.5-2.507v-7.986a2.505 2.505 0 012.507-2.507h7.986A2.502 2.502 0 0144.5 34a2.49 2.49 0 01-2.493 2.5h-.98c-.547 0-.678.314-.29.7l4.916 4.918A8.96 8.96 0 0150 41a8.96 8.96 0 014.347 1.118l4.917-4.917c.38-.38.257-.701-.29-.701h-.98A2.503 2.503 0 0155.5 34c0-1.39 1.122-2.5 2.507-2.5h7.986a2.505 2.505 0 012.507 2.507v7.986A2.502 2.502 0 0166 44.5a2.49 2.49 0 01-2.5-2.493v-.98c0-.547-.314-.678-.7-.29l-4.918 4.916A8.96 8.96 0 0159 50a8.96 8.96 0 01-1.118 4.347l4.917 4.917c.38.38.701.257.701-.29v-.98A2.503 2.503 0 0166 55.5c1.39 0 2.5 1.122 2.5 2.507v7.986a2.505 2.505 0 01-2.507 2.507h-7.986A2.502 2.502 0 0155.5 66a2.49 2.49 0 012.493-2.5h.98c.547 0 .678-.314.29-.7l-4.916-4.918zM50 54a4 4 0 100-8 4 4 0 000 8z"}))),t&&n.createElement("div",{className:"is-bad-example style-red"},n.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",x:"0",y:"0",viewBox:"2 2 12 12"},n.createElement("path",{d:"M3.3 12.7c.2.2.4.3.7.3s.5-.1.7-.3L8 9.4l3.3 3.3c.2.2.5.3.7.3s.5-.1.7-.3c.4-.4.4-1 0-1.4L9.4 8l3.3-3.3c.4-.4.4-1 0-1.4s-1-.4-1.4 0L8 6.6 4.7 3.3c-.4-.4-1-.4-1.4 0s-.4 1 0 1.4L6.6 8l-3.3 3.3c-.4.4-.4 1 0 1.4z"}))),a&&n.createElement("div",{className:"is-good-example style-green"},n.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",x:"0",y:"0",viewBox:"0 0 18 18"},n.createElement("path",{d:"M5.056 15.04a1.5 1.5 0 002.217-.119l10.17-12.476A1.5 1.5 0 0015.118.55L6.007 11.758l-3.453-3.41a1.5 1.5 0 10-2.109 2.133l4.611 4.56"}))),n.createElement("iframe",(0,r.Z)({width:"100%",className:"docus-preview-box"+(p?" is-fullscreen":""),srcDoc:c},h)))}},3513:function(e,t,a){a.r(t),a.d(t,{frontMatter:function(){return i},contentTitle:function(){return o},metadata:function(){return h},toc:function(){return u},default:function(){return d}});var r=a(7462),s=a(3366),n=(a(7294),a(3905)),l=a(2695),c=["components"],i={title:"Search bar"},o=void 0,h={unversionedId:"components/search-bar",id:"components/search-bar",isDocsHomePage:!1,title:"Search bar",description:"Search bars are mixtures of input with search type and a search button, they are so practical you can change their size of colors based on your needs.",source:"@site/docs/components/search-bar.mdx",sourceDirName:"components",slug:"/components/search-bar",permalink:"/docs/components/search-bar",editUrl:"https://github.com/amir2mi/flatifycss/tree/master/website/docs/components/search-bar.mdx",tags:[],version:"current",frontMatter:{title:"Search bar"},sidebar:"tutorialSidebar",previous:{title:"Progress",permalink:"/docs/components/progress"},next:{title:"Tabs",permalink:"/docs/components/tabs"}},u=[{value:"Sizes",id:"sizes",children:[],level:3},{value:"Colors",id:"colors",children:[],level:3}],p={toc:u};function d(e){var t=e.components,a=(0,s.Z)(e,c);return(0,n.kt)("wrapper",(0,r.Z)({},p,a,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("p",null,"Search bars are mixtures of input with search type and a ",(0,n.kt)("a",{parentName:"p",href:"/docs/components/buttons/search-button"},"search button"),", they are so practical you can change their size of colors based on your needs."),(0,n.kt)(l.Z,{height:"110px",children:'\n<!DOCTYPE html>\n<html lang="en"> <head> <meta charset="UTF-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/flatifycss/dist/css/flatify.min.css" /> <title>Search bar</title> </head> <body> <div class="search-bar"> <input type="search" placeholder="Search something..." /> <button class="search-button" aria-label="Search"></button> </div> </body>\n</html>\n',mdxType:"PreviewBox"}),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-html",metastring:'{1} title="index.html"',"{1}":!0,title:'"index.html"'},'<div class="search-bar">\n  <input type="search" placeholder="Search something..." />\n  <button class="search-button" aria-label="Search"></button>\n</div>\n')),(0,n.kt)("h3",{id:"sizes"},"Sizes"),(0,n.kt)("p",null,"To change the input bar size use ",(0,n.kt)("a",{parentName:"p",href:"/docs/helpers/size-setters"},"size setter classes"),".\nThese classes just set a ",(0,n.kt)("inlineCode",{parentName:"p"},"font-size")," property so it is possible to change it yourself by writing custom CSS."),(0,n.kt)(l.Z,{height:"250px",children:'\n<!DOCTYPE html>\n<html lang="en"> <head> <meta charset="UTF-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/flatifycss/dist/css/flatify.min.css" /> <title>Search bar</title> <style> .search-bar{ max-width: 20em } </style> </head> <body> <div class="search-bar size-sm"> <input type="search" placeholder="Search something..." /> <button class="search-button" aria-label="Search"></button> </div> <div class="search-bar size-lg"> <input type="search" placeholder="Search something..." /> <button class="search-button" aria-label="Search"></button> </div> <div class="search-bar size-2x"> <input type="search" placeholder="Search something..." /> <button class="search-button" aria-label="Search"></button> </div> </body>\n</html>\n',mdxType:"PreviewBox"}),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-html",metastring:'title="index.html"',title:'"index.html"'},'<div class="search-bar size-sm">\n  <input type="search" placeholder="Search something..." />\n  <button class="search-button" aria-label="Search"></button>\n</div>\n\n<div class="search-bar size-lg">\n  <input type="search" placeholder="Search something..." />\n  <button class="search-button" aria-label="Search"></button>\n</div>\n\n<div class="search-bar size-2x">\n  <input type="search" placeholder="Search something..." />\n  <button class="search-button" aria-label="Search"></button>\n</div>\n')),(0,n.kt)("h3",{id:"colors"},"Colors"),(0,n.kt)("p",null,"There are helper classes for styling search bar, first read about ",(0,n.kt)("a",{parentName:"p",href:"/docs/helpers/color-setters"},"color setter classes"),". For search bars, you should add these classes to the button and input separately."),(0,n.kt)(l.Z,{height:"250px",children:'\n<!DOCTYPE html>\n<html lang="en"> <head> <meta charset="UTF-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/flatifycss/dist/css/flatify.min.css" /> <title>Search bar</title> <style> .search-bar{ width: 45%; margin: 5px; } </style> </head> <body class="flex-center" style="flex-wrap: wrap"> <div class="search-bar"> <input class="style-dark" type="search" placeholder="Search something..." /> <button class="search-button style-dark" aria-label="Search"></button> </div> <div class="search-bar"> <input class="style-light" type="search" placeholder="Search something..." /> <button class="search-button style-light" aria-label="Search"></button> </div> <div class="search-bar"> <input class="style-green-light" type="search" placeholder="Search something..." /> <button class="search-button style-green" aria-label="Search"></button> </div> <div class="search-bar"> <input class="style-blue" type="search" placeholder="Search something..." /> <button class="search-button style-blue" aria-label="Search"></button> </div> <div class="search-bar"> <input class="style-red" type="search" placeholder="Search something..." /> <button class="search-button style-red-light" aria-label="Search"></button> </div> <div class="search-bar"> <input class="style-orange" type="search" placeholder="Search something..." /> <button class="search-button style-orange-light" aria-label="Search"></button> </div> </body>\n</html>\n',mdxType:"PreviewBox"}),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-html",metastring:'title="index.html"',title:'"index.html"'},'<div class="search-bar">\n  <input class="style-dark" type="search" placeholder="Search something..." />\n  <button class="search-button style-dark" aria-label="Search"></button>\n</div>\n\n<div class="search-bar">\n  <input class="style-light" type="search" placeholder="Search something..." />\n  <button class="search-button style-light" aria-label="Search"></button>\n</div>\n\n<div class="search-bar">\n  <input class="style-green-light" type="search" placeholder="Search something..." />\n  <button class="search-button style-green" aria-label="Search"></button>\n</div>\n\n<div class="search-bar">\n  <input class="style-blue" type="search" placeholder="Search something..." />\n  <button class="search-button style-blue" aria-label="Search"></button>\n</div>\n\n<div class="search-bar">\n  <input class="style-red" type="search" placeholder="Search something..." />\n  <button class="search-button style-red-light" aria-label="Search"></button>\n</div>\n\n<div class="search-bar">\n  <input class="style-orange" type="search" placeholder="Search something..." />\n  <button class="search-button style-orange-light" aria-label="Search"></button>\n</div>\n')))}d.isMDXComponent=!0}}]);