TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

I made a smooth shadows generator

229 pointsby marttilainealmost 2 years ago

25 comments

jimvdvalmost 2 years ago
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).
评论 #36409382 未加载
marttilainealmost 2 years ago
As mentioned in the sidebar, this tool is inspired by <a href="https:&#x2F;&#x2F;shadows.brumm.af&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;shadows.brumm.af&#x2F;</a><p>I&#x27;ve used it a lot, but it always lacked a few features I would&#x27;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&#x27;t looked deeply into how this layering technique works.
评论 #36406600 未加载
Etherytealmost 2 years ago
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&#x27;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.
评论 #36402754 未加载
tuzemecalmost 2 years ago
Another similar tool with the same source of inspiration (both are pretty cool):<p><a href="https:&#x2F;&#x2F;www.joshwcomeau.com&#x2F;shadow-palette&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;www.joshwcomeau.com&#x2F;shadow-palette&#x2F;</a>
评论 #36404072 未加载
karaterobotalmost 2 years ago
Just wanted to say that the &quot;copy Figma layer&quot; option is a really neat touch.<p>If it were me, I&#x27;d make all those copy buttons more prominent: at first I didn&#x27;t see them, and assumed I was expected to inspect the page using developer tools to grab the CSS values.
pixelpoetalmost 2 years ago
Brilliant old article on this from Michael Herf (the guy behind Picasa and f.lux) 2001: <a href="http:&#x2F;&#x2F;stereopsis.com&#x2F;shadowrect&#x2F;" rel="nofollow noreferrer">http:&#x2F;&#x2F;stereopsis.com&#x2F;shadowrect&#x2F;</a>
matt3210almost 2 years ago
Adds lots of frames to the back button history… not that bad but very irritating
评论 #36402232 未加载
Kiroalmost 2 years ago
What is &quot;smooth&quot; referring to? Looks a regular box shadow to me.
评论 #36402412 未加载
评论 #36403141 未加载
评论 #36402258 未加载
alexghralmost 2 years ago
This is super cool and I&#x27;m definitely bookmarking it for later use :)<p>I&#x27;d suggest moving the &quot;copy css&#x2F;figma&#x2F;link&quot; 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.
评论 #36402548 未加载
arek_nawoalmost 2 years ago
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 &quot;Library&quot; part is a great addition.<p>One thing is the history handling - with every change writing a new URL to the history - it&#x27;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.
kimmkalmost 2 years ago
Nice generator! I&#x27;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.
jansanalmost 2 years ago
The first time I saw these layered shadows was in AngularJS Material design whiteframes ( <a href="https:&#x2F;&#x2F;material.angularjs.org&#x2F;latest&#x2F;demo&#x2F;whiteframe" rel="nofollow noreferrer">https:&#x2F;&#x2F;material.angularjs.org&#x2F;latest&#x2F;demo&#x2F;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!
naetalmost 2 years ago
It could be cool to add a feature around different &quot;heights&quot; like this one: <a href="https:&#x2F;&#x2F;www.joshwcomeau.com&#x2F;shadow-palette&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;www.joshwcomeau.com&#x2F;shadow-palette&#x2F;</a><p>You almost have something like that in the library of different shadows.<p>Having a couple different heights is something I&#x27;ve used a lot.
FrostKiwialmost 2 years ago
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 &#x27;writeText&#x27;) 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 ```
hlammersalmost 2 years ago
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;
riddleyalmost 2 years ago
This is very cool. On Linux + Firefox (102.12.0esr) I&#x27;m seeing &quot;navigator.clipboard is undefined&quot; 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.
Gordonjcpalmost 2 years ago
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.
nielsbotalmost 2 years ago
I think the title should mention this is a <i>CSS</i> smooth shadows generator. I assumed it was more general purpose before I clicked through.
GrumpyNlalmost 2 years ago
One remark, when you copy the css and make a change and copy the css again, it doesnt show the changes in the copied css.
评论 #36403595 未加载
nailloalmost 2 years ago
Feels like we&#x27;re back to 2012 again
评论 #36405067 未加载
aviperlalmost 2 years ago
On chrome on a phone, selecting Linear does not work, and after selecting it, no changes are possible.<p>Looks great!
评论 #36402980 未加载
Nars088almost 2 years ago
Can play with the layered shadows all day!
luke-stanleyalmost 2 years ago
Is this intended to solve gradient banding?
评论 #36404716 未加载
splatzonealmost 2 years ago
Really cool, and I can see my designer friends enjoying this.<p>My only gripe is that it seems to break my back button in Firefox
评论 #36402070 未加载
samstavealmost 2 years ago
I dont personally have a use for this - but I still find it quite awesome!