This is very cool! One suggestion: I would like to be able to see the generated CSS live so I can learn how the effect is actually created and how playing with options modify the output (could not find an option on mobile).
As mentioned in the sidebar, this tool is inspired by <a href="https://shadows.brumm.af/" rel="nofollow noreferrer">https://shadows.brumm.af/</a><p>I've used it a lot, but it always lacked a few features I would've used extensively, such as shareable links, copying to Figma with a button click, ability to change the background color, and a library of ready-made shadows. Also, I think the terminology is perhaps a bit clearer for someone who hasn't looked deeply into how this layering technique works.
Do note that while modern browsers are pretty performant with this, the more you stack shadows the more your low end users pay for it. I can't recall which large site ran into it a few years ago, but the short gist is they struggled with scroll performance and in the end stacked shadows were to blame.
Another similar tool with the same source of inspiration (both are pretty cool):<p><a href="https://www.joshwcomeau.com/shadow-palette/" rel="nofollow noreferrer">https://www.joshwcomeau.com/shadow-palette/</a>
Just wanted to say that the "copy Figma layer" option is a really neat touch.<p>If it were me, I'd make all those copy buttons more prominent: at first I didn't see them, and assumed I was expected to inspect the page using developer tools to grab the CSS values.
Brilliant old article on this from Michael Herf (the guy behind Picasa and f.lux) 2001: <a href="http://stereopsis.com/shadowrect/" rel="nofollow noreferrer">http://stereopsis.com/shadowrect/</a>
This is super cool and I'm definitely bookmarking it for later use :)<p>I'd suggest moving the "copy css/figma/link" buttons to the right panel or at least making them more obvious (maybe by increasing contrast?) as I had trouble figuring out how to export the shadow I made.
This is really nice! Well-designed and can really help with creating box-shadows in CSS (which, on a side-note, is a real pain!).<p>I have personally long given up on trying to create a perfect shadow in CSS and just use those available online or in libraries like Tailwind CSS. With that, the "Library" part is a great addition.<p>One thing is the history handling - with every change writing a new URL to the history - it's really inconvenient for the user who, in most cases, just wants to go back to entirely different page. Consider changing that to not affect the history state.
Nice generator! I'm not much of an UI or web designer, but I guess this is a common design task in those contexts. Presets for corner roundness are nice, but there could also be a slider for it.
The first time I saw these layered shadows was in AngularJS Material design whiteframes ( <a href="https://material.angularjs.org/latest/demo/whiteframe" rel="nofollow noreferrer">https://material.angularjs.org/latest/demo/whiteframe</a> ), which have a few fixed levels of elevation. I always wondered if it would be to generate these shadows continously, and here we go. Great work!
It could be cool to add a feature around different "heights" like this one: <a href="https://www.joshwcomeau.com/shadow-palette/" rel="nofollow noreferrer">https://www.joshwcomeau.com/shadow-palette/</a><p>You almost have something like that in the library of different shadows.<p>Having a couple different heights is something I've used a lot.
Cool site. None of the copy buttons work though on both Firefox and Chrome:<p>```
app.js:450 Uncaught TypeError: Cannot read properties of undefined (reading 'writeText')
at Object.onClick [as clickfalse] (app.js:450:29)
at HTMLButtonElement.d (preact.min.js:1:4668)
onClick @ app.js:450
d @ preact.min.js:1
```
Those shadows are smooth indeed, very cool project!<p>Small suggestion is to make the box to which the shadow is applied resizable. How we want the shadow to look often depends on the size of the element to which it is applied.<p>Could be as simple as adding this CSS to the box: resize: both; overflow: auto;
This is very cool. On Linux + Firefox (102.12.0esr) I'm seeing "navigator.clipboard is undefined" on line 450 when clicking Copy To Clipboard.<p>I second the suggestion to display the CSS so you can see what changes as you use the UI.
Turning the blur down, changing the shadow to a nice bright colour, turning up the number of layered shadows, and then wibbling the X and Y parameters around gives a nice oldschool Winamp Milkdrop plugin rotozoomer type effect.