DEV Community

Cover image for Claymorphism on 2022šŸŽ (CSS only)
Preethiāš”
Preethiāš”

Posted on ā€¢ Edited on

9 3

Claymorphism on 2022šŸŽ (CSS only)

Hey There, Hope this new yearāœØ give you a fabulous moments. There are some trends for every year like Skeuomorphism āž”ļø Neumorphism āž”ļøGlassmorphism āž”ļøNow, The brand new trend is ClaymorphismšŸŽ‰.

Due to accessibility issues, Some trends can't be hero of the year in real-timešŸ˜„. Uh, Don't worry guys Claymorphism didn't make any accessibility issues.

Why ClaymorphismšŸ¤”

Really getting bored with flat designs and world excited for changing UI to 3D. From 2022, we introduce that 3D feel in web world. Sounds amazing rightāœØ and we can introduce this Claymorphism from pages to atom components. I care to save developer time and let's get this show on the roadšŸŽ‰.

Image description

Claymorphism made by 4 styles

  1. Light, pastel, and vivid colors
  2. Big rounded corners
  3. Double inner shadow
  4. Outer shadow

In-depth on box-shadow

box-shadow is the main guy for that magical shadow effect. So, we need aware of that.

Specify a single box-shadow using:

  • Two, three, or four values. If only two values are given, they are interpreted as offset-x and offset-y values. If a third value is given, it is interpreted as a blur-radius. If a fourth value is given, it is interpreted as a spread- radius.

To specify multiple shadows, provide a comma-separated list of shadows.

  • Optionally, the inset keyword.
  • Optionally, a color value.

Note: Claymorphism is made up of inner shadow and outer shadow

How do we create inner shadows

Itā€™s actually effortlessšŸ˜. We need to add special value inset before our shadow. This will inform our browser that this particular shadow is an inner shadow. By default, we create outer shadows. Below code snippet, illustrate the claymorphism made by one outer shadow and at least two inner shadows.

box-shadow: 24px 24px 48px rgba(174, 210, 236, 0.4),
    inset 12px 12px 24px #e7f2f9, inset -24px -24px 48px #b8d8ee;
Enter fullscreen mode Exit fullscreen mode

Now I thought, you are be likešŸ˜‰

Image description

Hey still with me. You really curious about trends like trend loversšŸ’–. So, it's my pleasure to give you the live experience and you will playing with that magical shadowsšŸŖ„.

Or you just fork my repositoryšŸŽ and practice in your own pace.

If you loved this blog, Then give an endearing heartšŸ’and drop your thought about this blogšŸ˜ which really a lot to me. I love the discussion with you, If you feel not comfortable at styling concepts or have any doubts.

Thanks for Reading!!
Preethi
- Make your CSS life easier

Image of Datadog

The Essential Toolkit for Front-end Developers

Take a user-centric approach to front-end monitoring that evolves alongside increasingly complex frameworks and single-page applications.

Get The Kit

Top comments (8)

Collapse
 
rhytham profile image
Rhytham ā€¢

It very Nice. It is very attractive for users. I love it :)

Collapse
 
atulcodex profile image
šŸš© Atul Prajapati šŸ‡®šŸ‡³ ā€¢

It is very useful and nice looking component :) I love it

Collapse
 
preethi_dev profile image
Preethiāš” ā€¢

Feel cheerfulšŸŽ‰ while see your comment. Hope we will meet on upcoming blogs.

Collapse
 
atulcodex profile image
šŸš© Atul Prajapati šŸ‡®šŸ‡³ ā€¢

why not :)

Collapse
 
raquelhortab profile image
raquelhortab ā€¢

Hi! Is there an actual CSS way to achieve the image in the header? That image has curved edges, in contrast to what is achieved here, which has flat edges. It makes quite a difference. It felt a bit like falling for a clickbait!
Thanks

Collapse
 
manchini profile image
Valerio Manchini ā€¢
Collapse
 
preethi_dev profile image
Preethiāš” ā€¢

well liked

Collapse
 
frontend profile image
frontend ā€¢

Here are some latest collection of claymorphism front-end.codes/claymorphism-design/

Postmark Image

Speedy emails, satisfied customers

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up

šŸ‘‹ Kindness is contagious

Please leave a ā¤ļø or a friendly comment on this post if you found it helpful!

Okay