Shadows for UI elements

Hello!

A little feature I would love to see in USS is a shadow property, like the one available in CSS, primarily box-shadow (but text-shadow would also be very cool!). Is it planned sometime in the future? Personally I like to make flat UI with hard “shadows” and sure, it could be done with two VisualElements right now but it feels like it could be prone to layout problems and be a bit clunky to work with. It would be awesome to have it as a property. :slight_smile:

As a bonus question, is there a way to see the planned properties, if any new is on the way? I’ve checked the roadmaps a few times but it’s mostly the general stuff and no new styling properties.

6 Likes

Noted :slight_smile:

We don’t have a detailed list of upcoming properties. We’ll look into that once we’re done with the move into a package.

Cheers,

5 Likes

I really have to second this. it’d fix an issue unity’s previous UI systems have all had

+1

Allowing us to specify HDR colors would also be great, as it could allow us to make UI elements glow.

1 Like

the color picker should just have an HDR/LDR toggle (when not specified by a ColorUsageAttribute or specific use cases)

+1

Designers love giving UI elements a shadow and at the moment it is only possible to mock shadowds with borders and transparency does not work on borders.

Yes, drop shadows are very important in the modern UI.

Quick update - text-shadow is now supported.

Preliminary documentation here:

3 Likes

That is a great thing, but I sure hope it doesn’t stop there! Personally, I’d rather have shadows on my backgrounds than on my text.

We’re investigating box shadow and background effects in general, trying to find the right balance between flexibility and performance. Stay tuned!

5 Likes

yes, background with round corners, gradients, shadow etc

+1 This would be amazing

Would be good to have separate quads for shadows because right now they barely usable, you can’t use big distance without shadows beign clipped.

Any update on this?

3 Likes

Thanks for keeping us honest :slight_smile:

Unfortunately, no update on this front just yet. These effects depend on changes we need to bring to our rendering system to also enable styling features like z-index, and we’ve been working on other features since my last post on this thread (transitions, transforms, crisp rendering without multisampling, and so on).

6 Likes

Is there any update on this? I am converting my project over to Unity Toolkit UI for the greater efficiency it should provide. I was using True Shadow which creates great shadows on the old UI system:

https://assetstore.unity.com/packages/tools/gui/true-shadow-ui-soft-shadow-and-glow-beta-176322

But I will need some similar system in Unity Toolkit UI for my project to be viable in it. Do you have any ETA or best guesses on when this will be done?

+1

+1

+1

@etienne_unity , thank you very much for the transparency.
This item is extremely important, the possibilities for the layout are expanded in unimaginable ways