All Projects → codeAdrian → clay.css

codeAdrian / clay.css

Licence: other
Easily add claymorphic styles to any HTML element with this micro class and SASS mixin.

Programming Languages

SCSS
7915 projects

Projects that are alternatives of or similar to clay.css

Secureuxtheme
🎨 A secure boot compatible in-memory UxTheme patcher
Stars: ✭ 586 (+33.49%)
Mutual labels:  customization, style
Boston-Icons
Boston is an exclusive icon theme inspired by functionalist design and a touch of early computer icons. The project is focused on elemental properties, basic shapes, a reduced color palette and visual hierarchy.
Stars: ✭ 106 (-75.85%)
Mutual labels:  customization
CustomWebRadioButton
An example of a make radio-button design on the web.
Stars: ✭ 15 (-96.58%)
Mutual labels:  style
stargan2
StarGAN2 for practice
Stars: ✭ 89 (-79.73%)
Mutual labels:  style
scoper
A polyfill for scoped HTML styles elements
Stars: ✭ 79 (-82%)
Mutual labels:  style
djadmin
Djadmin is a django admin theme
Stars: ✭ 42 (-90.43%)
Mutual labels:  customization
Neural-Tile
A better tiling script for Neural-Style
Stars: ✭ 35 (-92.03%)
Mutual labels:  style
EditorConfig-Action
🔎A GitHub Action to check, enforce & fix EditorConfig style violations
Stars: ✭ 40 (-90.89%)
Mutual labels:  style
retired comedy phrases
A Casual Spreadsheets resource
Stars: ✭ 13 (-97.04%)
Mutual labels:  style
dots
Configuration file for linux distro
Stars: ✭ 37 (-91.57%)
Mutual labels:  customization
lipgloss
Style definitions for nice terminal layouts 👄
Stars: ✭ 5,453 (+1142.14%)
Mutual labels:  style
bureau
💻 Informative and fast ZSH prompt with git status. Works well with HUGE repositories. Show username, hostname, path, git branch and status.
Stars: ✭ 27 (-93.85%)
Mutual labels:  customization
theme-ui-native
Build consistent, themeable React Native apps based on constraint-based design principles
Stars: ✭ 67 (-84.74%)
Mutual labels:  style
MMSegmentControl
A custom segmented control for iOS applications.
Stars: ✭ 13 (-97.04%)
Mutual labels:  customization
react-native-bootstrap-styles
Bootstrap style library for React Native
Stars: ✭ 95 (-78.36%)
Mutual labels:  style
Personal-Emotional-Stylized-Dialog
A Paper List for Personalized, Emotional, and stylized Dialog
Stars: ✭ 112 (-74.49%)
Mutual labels:  style
storybook-addon-paddings
🔲 A Storybook addon to add different paddings to your preview
Stars: ✭ 30 (-93.17%)
Mutual labels:  style
AndroidThemeChange
Android 主题更换Demo,Android 4.4 和5.0以上系统,使用不同方案。
Stars: ✭ 17 (-96.13%)
Mutual labels:  style
Edit-About
Customize your About This Mac!
Stars: ✭ 40 (-90.89%)
Mutual labels:  customization
MediaFlyout
Windows 10+ Media Control Taskbar Flyout
Stars: ✭ 87 (-80.18%)
Mutual labels:  customization

clay.css

Extensible and configurable micro CSS util class and SASS mixin for adding claymorphism styles to your components.

clay.css - Helps you create inflated fluffy 3D claymorphic HTML shapes | Product Hunt

About

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.

Installation

CDN

<link
  rel="stylesheet"
  href="https://unpkg.com/claymorphism-css/dist/clay.css"
/>

NPM

npm i claymorphism-css
yarn add claymorphism-css

Manual

Download and add the dist/clay.css or dist/clay.scss manually.

Usage

This is a minimal, single class CSS util that applies only basic claymorphism styles:

  • Background
  • Border radius
  • One outset shadow
  • Two inset shadows
<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;
}

Options (CSS Variables)

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

SASS Mixin

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]
);

FAQ

How do I apply claymorphism styles to pseudo-elements or pseudo-selectors?

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];

Why not build the entire framework / design system?

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.

Sponsors

If you enjoy using clay.css, please consider supporting the development of the project. Your name and link will appear here.

Become a sponsor!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].