UNPKG

uipack-manan

Version:

Tired of writing endless lines of code just to create modern, stylish buttons? Struggling with how to implement them from scratch without spending hours on design and code? Say goodbye to the frustration! With uipack-manan, you can implement beautiful, fu

577 lines (516 loc) 12.1 kB
/* Button container */ .btn-container { position: relative; display: inline-block; margin: 1rem; } /* Tooltip styling */ .tooltip { position: absolute; font-family: Arial, Helvetica, sans-serif; bottom: 130%; /* Adjusts to stay above the button */ left: 50%; transform: translateX(-50%); background: linear-gradient(135deg, #2c2c2c, #4e4e4e); color: white; padding: 0.5rem 1rem; font-size: 0.875rem; border-radius: 8px; opacity: 0; visibility: hidden; white-space: nowrap; z-index: 1000; box-shadow: 0px 8px 15px rgba(0, 0, 0, 0.2); animation: tooltip-pop 0.3s ease-out; pointer-events: none; /* Avoid tooltip blocking hover effects */ } /* Tooltip arrow */ .tooltip::after { content: ""; position: absolute; bottom: -11px; left: 50%; transform: translateX(-50%); border-width: 6px; border-style: solid; border-color: #111 transparent transparent transparent; } /* Show tooltip on hover */ .btn-container:hover .tooltip { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(-10px); /* Subtle upward animation */ } /* Tooltip pop animation */ @keyframes tooltip-pop { 0% { transform: translateX(-50%) translateY(10px); opacity: 0; } 100% { transform: translateX(-50%) translateY(-10px); opacity: 1; } } /* Responsive button styles */ @media (max-width: 768px) { .btn { font-size: 0.9rem; padding: 0.6rem 1rem; } } @media (max-width: 480px) { .btn { font-size: 0.8rem; padding: 0.5rem 0.8rem; } .tooltip { font-size: 0.75rem; } } /* !uplift */ /* From Uiverse.io by satyamchaudharydev */ /* inspired form gumroad website */ /* From Uiverse.io by satyamchaudharydev */ /* inspired form gumroad website */ .btn-uplift { --bg: #000; --hover-bg: #ff90e8; --hover-text: #000; color: #fff; cursor: pointer; border: 1px solid var(--bg); border-radius: 4px; padding: 0.8em 2em; background: var(--bg); -webkit-transition: 0.2s; transition: 0.2s; } .btn-uplift:hover { color: var(--hover-text); -webkit-transform: translate(-0.25rem, -0.25rem); -ms-transform: translate(-0.25rem, -0.25rem); transform: translate(-0.25rem, -0.25rem); background: var(--hover-bg); -webkit-box-shadow: 0.25rem 0.25rem var(--bg); box-shadow: 0.25rem 0.25rem var(--bg); } .btn-uplift:active { -webkit-transform: translate(0); -ms-transform: translate(0); transform: translate(0); -webkit-box-shadow: none; box-shadow: none; } /*! Black Smooth Lift Basic default*/ .btn-default { appearance: none; background-color: transparent; border: 0.125em solid #1a1a1a; border-radius: 0.9375em; box-sizing: border-box; color: #3b3b3b; cursor: pointer; display: inline-block; font-family: Roobert, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; font-size: 16px; font-weight: 600; line-height: normal; margin: 0; min-height: 3.75em; min-width: 0; outline: none; padding: 1em 2.3em; text-align: center; text-decoration: none; transition: all 300ms cubic-bezier(0.23, 1, 0.32, 1); user-select: none; -webkit-user-select: none; touch-action: manipulation; will-change: transform; } .btn-default:disabled { pointer-events: none; } .btn-default:hover { color: #fff; background-color: #1a1a1a; box-shadow: rgba(0, 0, 0, 0.25) 0 8px 15px; transform: translateY(-2px); } .btn-default:active { box-shadow: none; transform: translateY(0); } /*! Slide Button */ .btn-slide { padding: 15px 25px; border: unset; border-radius: 15px; color: #212121; z-index: 1; background: #e8e8e8; position: relative; font-weight: 1000; font-size: 17px; -webkit-box-shadow: 4px 8px 19px -3px rgba(0, 0, 0, 0.27); box-shadow: 4px 8px 19px -3px rgba(0, 0, 0, 0.27); transition: all 250ms; overflow: hidden; } .btn-slide::before { content: ""; position: absolute; top: 0; left: 0; height: 100%; width: 0; border-radius: 15px; background-color: #212121; z-index: -1; -webkit-box-shadow: 4px 8px 19px -3px rgba(0, 0, 0, 0.27); box-shadow: 4px 8px 19px -3px rgba(0, 0, 0, 0.27); transition: all 250ms; } .btn-slide:hover { color: #e8e8e8; } .btn-slide:hover::before { width: 100%; } /* btn pop */ /* From Uiverse.io by thisSasha */ .btn-pop { padding: 15px 25px; border: 0; border-radius: 15px; color: #212121; z-index: 1; background: #e8e8e8; position: relative; font-weight: 1000; font-size: 17px; -webkit-box-shadow: 4px 8px 19px -3px rgba(0, 0, 0, 0.27); box-shadow: 4px 8px 19px -3px rgba(0, 0, 0, 0.27); -webkit-transition: all 250ms; transition: all 250ms; overflow: hidden; } .btn-pop::before { content: ""; position: absolute; top: 50%; left: 50%; height: 0; width: 0; border-radius: 15px; background-color: #212121; z-index: -1; -webkit-box-shadow: 4px 8px 19px -3px rgba(0, 0, 0, 0.27); box-shadow: 4px 8px 19px -3px rgba(0, 0, 0, 0.27); -webkit-transition: all 250ms; transition: all 250ms; } .btn-pop:hover { color: #e8e8e8; } .btn-pop:hover::before { width: 100%; top: 0; left: 0; height: 100%; } .btn-pop:active { -webkit-transform: scale(80%); -ms-transform: scale(80%); transform: scale(80%); } /* shine */ /* From Uiverse.io by mobinkakei */ .btn-shine { position: relative; margin: 0; font-family: Roobert, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol" !important; padding: 17px 35px; outline: none; text-decoration: none; display: flex; justify-content: center; align-items: center; cursor: pointer; text-transform: uppercase; background-color: #fff; border: 1px solid rgba(22, 76, 167, 0.6); border-radius: 10px; color: #1d89ff; font-weight: 400; font-family: inherit; z-index: 0; overflow: hidden; transition: all 0.3s cubic-bezier(0.02, 0.01, 0.47, 1); } .btn-shine span { color: #164ca7; font-size: 14px; font-weight: 500; letter-spacing: 0.7px; } .btn-shine:hover { animation: rotate624 0.7s ease-in-out both; } .btn-shine:hover span { animation: storm1261 0.7s ease-in-out both; animation-delay: 0.06s; } @keyframes rotate624 { 0% { transform: rotate(0deg) translate3d(0, 0, 0); } 25% { transform: rotate(3deg) translate3d(0, 0, 0); } 50% { transform: rotate(-3deg) translate3d(0, 0, 0); } 75% { transform: rotate(1deg) translate3d(0, 0, 0); } 100% { transform: rotate(0deg) translate3d(0, 0, 0); } } @keyframes storm1261 { 0% { transform: translate3d(0, 0, 0) translateZ(0); } 25% { transform: translate3d(4px, 0, 0) translateZ(0); } 50% { transform: translate3d(-3px, 0, 0) translateZ(0); } 75% { transform: translate3d(2px, 0, 0) translateZ(0); } 100% { transform: translate3d(0, 0, 0) translateZ(0); } } .btn-shine { border: 1px solid; overflow: hidden; position: relative; } .btn-shine span { z-index: 20; } .btn-shine:after { background: #38ef7d; content: ""; height: 155px; left: -75px; opacity: 0.4; position: absolute; top: -50px; transform: rotate(35deg); transition: all 550ms cubic-bezier(0.19, 1, 0.22, 1); width: 50px; z-index: -10; } .btn-shine:hover:after { left: 120%; transition: all 550ms cubic-bezier(0.19, 1, 0.22, 1); } /* !Magic */ .magic { position: relative; padding: 12px 35px; background: #fec195; font-size: 17px; font-weight: 500; color: #181818; border: 3px solid #fec195; border-radius: 8px; box-shadow: 0 0 0 #fec1958c; transition: all 0.3s ease-in-out; cursor: pointer; } .star-1 { position: absolute; top: 20%; left: 20%; width: 25px; height: auto; filter: drop-shadow(0 0 0 #fffdef); z-index: -5; transition: all 1s cubic-bezier(0.05, 0.83, 0.43, 0.96); } .star-2 { position: absolute; top: 45%; left: 45%; width: 15px; height: auto; filter: drop-shadow(0 0 0 #fffdef); z-index: -5; transition: all 1s cubic-bezier(0, 0.4, 0, 1.01); } .star-3 { position: absolute; top: 40%; left: 40%; width: 5px; height: auto; filter: drop-shadow(0 0 0 #fffdef); z-index: -5; transition: all 1s cubic-bezier(0, 0.4, 0, 1.01); } .star-4 { position: absolute; top: 20%; left: 40%; width: 8px; height: auto; filter: drop-shadow(0 0 0 #fffdef); z-index: -5; transition: all 0.8s cubic-bezier(0, 0.4, 0, 1.01); } .star-5 { position: absolute; top: 25%; left: 45%; width: 15px; height: auto; filter: drop-shadow(0 0 0 #fffdef); z-index: -5; transition: all 0.6s cubic-bezier(0, 0.4, 0, 1.01); } .star-6 { position: absolute; top: 5%; left: 50%; width: 5px; height: auto; filter: drop-shadow(0 0 0 #fffdef); z-index: -5; transition: all 0.8s ease; } .magic:hover { background: transparent; color: #fec195; box-shadow: 0 0 25px #fec1958c; } .magic:hover .star-1 { position: absolute; top: -80%; left: -30%; width: 25px; height: auto; filter: drop-shadow(0 0 10px #fffdef); z-index: 2; } .magic:hover .star-2 { position: absolute; top: -25%; left: 10%; width: 15px; height: auto; filter: drop-shadow(0 0 10px #fffdef); z-index: 2; } .magic:hover .star-3 { position: absolute; top: 55%; left: 25%; width: 5px; height: auto; filter: drop-shadow(0 0 10px #fffdef); z-index: 2; } .magic:hover .star-4 { position: absolute; top: 30%; left: 80%; width: 8px; height: auto; filter: drop-shadow(0 0 10px #fffdef); z-index: 2; } .magic:hover .star-5 { position: absolute; top: 25%; left: 115%; width: 15px; height: auto; filter: drop-shadow(0 0 10px #fffdef); z-index: 2; } .magic:hover .star-6 { position: absolute; top: 5%; left: 60%; width: 5px; height: auto; filter: drop-shadow(0 0 10px #fffdef); z-index: 2; } .fil0 { fill: #fffdef; } /* Rainbow button */ .btn-rainbow { display: block; cursor: pointer; color: white; margin: 0 auto; position: relative; text-decoration: none; font-weight: 600; border-radius: 6px; overflow: hidden; padding: 3px; isolation: isolate; } .btn-rainbow::before { content: ""; position: absolute; top: 0; left: 0; width: 400%; height: 100%; background: linear-gradient( 115deg, #4fcf70, #fad648, #a767e5, #12bcfe, #44ce7b ); background-size: 25% 100%; animation: an-at-keyframe-css-at-rule-that-translates-via-the-transform-property-the-background-by-negative-25-percent-of-its-width-so-that-it-gives-a-nice-border-animation_-We-use-the-translate-property-to-have-a-nice-transition-so-it_s-not-a-jerk-of-a-start-or-stop 0.75s linear infinite; animation-play-state: paused; translate: -5% 0%; transition: translate 0.25s ease-out; } .btn-rainbow:hover::before { animation-play-state: running; transition-duration: 0.75s; translate: 0% 0%; } @keyframes an-at-keyframe-css-at-rule-that-translates-via-the-transform-property-the-background-by-negative-25-percent-of-its-width-so-that-it-gives-a-nice-border-animation_-We-use-the-translate-property-to-have-a-nice-transition-so-it_s-not-a-jerk-of-a-start-or-stop { to { transform: translateX(-25%); } } .btn-rainbow span { position: relative; display: block; padding: 1rem 1.5rem; font-size: 1.1rem; background: #000; border-radius: 3px; height: 100%; }