-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNeumorphism-UI-Elements.html
More file actions
407 lines (355 loc) · 9.37 KB
/
Copy pathNeumorphism-UI-Elements.html
File metadata and controls
407 lines (355 loc) · 9.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Neumorphism UI</title>
<style>
/* Basic styling */
body {
margin: 0;
padding: 0;
font-family: Arial, sans-serif;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
background-color: #e0e0e000; /* Light mode background */
transition: background-color 0.3s ease;
}
.container {
display: flex;
/* flex-direction: column; */
flex-wrap: wrap;
gap: 20px;
width: 80dvw;
background-color: #F0F0F0;
padding: 40px;
border-radius: 30px;
align-items: center;
justify-content: center;
box-shadow: 10px 10px 20px #c7c7c7, -10px -10px 20px #FFFFFF;
}
/* Neumorphic styling */
.neumorphic {
border-radius: 15px;
background: #F0F0F0;
box-shadow: 10px 10px 20px #c7c7c7, -10px -10px 20px #FFFFFF;
transition: all 0.3s ease;
}
.neumorphic.inset {
box-shadow: inset 5px 5px 10px #c7c7c7, inset -5px -5px 10px #FFFFFF;
}
/* Search and Password Fields */
.search-field input, .password-field input {
width: 180px;
padding: 10px;
border: none;
outline: none;
background-color: transparent;
font-size: 16px;
color: #707070;
border-radius: 20px;
}
.search-field, .password-field {
width: 220px;
height: 50px;
box-shadow: inset 5px 5px 10px #c7c7c7, inset -5px -5px 10px #FFFFFF;
}
/* Circle Icon Buttons */
.icon-container {
display: flex;
gap: 15px;
}
.neumorphic-icon {
background-color: #F0F0F0;
width: 70px;
height: 70px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
/* box-shadow: inset 5px 5px 10px #c7c7c7, inset -5px -5px 10px #FFFFFF; */
position: relative;
}
.inset{
box-shadow: inset 5px 5px 10px #c7c7c7, inset -5px -5px 10px #FFFFFF;
}
.outset {
box-shadow: 10px 10px 20px #c7c7c7, -10px -10px 20px #FFFFFF;
}
.heart-icon::before, .star-icon::before, .price-tag-icon::before {
font-size: 24px;
}
.heart-icon::before {
content: "\2665";
color: #FF7070;
}
.star-icon::before {
content: "\2605";
color: #FFD700;
}
.price-tag-icon::before {
content: "\1F3F7";
color: #707070;
}
/* Square Buttons */
.button-container {
display: flex;
gap: 15px;
}
.neumorphic-button {
width: 120px;
height: 50px;
border: none;
border-radius: 15px;
background: #F0F0F0;
box-shadow: 10px 10px 20px #c7c7c7, -10px -10px 20px #FFFFFF;
font-size: 16px;
color: #707070;
cursor: pointer;
transition: box-shadow 0.3s ease;
}
.neumorphic-button:active {
box-shadow: inset 5px 5px 10px #c7c7c7, inset -5px -5px 10px #FFFFFF;
}
/* Toggle Button */
.neumorphic-toggle {
width: 60px;
height: 30px;
background-color: #F0F0F0;
border-radius: 20px;
position: relative;
box-shadow: inset 5px 5px 10px #c7c7c7, inset -5px -5px 10px #FFFFFF;
}
.toggle-checkbox {
display: none;
}
.toggle-label {
width: 30px;
height: 30px;
background-color: #B388FF;
border-radius: 50%;
position: absolute;
top: 0;
left: 0;
transition: 0.3s ease;
box-shadow: 5px 5px 10px #c7c7c7, -5px -5px 10px #FFFFFF;
}
.toggle-checkbox:checked + .toggle-label {
left: 30px;
}
/* Volume Sliders */
.volume-container {
display: flex;
gap: 20px;
}
.volume-slider {
width: 140px;
height: 50px;
border-radius: 20px;
box-shadow: inset 5px 5px 10px #c7c7c7, inset -5px -5px 10px #FFFFFF;
display: flex;
align-items: center;
justify-content: center;
}
.slider {
width: 100px;
appearance: none;
background-color: #D1D1D1;
height: 5px;
border-radius: 5px;
outline: none;
}
.slider::-webkit-slider-thumb {
width: 20px;
height: 20px;
background-color: #B388FF;
border-radius: 50%;
box-shadow: 5px 5px 10px #c7c7c7, -5px -5px 10px #FFFFFF;
}
/* Bottom UI Elements */
.bottom-ui {
display: flex;
gap: 20px;
}
.msg-icon {
display: flex;
align-items: center;
justify-content: center;
position: relative;
width: 120px;
height: 60px;
border-radius: 20px !important;
box-shadow: 10px 10px 20px #c7c7c7, -10px -10px 20px #FFFFFF;
}
.icon-msg::before, .icon-person::before, .chat-bubble::before, .heart-filled::before, .menu::before {
font-size: 24px;
}
.icon-msg::before {
content: "\1F464";
color: #707070;
}
.icon-person::before {
position: absolute;
right: -10px;
top: -10px;
color: #B388FF;
}
.chat-bubble::before {
content: "\1F4AC";
font-size: 24px;
color: #707070;
}
.heart-filled::before {
content: "\2665";
font-size: 24px;
color: #B388FF;
}
.menu::before {
content: "\2630";
font-size: 24px;
color: #707070;
}
.manu {
box-shadow: 10px 10px 20px #c7c7c7, -10px -10px 20px #FFFFFF;
}
/* Neumorphic-Element2 styling */
.neumorphic-element2 {
display: flex;
align-items: center;
justify-content: center;
width: 60px;
height: 60px;
border-radius: 10px;
background-color: #F0F0F0;
box-shadow: 10px 10px 20px #C7C7C7, -10px -10px 20px #FFFFFF;
transition: all 0.3s ease;
}
/* Mode Switch */
.mode-switch button {
padding: 10px 20px;
background-color: #FF8A80;
color: #fff;
border: none;
border-radius: 10px;
cursor: pointer;
}
/* Dark Mode */
body.dark-mode {
background-color: #1c1c1c;
}
body.dark-mode .container {
background-color: #2c2c2c;
box-shadow: 10px 10px 20px #121212, -10px -10px 20px #393939;
}
body.dark-mode .neumorphic {
background-color: #2c2c2c;
box-shadow: 10px 10px 20px #121212, -10px -10px 20px #393939;
}
body.dark-mode .neumorphic-element2 {
background-color: #2C2C2C;
box-shadow: 10px 10px 20px #1A1A1A, -10px -10px 20px #3C3C3C;
}
body.dark-mode .neumorphic.inset {
box-shadow: inset 5px 5px 10px #121212, inset -5px -5px 10px #393939;
}
body.dark-mode .neumorphic-icon{
background-color: #2c2c2c;
box-shadow: 10px 10px 20px #121212, -10px -10px 20px #393939;
}
body.dark-mode .neumorphic-icon::before {
color: #B388FF;
}
body.dark-mode .neumorphic-button {
background-color: #2c2c2c;
box-shadow: 10px 10px 20px #121212, -10px -10px 20px #393939 !important;
color: #B388FF;
}
body.dark-mode .neumorphic-button:active {
box-shadow: inset 5px 5px 10px #121212, inset -5px -5px 10px #393939;
}
body.dark-mode .toggle-label {
background-color: #B388ff;
box-shadow: 5px 5px 10px #121212, -5px -5px 10px #393939;
}
body.dark-mode .neumorphic-toggle{
box-shadow: inset 5px 5px 10px #121212, inset -5px -5px 10px #393939;
background-color: #2c2c2c;
}
body.dark-mode .slider {
background-color: #707070;
}
body.dark-mode .mode-switch button {
background-color: #FF7070;
}
</style>
</head>
<body class="light-mode">
<div class="container">
<!-- Search Field -->
<div class="neumorphic search-field">
<input type="text" placeholder="Search">
</div>
<!-- Password Field -->
<div class="neumorphic password-field">
<input type="password" placeholder="Password">
</div>
<br>
<!-- Circle Icon Buttons (Heart, Star, Price Tag) -->
<div class="icon-container">
<div class="neumorphic-icon inset heart-icon"></div>
<div class="neumorphic-icon inset star-icon"></div>
<div class="neumorphic-icon inset price-tag-icon"></div>
</div>
<br>
<!-- Rectangle Buttons -->
<div class="button-container">
<button class="neumorphic-button">Button 1</button>
<button class="neumorphic-button">Button 2</button>
<button class="neumorphic-button">Button 3</button>
</div>
<br>
<!-- Toggle Button -->
<div class="neumorphic-toggle">
<input type="checkbox" id="toggle" class="toggle-checkbox">
<label for="toggle" class="toggle-label"></label>
</div>
<!-- Volume Sliders -->
<div class="volume-container">
<div class="neumorphic volume-slider">
<input type="range" min="0" max="100" value="50" class="slider">
</div>
<div class="neumorphic volume-slider">
<input type="range" min="0" max="100" value="70" class="slider">
</div>
</div>
<br>
<!-- Bottom UI Elements -->
<div class="bottom-ui">
<div class="neumorphic-icon msg-icon">
<div class="icon-msg"></div>
<div class="icon-person"></div>
</div>
<div class="neumorphic-icon outset chat-bubble"></div>
<div class="neumorphic-icon outset heart-filled"></div>
<div class="neumorphic-icon outset menu"></div>
</div>
<!-- Bottom UI Elements -->
<div class="neumorphic-element2 chat-bubble"></div>
<div class="neumorphic-element2 heart-filled"></div>
<div class="neumorphic-element2 menu"></div>
<div class="btn"></div>
<!-- Mode Switch -->
<div class="mode-switch">
<button onclick="toggleMode()">Toggle Dark/Light Mode</button>
</div>
</div>
<script>
function toggleMode() {
document.body.classList.toggle('dark-mode');
document.body.classList.toggle('light-mode');
}
</script>
</body>
</html>