text: "use strict";(self.webpackChunk=self.webpackChunk||[]).push([[608],{62992:(e,s,n)=>{n.d(s,{$:()=>t});const t=["512 512","<path fill='var(--ci-primary-color, currentColor)' d='M450.27,348.569,406.6,267.945V184c0-83.813-68.187-152-152-152s-152,68.187-152,152v83.945L58.928,348.568A24,24,0,0,0,80.031,384h86.935c-.238,2.636-.367,5.3-.367,8a88,88,0,0,0,176,0c0-2.7-.129-5.364-.367-8h86.935a24,24,0,0,0,21.1-35.431ZM310.6,392a56,56,0,1,1-111.419-8H310.018A56.14,56.14,0,0,1,310.6,392ZM93.462,352,134.6,276.055V184a120,120,0,0,1,240,0v92.055L415.736,352Z' class='ci-primary'/>"]},19608:(e,s,n)=>{n.r(s),n.d(s,{default:()=>a});n(67294);var t=n(34475),r=n(2308),i=n(62992),l=n(71618),o=n(25868),c=n(85893);const a=function(){return(0,c.jsxs)(t.rb,{children:[(0,c.jsx)(t.b7,{xs:12,children:(0,c.jsx)(l.Z,{name:"Button",href:"components/buttons"})}),(0,c.jsx)(t.b7,{xs:12,children:(0,c.jsxs)(t.xH,{className:"mb-4",children:[(0,c.jsx)(t.bn,{children:(0,c.jsx)("strong",{children:"React Button"})}),(0,c.jsxs)(t.sl,{children:[(0,c.jsx)("p",{className:"text-medium-emphasis small",children:"CoreUI includes a bunch of predefined buttons components, each serving its own semantic purpose. Buttons show what action will happen when the user clicks or touches it. CoreUI buttons are used to initialize operations, both in the background or foreground of an experience."}),(0,c.jsx)(o.Z,{href:"components/buttons",children:["normal","active","disabled"].map((function(e,s){return(0,c.jsxs)(t.rb,{className:"align-items-center mb-3",children:[(0,c.jsx)(t.b7,{xs:12,xl:2,className:"mb-3 mb-xl-0",children:e.charAt(0).toUpperCase()+e.slice(1)}),(0,c.jsxs)(t.b7,{xs:!0,children:[["primary","secondary","success","danger","warning","info","light","dark"].map((function(s,n){return(0,c.jsx)(t.u5,{color:s,active:"active"===e,disabled:"disabled"===e,children:s.charAt(0).toUpperCase()+s.slice(1)},n)})),(0,c.jsx)(t.u5,{color:"link",children:"Link"})]})]},s)}))})]})]})}),(0,c.jsx)(t.b7,{xs:12,children:(0,c.jsxs)(t.xH,{className:"mb-4",children:[(0,c.jsxs)(t.bn,{children:[(0,c.jsx)("strong",{children:"React Button"})," ",(0,c.jsx)("small",{children:"with icons"})]}),(0,c.jsxs)(t.sl,{children:[(0,c.jsxs)("p",{className:"text-medium-emphasis small",children:["You can combine button with our ",(0,c.jsx)("a",{href:"https://icons.coreui.io/",children:"CoreUI Icons"}),"."]}),(0,c.jsx)(o.Z,{href:"components/buttons",children:["normal","active","disabled"].map((function(e,s){return(0,c.jsxs)(t.rb,{className:"align-items-center mb-3",children:[(0,c.jsx)(t.b7,{xs:12,xl:2,className:"mb-3 mb-xl-0",children:e.charAt(0).toUpperCase()+e.slice(1)}),(0,c.jsxs)(t.b7,{xs:!0,children:[["primary","secondary","success","danger","warning","info","light","dark"].map((function(s,n){return(0,c.jsxs)(t.u5,{color:s,active:"active"===e,disabled:"disabled"===e,children:[(0,c.jsx)(r.Z,{icon:i.$,className:"me-2"}),s.charAt(0).toUpperCase()+s.slice(1)]},n)})),(0,c.jsxs)(t.u5,{color:"link",children:[(0,c.jsx)(r.Z,{icon:i.$,className:"me-2"}),"Link"]})]})]},s)}))})]})]})}),(0,c.jsx)(t.b7,{xs:12,children:(0,c.jsxs)(t.xH,{className:"mb-4",children:[(0,c.jsxs)(t.bn,{children:[(0,c.jsx)("strong",{children:"React Button"})," ",(0,c.jsx)("small",{children:"Button components"})]}),(0,c.jsxs)(t.sl,{children:[(0,c.jsxs)("p",{className:"text-medium-emphasis small",children:["The ",(0,c.jsx)("code",{children:"<CButton>"})," component are designed for"," ",(0,c.jsx)("code",{children:"<button>"})," , ",(0,c.jsx)("code",{children:"<a>"})," or ",(0,c.jsx)("code",{children:"<input>"})," ","elements (though some browsers may apply a slightly different rendering)."]}),(0,c.jsxs)("p",{className:"text-medium-emphasis small",children:["If you're using ",(0,c.jsx)("code",{children:"<CButton>"})," component as ",(0,c.jsx)("code",{children:"<a>"})," ","elements that are used to trigger functionality ex. collapsing content, these links should be given a ",(0,c.jsx)("code",{children:'role="button"'})," to adequately communicate their meaning to assistive technologies such as screen readers."]}),(0,c.jsxs)(o.Z,{href:"components/buttons#button-components",children:[(0,c.jsx)(t.u5,{component:"a",color:"primary",href:"#",role:"button",children:"Link"}),(0,c.jsx)(t.u5,{type:"submit",color:"primary",children:"Button"}),(0,c.jsx)(t.u5,{component:"input",type:"button",color:"primary",value:"Input"}),(0,c.jsx)(t.u5,{component:"input",type:"submit",color:"primary",value:"Submit"}),(0,c.jsx)(t.u5,{component:"input",type:"reset",color:"primary",value:"Reset"})]})]})]})}),(0,c.jsx)(t.b7,{xs:12,children:(0,c.jsxs)(t.xH,{className:"mb-4",children:[(0,c.jsxs)(t.bn,{children:[(0,c.jsx)("strong",{children:"React Button"})," ",(0,c.jsx)("small",{children:"outline"})]}),(0,c.jsxs)(t.sl,{children:[(0,c.jsxs)("p",{className:"text-medium-emphasis small",children:["If you need a button, but without the strong background colors. Set"," ",(0,c.jsx)("code",{children:'variant="outline"'})," prop to remove all background colors."]}),(0,c.jsx)(o.Z,{href:"components/buttons#outline-buttons",children:["normal","active","disabled"].map((function(e,s){return(0,c.jsxs)(t.rb,{className:"align-items-center mb-3",children:[(0,c.jsx)(t.b7,{xs:12,xl:2,className:"mb-3 mb-xl-0",children:e.charAt(0).toUpperCase()+e.slice(1)}),(0,c.jsx)(t.b7,{xs:!0,children:["primary","secondary","success","danger","warning","info","light","dark"].map((function(s,n){return(0,c.jsx)(t.u5,{color:s,variant:"outline",active:"active"===e,disabled:"disabled"===e,children:s.charAt(0).toUpperCase()+s.slice(1)},n)}))})]},s)}))})]})]})}),(0,c.jsx)(t.b7,{xs:12,children:(0,c.jsxs)(t.xH,{className:"mb-4",children:[(0,c.jsxs)(t.bn,{children:[(0,c.jsx)("strong",{children:"React Button"})," ",(0,c.jsx)("small",{children:"ghost"})]}),(0,c.jsxs)(t.sl,{children:[(0,c.jsxs)("p",{className:"text-medium-emphasis small",children:["If you need a ghost variant of button, set ",(0,c.jsx)("code",{children:'variant="ghost"'})," prop to remove all background colors."]}),(0,c.jsx)(o.Z,{href:"components/buttons#ghost-buttons",children:["normal","active","disabled"].map((function(e,s){return(0,c.jsxs)(t.rb,{className:"align-items-center mb-3",children:[(0,c.jsx)(t.b7,{xs:12,xl:2,className:"mb-3 mb-xl-0",children:e.charAt(0).toUpperCase()+e.slice(1)}),(0,c.jsx)(t.b7,{xs:!0,children:["primary","secondary","success","danger","warning","info","light","dark"].map((function(s,n){return(0,c.jsx)(t.u5,{color:s,variant:"ghost",active:"active"===e,disabled:"disabled"===e,children:s.charAt(0).toUpperCase()+s.slice(1)},n)}))})]},s)}))})]})]})}),(0,c.jsx)(t.b7,{xs:12,children:(0,c.jsxs)(t.xH,{className:"mb-4",children:[(0,c.jsxs)(t.bn,{children:[(0,c.jsx)("strong",{children:"React Button"})," ",(0,c.jsx)("small",{children:"Sizes"})]}),(0,c.jsxs)(t.sl,{children:[(0,c.jsxs)("p",{className:"text-medium-emphasis small",children:["Larger or smaller buttons? Add ",(0,c.jsx)("code",{children:'size="lg"'})," or"," ",(0,c.jsx)("code",{children:'size="sm"'})," for additional sizes."]}),(0,c.jsxs)(o.Z,{href:"components/buttons#sizes",children:[(0,c.jsx)(t.u5,{color:"primary",size:"lg",children:"Large button"}),(0,c.jsx)(t.u5,{color:"secondary",size:"lg",children:"Large button"})]}),(0,c.jsxs)(o.Z,{href:"components/buttons#sizes",children:[(0,c.jsx)(t.u5,{color:"primary",size:"sm",children:"Small button"}),(0,c.jsx)(t.u5,{color:"secondary",size:"sm",children:"Small button"})]})]})]})}),(0,c.jsx)(t.b7,{xs:12,children:(0,c.jsxs)(t.xH,{className:"mb-4",children:[(0,c.jsxs)(t.bn,{children:[(0,c.jsx)("strong",{children:"React Button"})," ",(0,c.jsx)("small",{children:"Pill"})]}),(0,c.jsx)(t.sl,{children:(0,c.jsx)(o.Z,{href:"components/buttons#pill-buttons",children:["primary","secondary","success","danger","warning","info","light","dark"].map((function(e,s){return(0,c.jsx)(t.u5,{color:e,shape:"rounded-pill",children:e.charAt(0).toUpperCase()+e.slice(1)},s)}))})})]})}),(0,c.jsx)(t.b7,{xs:12,children:(0,c.jsxs)(t.xH,{className:"mb-4",children:[(0,c.jsxs)(t.bn,{children:[(0,c.jsx)("strong",{children:"React Button"})," ",(0,c.jsx)("small",{children:"Square"})]}),(0,c.jsx)(t.sl,{children:(0,c.jsx)(o.Z,{href:"components/buttons#square",children:["primary","secondary","success","danger","warning","info","light","dark"].map((function(e,s){return(0,c.jsx)(t.u5,{color:e,shape:"rounded-0",children:e.charAt(0).toUpperCase()+e.slice(1)},s)}))})})]})}),(0,c.jsx)(t.b7,{xs:12,children:(0,c.jsxs)(t.xH,{className:"mb-4",children:[(0,c.jsxs)(t.bn,{children:[(0,c.jsx)("strong",{children:"React Button"})," ",(0,c.jsx)("small",{children:"Disabled state"})]}),(0,c.jsxs)(t.sl,{children:[(0,c.jsxs)("p",{className:"text-medium-emphasis small",children:["Add the ",(0,c.jsx)("code",{children:"disabled"})," boolean prop to any ",(0,c.jsx)("code",{children:"<CButton>"})," ","component to make buttons look inactive. Disabled button has"," ",(0,c.jsx)("code",{children:"pointer-events: none"})," applied to, disabling hover and active states from triggering."]}),(0,c.jsxs)(o.Z,{href:"components/buttons#disabled-state",children:[(0,c.jsx)(t.u5,{color:"primary",size:"lg",disabled:!0,children:"Primary button"}),(0,c.jsx)(t.u5,{color:"secondary",size:"lg",disabled:!0,children:"Button"})]}),(0,c.jsxs)("p",{className:"text-medium-emphasis small",children:["Disabled buttons using the ",(0,c.jsx)("code",{children:"<a>"})," component act a little different:"]}),(0,c.jsxs)("p",{className:"text-medium-emphasis small",children:[(0,c.jsx)("code",{children:"<a>"}),"s don'tsupport the ",(0,c.jsx)("code",{children:"disabled"})," attribute, so CoreUI has to add ",(0,c.jsx)("code",{children:".disabled"})," className to make buttons look inactive. CoreUI also has to add to the disabled button component"," ",(0,c.jsx)("code",{children:'aria-disabled="true"'})," attribute to show the state of the component to assistive technologies."]}),(0,c.jsxs)(o.Z,{href:"components/buttons#disabled-state",children:[(0,c.jsx)(t.u5,{component:"a",href:"#",color:"primary",size:"lg",disabled:!0,children:"Primary link"}),(0,c.jsx)(t.u5,{component:"a",href:"#",color:"secondary",size:"lg",disabled:!0,children:"Link"})]})]})]})}),(0,c.jsx)(t.b7,{xs:12,children:(0,c.jsxs)(t.xH,{className:"mb-4",children:[(0,c.jsxs)(t.bn,{children:[(0,c.jsx)("strong",{children:"React Button"})," ",(0,c.jsx)("small",{children:"Block buttons"})]}),(0,c.jsxs)(t.sl,{children:[(0,c.jsx)("p",{className:"text-medium-emphasis small",children:"Create buttons that span the full width of a parent—by using utilities."}),(0,c.jsx)(o.Z,{href:"components/buttons#block-buttons",children:(0,c.jsxs)("div",{className:"d-grid gap-2",children:[(0,c.jsx)(t.u5,{color:"primary",children:"Button"}),(0,c.jsx)(t.u5,{color:"primary",children:"Button"})]})}),(0,c.jsxs)("p",{className:"text-medium-emphasis small",children:["Here we create a responsive variation, starting with vertically stacked buttons until the ",(0,c.jsx)("code",{children:"md"})," breakpoint, where ",(0,c.jsx)("code",{children:".d-md-block"})," replaces the"," ",(0,c.jsx)("code",{children:".d-grid"})," class, thus nullifying the ",(0,c.jsx)("code",{children:"gap-2"})," utility. Resize your browser to see them change."]}),(0,c.jsx)(o.Z,{href:"components/buttons#block-buttons",children:(0,c.jsxs)("div",{className:"d-grid gap-2 d-md-block",children:[(0,c.jsx)(t.u5,{color:"primary",children:"Button"}),(0,c.jsx)(t.u5,{color:"primary",children:"Button"})]})}),(0,c.jsxs)("p",{className:"text-medium-emphasis small",children:['You can adjust the width of your block buttons with grid column width classes. For example, for a half-width "block button", use ',(0,c.jsx)("code",{children:".col-6"}),". Center it horizontally with ",(0,c.jsx)("code",{children:".mx-auto"}),", too."]}),(0,c.jsx)(o.Z,{href:"components/buttons#block-buttons",children:(0,c.jsxs)("div",{className:"d-grid gap-2 col-6 mx-auto",children:[(0,c.jsx)(t.u5,{color:"primary",children:"Button"}),(0,c.jsx)(t.u5,{color:"primary",children:"Button"})]})}),(0,c.jsx)("p",{className:"text-medium-emphasis small",children:"Additional utilities can be used to adjust the alignment of buttons when horizontal. Here we've taken our previous responsive example and added some flex utilities and a margin utility on the button to right align the buttons when they're no longer stacked."}),(0,c.jsx)(o.Z,{href:"components/buttons#block-buttons",children:(0,c.jsxs)("div",{className:"d-grid gap-2 d-md-flex justify-content-md-end",children:[(0,c.jsx)(t.u5,{color:"primary",className:"me-md-2",children:"Button"}),(0,c.jsx)(t.u5,{color:"primary",children:"Button"})]})})]})]})})]})}}}]);