
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
claymorphism-css
Advanced tools
Extensible and configurable micro CSS class and SASS mixin for adding claymorphism styles to your components.
Extensible and configurable micro CSS util class and SASS mixin for adding claymorphism styles to your components.

Claymorphism is a fresh new concept. The name was coined by Michał Malewicz and the designers are excited to explore the possibilities of this approach to UI design.
It features inflated fluffy 3D elements which look charming and introduce a much more vibrant look compared to the usual flat designs.
What sets claymorphism apart from neumorphism is that it floats above the background instead of being connected to it, eliminating accessibility issues and design restrictions of the latter.
<link
rel="stylesheet"
href="https://unpkg.com/claymorphism-css/dist/clay.css"
/>
npm i claymorphism-css
yarn add claymorphism-css
Download and add the dist/clay.css or dist/clay.scss manually.
This is a minimal, single class CSS util that applies only basic claymorphism styles:
<div class="clay">
Fluffy ipsum dolor sit amet consectetur...
</div>

This CSS class allows you to easily change the claymorphic styles via CSS properies. These changes and additional styles should be applied with the extending class.
<div class="clay card">
Fluffy ipsum dolor sit amet consectetur...
</div>
.card{
/* Modify clay.css properties */
--clay-background: #f76d6d;
--clay-border-radius: 48px;
/* Extended styles */
color: #f1f1f1;
padding: 48px;
}

--clay-background
--clay-border-radius
--clay-shadow-outset
--clay-shadow-inset-primary
--clay-shadow-inset-secondary

SASS mixin allows you more flexibility in applying claymorphism styles to your components. For example, this way you can easily add styles to pseudo-elements or pseudo-selectors or use the mixin in other SASS mixins or functions.
@import "claymorphism-css/dist/clay.scss";
@import @include clay(
$background: [value],
$border-radius: [value],
$shadow-outset: [value],
$shadow-inset-primary: [value],
$shadow-inset-secondary: [value]
);
If you are using SASS, you can easily do it with the mixin. See the example above.
If you are using vanilla CSS and a util class, you cannot apply it to pseudo-elements and pseudo-selectors.
You'll have to apply the following styles manually. Check out the default values provided by the clay class.
background: [value];
border-radius: [value];
box-shadow: [value];
This is a relatively new and unexplored concept, so I didn't want to build an entire design system or a CSS framework that enforces styles on buttons. inputs, nav, cards and other elements, etc. and end up with accessibility issues and a framework that is hard to maintain.
I wanted to leave it unopinionated and simple, so its easily customizable and can be sprinkled throughout your project. This approach allows you full control over the styles and how you adapt them to your design.
I've built a demo page and it was really fun, useful and intuitive. CSS variables are easy to memorize and easily customizable.
If you enjoy using clay.css, please consider supporting the development of the project. Your name and link will appear here.
FAQs
Extensible and configurable micro CSS class and SASS mixin for adding claymorphism styles to your components.
The npm package claymorphism-css receives a total of 125 weekly downloads. As such, claymorphism-css popularity was classified as not popular.
We found that claymorphism-css demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.