Hi, my name is Eddie and I am a pragmatic UI designer who has worked with dozens of businesses and some non-profit organizations. If you'd like me to help you with your next UI project, let's talk!
41 |├── .DS_Store ├── .gitattributes ├── .gitignore ├── LICENSE ├── README.md ├── dist ├── 1.dc197a9a.jpg ├── 2.3ca6bb44.jpg ├── demo1.ea7e4db3.css ├── demo1.ea7e4db3.css.map ├── demo1.ea7e4db3.js ├── demo1.ea7e4db3.js.map ├── demo2.06b37b5f.css ├── demo2.06b37b5f.css.map ├── demo2.06b37b5f.js ├── demo2.06b37b5f.js.map ├── demo3.f904c581.css ├── demo3.f904c581.css.map ├── demo3.f904c581.js ├── demo3.f904c581.js.map ├── demo4.7fb5a017.css ├── demo4.7fb5a017.css.map ├── demo4.7fb5a017.js ├── demo4.7fb5a017.js.map ├── favicon.26242483.ico ├── index.html ├── index2.242c2f2d.js ├── index2.242c2f2d.js.map ├── index2.html ├── index2.html.map ├── index2.js ├── index2.js.map ├── index3.02479077.js ├── index3.02479077.js.map ├── index3.html ├── index4.c87507a4.js ├── index4.c87507a4.js.map ├── index4.html ├── js.00a46daa.js ├── js.00a46daa.js.map ├── messapia-bold-webfont.3267b3d0.woff2 └── messapia-bold-webfont.6ddf630f.woff ├── package.json └── src ├── .DS_Store ├── .gitignore ├── css ├── demo1.css ├── demo2.css ├── demo3.css └── demo4.css ├── favicon.ico ├── fonts ├── messapia-bold-webfont.woff └── messapia-bold-webfont.woff2 ├── img ├── 1.jpg └── 2.jpg ├── index.html ├── index2.html ├── index3.html ├── index4.html └── js ├── cursor.js ├── cursor2.js ├── cursor3.js ├── cursor4.js ├── index.js ├── index2.js ├── index3.js ├── index4.js └── utils.js /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codrops/AnimatedCustomCursor/27dd6c4da069829c5773f7dcbc87a5fac5bc7fda/.DS_Store -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /node_modules 2 | /.cache 3 | package-lock.json -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2009 - 2020 [Codrops](https://tympanus.net/codrops) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Animated Custom Cursor Effect 2 | 3 | Some distortion animations for custom cursors using SVG filters. 4 | 5 |  6 | 7 | [Article on Codrops](https://tympanus.net/codrops/?p=48725) 8 | 9 | [Demo](http://tympanus.net/Development/AnimatedCustomCursor/) 10 | 11 | 12 | ## Installation 13 | 14 | Install dependencies: 15 | 16 | ``` 17 | npm install 18 | ``` 19 | 20 | Compile the code for development and start a local server: 21 | 22 | ``` 23 | npm start 24 | ``` 25 | 26 | Create the build: 27 | 28 | ``` 29 | npm run build 30 | ``` 31 | 32 | ## Credits 33 | 34 | - Images from [Unsplash](https://unsplash.com/) 35 | - Messapia font by Luca Marsano from [Collletttivo.it](http://collletttivo.it/) 36 | 37 | ## Misc 38 | 39 | Follow Codrops: [Twitter](http://www.twitter.com/codrops), [Facebook](http://www.facebook.com/codrops), [GitHub](https://github.com/codrops), [Instagram](https://www.instagram.com/codropsss/) 40 | 41 | ## License 42 | [MIT](LICENSE) 43 | 44 | Made with :blue_heart: by [Codrops](http://www.codrops.com) 45 | 46 | 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /dist/1.dc197a9a.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codrops/AnimatedCustomCursor/27dd6c4da069829c5773f7dcbc87a5fac5bc7fda/dist/1.dc197a9a.jpg -------------------------------------------------------------------------------- /dist/2.3ca6bb44.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codrops/AnimatedCustomCursor/27dd6c4da069829c5773f7dcbc87a5fac5bc7fda/dist/2.3ca6bb44.jpg -------------------------------------------------------------------------------- /dist/demo1.ea7e4db3.css: -------------------------------------------------------------------------------- 1 | *, 2 | *::after, 3 | *::before { 4 | box-sizing: border-box; 5 | } 6 | 7 | :root { 8 | font-size: 15px; 9 | } 10 | 11 | body { 12 | margin: 0; 13 | --color-text: #c3654e; 14 | --color-bg: #f2e9e0; 15 | --color-link: #000; 16 | --color-link-hover: #040203; 17 | --color-content: #040203; 18 | --font-alt: freight-display-pro, serif; 19 | color: var(--color-text); 20 | background-color: var(--color-bg); 21 | font-family: soleil, sans-serif; 22 | -webkit-font-smoothing: antialiased; 23 | -moz-osx-font-smoothing: grayscale; 24 | /* Cursor styles */ 25 | --cursor-stroke: #c3654e; 26 | --cursor-fill: none; 27 | --cursor-stroke-width: 1px; 28 | } 29 | 30 | a { 31 | text-decoration: none; 32 | color: var(--color-link); 33 | outline: none; 34 | cursor: pointer; 35 | } 36 | 37 | a:hover, 38 | a:focus { 39 | color: var(--color-link-hover); 40 | outline: none; 41 | } 42 | 43 | .frame { 44 | padding: 3rem 5vw; 45 | text-align: center; 46 | position: relative; 47 | z-index: 1000; 48 | } 49 | 50 | .frame__title { 51 | font-size: 1rem; 52 | margin: 0 0 1rem; 53 | font-weight: inherit; 54 | } 55 | 56 | .frame__links { 57 | display: block; 58 | } 59 | 60 | .frame__links > *:not(:last-child), 61 | .frame__demos > *:not(:last-child) { 62 | margin-right: 1rem; 63 | } 64 | 65 | .frame__demos { 66 | margin: 1rem 0; 67 | } 68 | 69 | .frame__demos span { 70 | font-weight: bold; 71 | color: var(--color-link); 72 | } 73 | 74 | .frame__initials { 75 | font-family: var(--font-alt); 76 | font-size: 1.5rem; 77 | pointer-events: none; 78 | line-height: 18px; 79 | } 80 | 81 | .content { 82 | display: flex; 83 | position: relative; 84 | flex-direction: column; 85 | width: 100vw; 86 | height: calc(100vh - 13rem); 87 | position: relative; 88 | justify-content: flex-start; 89 | align-items: center; 90 | } 91 | 92 | .content p { 93 | max-width: 80vw; 94 | font-size: 4vw; 95 | text-transform: uppercase; 96 | color: var(--color-content); 97 | font-family: var(--font-alt); 98 | font-weight: 300; 99 | line-height: 1.4; 100 | } 101 | 102 | .content p a { 103 | font-weight: 600; 104 | font-style: italic; 105 | position: relative; 106 | } 107 | 108 | .content p a::after { 109 | content: ''; 110 | position: absolute; 111 | width: 100%; 112 | height: 1px; 113 | background: currentColor; 114 | bottom: 0.5vw; 115 | left: 0; 116 | opacity: 0; 117 | transform-origin: 0% 50%; 118 | transform: scaleX(0); 119 | transition: all 0.25s ease-out; 120 | } 121 | 122 | .content p a:hover::after, 123 | .content p a:focus::after { 124 | opacity: 1; 125 | transform: scaleX(1); 126 | } 127 | 128 | .menu { 129 | display: flex; 130 | overflow: hidden; 131 | position: relative; 132 | width: 100vw; 133 | justify-content: center; 134 | } 135 | 136 | .menu__item { 137 | font-size: 6.5vw; 138 | margin: 0 2vw; 139 | cursor: default; 140 | font-family: var(--font-alt); 141 | color: var(--color-menu-link); 142 | cursor: pointer; 143 | } 144 | 145 | .menu__item:hover, 146 | .menu__item:focus { 147 | color: var(--color-menu-link-hover); 148 | } 149 | 150 | .cursor { 151 | display: none; 152 | } 153 | 154 | @media screen and (min-width: 53em) { 155 | .frame { 156 | position: fixed; 157 | text-align: left; 158 | z-index: 10000; 159 | top: 0; 160 | left: 0; 161 | display: grid; 162 | align-content: space-between; 163 | width: 100%; 164 | max-width: none; 165 | height: 100vh; 166 | padding: 2.5rem 3rem; 167 | pointer-events: none; 168 | grid-template-columns: 40% 20% 40%; 169 | grid-template-rows: auto auto auto; 170 | grid-template-areas: 'title initials links' 171 | '... ... ...' 172 | '... demos ...'; 173 | } 174 | .frame__title { 175 | grid-area: title; 176 | margin: 0; 177 | } 178 | .frame__initials { 179 | grid-area: initials; 180 | margin: 0; 181 | justify-self: center; 182 | align-self: center; 183 | } 184 | .frame__demos { 185 | margin: 0; 186 | grid-area: demos; 187 | justify-self: center; 188 | } 189 | .frame__links { 190 | grid-area: links; 191 | padding: 0; 192 | justify-self: end; 193 | } 194 | .frame__info { 195 | grid-area: info; 196 | margin: 0; 197 | justify-self: end; 198 | } 199 | .frame a { 200 | pointer-events: auto; 201 | } 202 | .content { 203 | height: 100vh; 204 | justify-content: center; 205 | } 206 | } 207 | 208 | @media (any-pointer: fine) { 209 | .cursor { 210 | position: fixed; 211 | top: 0; 212 | left: 0; 213 | display: block; 214 | pointer-events: none; 215 | opacity: 0; 216 | } 217 | .cursor__inner { 218 | fill: var(--cursor-fill); 219 | stroke: var(--cursor-stroke); 220 | stroke-width: var(--cursor-stroke-width); 221 | } 222 | } 223 | 224 | 225 | /*# sourceMappingURL=/demo1.ea7e4db3.css.map */ -------------------------------------------------------------------------------- /dist/demo1.ea7e4db3.css.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["css/demo1.css"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"demo1.ea7e4db3.css","sourceRoot":"../src","sourcesContent":["*,\n*::after,\n*::before {\n\tbox-sizing: border-box;\n}\n\n:root {\n\tfont-size: 15px;\n}\n\nbody {\n\tmargin: 0;\n\t--color-text: #c3654e;\n\t--color-bg: #f2e9e0;\n\t--color-link: #000;\n\t--color-link-hover: #040203;\n\t--color-content: #040203;\n\t--font-alt: freight-display-pro, serif;\n\tcolor: var(--color-text);\n\tbackground-color: var(--color-bg);\n\tfont-family: soleil, sans-serif;\n\t-webkit-font-smoothing: antialiased;\n\t-moz-osx-font-smoothing: grayscale;\n\t/* Cursor styles */\n\t--cursor-stroke: #c3654e;\n\t--cursor-fill: none;\n\t--cursor-stroke-width: 1px;\n}\n\na {\n\ttext-decoration: none;\n\tcolor: var(--color-link);\n\toutline: none;\n\tcursor: pointer;\n}\n\na:hover,\na:focus {\n\tcolor: var(--color-link-hover);\n\toutline: none;\n}\n\n.frame {\n\tpadding: 3rem 5vw;\n\ttext-align: center;\n\tposition: relative;\n\tz-index: 1000;\n}\n\n.frame__title {\n\tfont-size: 1rem;\n\tmargin: 0 0 1rem;\n\tfont-weight: inherit;\n}\n\n.frame__links {\n\tdisplay: block;\n}\n\n.frame__links > *:not(:last-child),\n.frame__demos > *:not(:last-child) {\n margin-right: 1rem;\n}\n\n.frame__demos {\n\tmargin: 1rem 0;\n}\n\n.frame__demos span {\n\tfont-weight: bold;\n\tcolor: var(--color-link);\n}\n\n.frame__initials {\n\tfont-family: var(--font-alt);\n\tfont-size: 1.5rem;\n\tpointer-events: none;\n\tline-height: 18px;\n}\n\n.content {\n\tdisplay: flex;\n\tposition: relative;\n\tflex-direction: column;\n\twidth: 100vw;\n\theight: calc(100vh - 13rem);\n\tposition: relative;\n\tjustify-content: flex-start;\n\talign-items: center;\n}\n\n.content p {\n\tmax-width: 80vw;\n\tfont-size: 4vw;\n\ttext-transform: uppercase;\n\tcolor: var(--color-content);\n\tfont-family: var(--font-alt);\n\tfont-weight: 300;\n\tline-height: 1.4;\n}\n\n.content p a {\n\tfont-weight: 600;\n\tfont-style: italic;\n\tposition: relative;\n}\n\n.content p a::after { \n\tcontent: ''; \n\tposition: absolute; \n\twidth: 100%; \n\theight: 1px; \n\tbackground: currentColor; \n\tbottom: 0.5vw; \n\tleft: 0; \n\topacity: 0; \n\ttransform-origin: 0% 50%; \n\ttransform: scaleX(0); \n\ttransition: all 0.25s ease-out; \n} \n \n.content p a:hover::after, \n.content p a:focus::after { \n\topacity: 1; \n\ttransform: scaleX(1); \n}\n\n.menu {\n\tdisplay: flex;\n\toverflow: hidden;\n\tposition: relative;\n\twidth: 100vw;\n\tjustify-content: center;\n}\n\n.menu__item {\n\tfont-size: 6.5vw;\n\tmargin: 0 2vw;\n\tcursor: default;\n\tfont-family: var(--font-alt);\n\tcolor: var(--color-menu-link);\n\tcursor: pointer;\n}\n\n.menu__item:hover,\n.menu__item:focus {\n\tcolor: var(--color-menu-link-hover);\n}\n\n.cursor {\n\tdisplay: none;\n}\n\n@media screen and (min-width: 53em) {\n\t.frame {\n\t\tposition: fixed;\n\t\ttext-align: left;\n\t\tz-index: 10000;\n\t\ttop: 0;\n\t\tleft: 0;\n\t\tdisplay: grid;\n\t\talign-content: space-between;\n\t\twidth: 100%;\n\t\tmax-width: none;\n\t\theight: 100vh;\n\t\tpadding: 2.5rem 3rem;\n\t\tpointer-events: none;\n\t\tgrid-template-columns: 40% 20% 40%;\n\t\tgrid-template-rows: auto auto auto;\n\t\tgrid-template-areas: 'title initials links'\n\t\t\t\t\t\t\t'... ... ...'\n\t\t\t\t\t\t\t'... demos ...';\n\t}\n\t.frame__title {\n\t\tgrid-area: title;\n\t\tmargin: 0;\n\t}\n\t.frame__initials {\n\t\tgrid-area: initials;\n\t\tmargin: 0;\n\t\tjustify-self: center;\n\t align-self: center;\n\t}\n\t.frame__demos {\n\t\tmargin: 0;\n\t\tgrid-area: demos;\n\t\tjustify-self: center;\n\t}\n\t.frame__links {\n\t\tgrid-area: links;\n\t\tpadding: 0;\n\t\tjustify-self: end;\n\t}\n\t.frame__info {\n\t\tgrid-area: info;\n\t\tmargin: 0;\n\t\tjustify-self: end;\n\t}\n\t.frame a {\n\t\tpointer-events: auto;\n\t}\n\t.content {\n\t\theight: 100vh;\n\t\tjustify-content: center;\n\t}\n}\n\n@media (any-pointer: fine) {\n\t.cursor {\n\t\tposition: fixed;\n\t\ttop: 0;\n\t\tleft: 0;\n\t\tdisplay: block;\n\t\tpointer-events: none;\n\t\topacity: 0;\n\t}\n\t.cursor__inner {\n\t\tfill: var(--cursor-fill);\n\t\tstroke: var(--cursor-stroke);\n\t\tstroke-width: var(--cursor-stroke-width);\n\t}\n}\n"]} -------------------------------------------------------------------------------- /dist/demo1.ea7e4db3.js: -------------------------------------------------------------------------------- 1 | // modules are defined as an array 2 | // [ module function, map of requires ] 3 | // 4 | // map of requires is short require name -> numeric require 5 | // 6 | // anything defined in a previous bundle is accessed via the 7 | // orig method which is the require for previous bundles 8 | parcelRequire = (function (modules, cache, entry, globalName) { 9 | // Save the require from previous bundle to this closure if any 10 | var previousRequire = typeof parcelRequire === 'function' && parcelRequire; 11 | var nodeRequire = typeof require === 'function' && require; 12 | 13 | function newRequire(name, jumped) { 14 | if (!cache[name]) { 15 | if (!modules[name]) { 16 | // if we cannot find the module within our internal map or 17 | // cache jump to the current global require ie. the last bundle 18 | // that was added to the page. 19 | var currentRequire = typeof parcelRequire === 'function' && parcelRequire; 20 | if (!jumped && currentRequire) { 21 | return currentRequire(name, true); 22 | } 23 | 24 | // If there are other bundles on this page the require from the 25 | // previous one is saved to 'previousRequire'. Repeat this as 26 | // many times as there are bundles until the module is found or 27 | // we exhaust the require chain. 28 | if (previousRequire) { 29 | return previousRequire(name, true); 30 | } 31 | 32 | // Try the node require function if it exists. 33 | if (nodeRequire && typeof name === 'string') { 34 | return nodeRequire(name); 35 | } 36 | 37 | var err = new Error('Cannot find module \'' + name + '\''); 38 | err.code = 'MODULE_NOT_FOUND'; 39 | throw err; 40 | } 41 | 42 | localRequire.resolve = resolve; 43 | localRequire.cache = {}; 44 | 45 | var module = cache[name] = new newRequire.Module(name); 46 | 47 | modules[name][0].call(module.exports, localRequire, module, module.exports, this); 48 | } 49 | 50 | return cache[name].exports; 51 | 52 | function localRequire(x){ 53 | return newRequire(localRequire.resolve(x)); 54 | } 55 | 56 | function resolve(x){ 57 | return modules[name][1][x] || x; 58 | } 59 | } 60 | 61 | function Module(moduleName) { 62 | this.id = moduleName; 63 | this.bundle = newRequire; 64 | this.exports = {}; 65 | } 66 | 67 | newRequire.isParcelRequire = true; 68 | newRequire.Module = Module; 69 | newRequire.modules = modules; 70 | newRequire.cache = cache; 71 | newRequire.parent = previousRequire; 72 | newRequire.register = function (id, exports) { 73 | modules[id] = [function (require, module) { 74 | module.exports = exports; 75 | }, {}]; 76 | }; 77 | 78 | var error; 79 | for (var i = 0; i < entry.length; i++) { 80 | try { 81 | newRequire(entry[i]); 82 | } catch (e) { 83 | // Save first error but execute all entries 84 | if (!error) { 85 | error = e; 86 | } 87 | } 88 | } 89 | 90 | if (entry.length) { 91 | // Expose entry point to Node, AMD or browser globals 92 | // Based on https://github.com/ForbesLindesay/umd/blob/master/template.js 93 | var mainExports = newRequire(entry[entry.length - 1]); 94 | 95 | // CommonJS 96 | if (typeof exports === "object" && typeof module !== "undefined") { 97 | module.exports = mainExports; 98 | 99 | // RequireJS 100 | } else if (typeof define === "function" && define.amd) { 101 | define(function () { 102 | return mainExports; 103 | }); 104 | 105 | // 22 | 23 |
24 |Hi, my name is Eddie and I am a pragmatic UI designer who has worked with dozens of businesses and some non-profit organizations. If you'd like me to help you with your next UI project, let's talk!
41 |