CSS Box Shadow जनरेटर

Design box shadows visually and get the CSS instantly. Supports multiple layers and presets.

तुरंत परिणाम ब्राउज़र में चलता है

Tip: Use 'Add Shadow' to build multi-layer shadows.

पूर्वावलोकन

पूर्वावलोकन background

प्रीसेट

उपयोग कैसे करें?

  1. 1
    मूल्यों को समायोजित करेंSet X/Y offset, blur, spread, color and opacity. Preview updates instantly.
  2. 2
    एकाधिक छायाएँ जोड़ेंClick 'Add Shadow' to layer additional shadows. Each is independently configurable.
  3. 3
    सीएसएस कॉपी करेंCopy the generated CSS and paste it into your project.

अक्सर पूछे जाने वाले प्रश्न

बॉक्स-छाया मान का क्या अर्थ है?
Syntax: offset-x | offset-y | blur-radius | spread-radius | color. The inset keyword moves the shadow inside the element.
एकाधिक छायाओं का उपयोग क्यों करें?
CSS box-shadow supports comma-separated multiple definitions for layered depth effects.
ब्राउज़र समर्थन कैसा है?
box-shadow is fully supported in all modern browsers. No vendor prefix required.

Box-shadow generator कैसे CSS shadow बनाता है?

यह box-shadow generator CSS box-shadow property के लिए live preview और copyable code देता है। हर shadow layer में X offset, Y offset, blur, spread, color, opacity और inset option होता है। Sliders से values बदलते ही preview box और CSS output update होते हैं। Add button नई layer जोड़ता है, और एक से अधिक layers होने पर layer remove की जा सकती है। Output comma-separated layers के साथ पूरा box-shadow: ...; rule देता है।

Tool color को HEX से RGB में बदलकर opacity के साथ rgba(...) format में लिखता है। X offset negative हो तो shadow left तरफ जाती है, positive हो तो right तरफ। Y offset positive हो तो shadow नीचे दिखती है, negative हो तो ऊपर। Blur radius edge softness बढ़ाता है। Spread positive हो तो shadow area बड़ा होता है, negative हो तो compact दिखता है। Inset enabled होने पर shadow element के अंदर बनती है, जो pressed या recessed effect के लिए उपयोगी है।

Presets और multi-layer shadows

Preset buttons subtle, medium, large, dramatic, inset, colored, material, neon जैसे common styles जल्दी लागू करते हैं। Subtle shadow cards और inputs के लिए हल्का elevation देता है। Dramatic shadow hero object या modal focus के लिए अधिक मजबूत effect बनाता है। Material preset दो layers से depth बनाता है, जबकि neon preset colored glow effect देता है। Multi-layer shadows अधिक natural दिख सकती हैं क्योंकि real world में ambient और direct shadow अलग-अलग softness रखती हैं।

Preview background color भी बदला जा सकता है, जिससे shadow को light, muted या colored surface पर जांचा जा सके। White card पर जो shadow ठीक दिखती है, वह dark background पर गायब या बहुत harsh लग सकती है। इसलिए component library में shadow token बनाते समय surface color, border, radius और hover state के साथ test करें। केवल isolated preview पर निर्भर रहने से real UI में elevation hierarchy inconsistent हो सकती है।

Performance, readability और design consistency

Box-shadow layout नहीं बदलता, लेकिन large blur और कई layers rendering cost बढ़ा सकते हैं। सामान्य cards, dropdowns और modals में यह ठीक रहता है; बहुत सारे list items पर heavy shadow लगाने से scrolling performance प्रभावित हो सकती है। Mobile devices पर dramatic shadows और neon glows को संयम से उपयोग करें। यदि shadow purely decorative है, तो contrast और focus indicator को shadow पर निर्भर न रखें। Keyboard focus के लिए स्पष्ट outline या border state अलग से होना चाहिए।

Generated CSS को सीधे copy किया जा सकता है, लेकिन design system में semantic tokens बेहतर होते हैं, जैसे --shadow-sm, --shadow-md या --shadow-focus। इससे project में elevation scale consistent रहता है। Inset shadow, outer shadow और colored glow को अलग roles दें। Accessibility के लिए shadow को information का एकमात्र संकेत न बनाएं; disabled, selected या error state में color, border, text और icon जैसे अतिरिक्त संकेत भी रखें।

टिप्पणियां