DevPlatform
Home
Components
Search
Submit
Earn
Login
Sign Up Free
Dark Scene - Preview | DevPlatform
DevPlatform
Categories
Accordion
Animation
Box Shadow
Button
Card
Footer
Form
Gallery
Hero Section
Inputs
Loader
Marquee
Modal
Modules
Navbar
Progress Bar
Radio Buttons
Search-Bar
Sections
Slider
Tab
Timeline
Toggle
Dark Scene
rohit
Feb 13, 2026
14
0
Share
Live Preview
Refresh
Live Editor
HTML
CSS
JS
HTML
CSS
JavaScript
1
<div class="settings-card"> <div class="header"> <span class="back">←</span> <h3>Mobile Settings</h3> <span class="gear">⚙</span> </div> <div class="content"> <div class="sun">☀</div> <div class="toggle moon-toggle"> <span>🌙</span> </div> <div class="bottom-section"> <div class="dark-btn">Dark Mode</div> <div class="switch"> <div class="knob"></div> <span class="off">OFF</span> </div> </div> </div> </div>
1
body { margin: 0; height: 100vh; background: linear-gradient(135deg, #5a6473, #7d8794); display: flex; justify-content: center; align-items: center; font-family: Arial, sans-serif; } /* Card */ .settings-card { width: 340px; height: 300px; /* 👈 Fixed height */ padding: 20px; border-radius: 25px; background: linear-gradient(145deg, #1f2a38, #141c27); box-shadow: 20px 20px 40px rgba(0,0,0,0.4), -10px -10px 20px rgba(255,255,255,0.05); color: white; display: flex; flex-direction: column; justify-content: space-between; /* Content properly spread */ } /* Header */ .header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; } .header h3 { margin: 0; font-weight: 500; } .back, .gear { font-size: 18px; opacity: 0.8; } /* Content */ .content { text-align: center; flex: 1; display: flex; flex-direction: column; justify-content: space-around; } /* Sun */ .sun { font-size: 60px; margin-bottom: 20px; color: #ffcc33; text-shadow: 0 0 20px #ffcc33, 0 0 40px #ff9900; } /* Moon Toggle */ .toggle { width: 140px; margin: 0 auto 30px; padding: 10px; border-radius: 30px; background: linear-gradient(145deg, #1b2431, #0f1621); box-shadow: inset 5px 5px 10px rgba(0,0,0,0.6), inset -5px -5px 10px rgba(255,255,255,0.05); cursor: pointer; } .toggle span { font-size: 22px; } /* Bottom section */ .bottom-section { display: flex; justify-content: space-between; align-items: center; } /* Dark button */ .dark-btn { padding: 12px 20px; border-radius: 30px; background: linear-gradient(145deg, #1b2431, #0f1621); box-shadow: 5px 5px 10px rgba(0,0,0,0.6), -5px -5px 10px rgba(255,255,255,0.05); font-size: 14px; } /* Switch */ .switch { position: relative; width: 100px; height: 40px; background: #0f1621; border-radius: 30px; box-shadow: inset 5px 5px 10px rgba(0,0,0,0.6), inset -5px -5px 10px rgba(255,255,255,0.05); display: flex; align-items: center; padding: 5px; } .knob { width: 30px; height: 30px; background: white; border-radius: 50%; transition: 0.3s; } .off { position: absolute; right: 12px; font-size: 12px; opacity: 0.7; }
1
Comments
0
Want to comment?
Please
login
or
sign up
to post comments.
No comments yet
Be the first to comment on this component!
Comments 0
Want to comment?
Please login or sign up to post comments.
No comments yet
Be the first to comment on this component!