UNPKG

leumas-react-flashlights

Version:

Simple CSS Flashlight effect for any Component or React Page, Perfect for Coming Soon Pages or any other creative website. Should not need any updates, but I might create more in the near future to compliment the Flashlight component

47 lines (41 loc) 855 B
* { padding: 0; margin: 0; box-sizing: border-box; font-family: 'Poppins', sans-serif; cursor: none; } .flashlight-container { position: relative; width: 100vw; height: 100vh; overflow: hidden; } .flashlight-content { font-size: 1em; text-align: justify; line-height: 1.8em; padding: 0.2em; } #flashlight { --Xpos: 50vw; --Ypos: 50vh; } #flashlight:before { content: ''; display: block; width: 100%; height: 100%; position: absolute; pointer-events: none; background: radial-gradient( circle 9em at var(--Xpos) var(--Ypos), rgba(0, 0, 0, 0), rgba(0, 0, 0, 1) ); } @media screen and (max-width: 500px) { .flashlight-content { font-size: 14px; } }