A modern and interactive web tool for generating CSS shadows (box-shadow) and Dart/Flutter code (BoxShadow) visually.
- Real-time Preview: Instant preview of changes
- Multiple Layers: Create complex shadows with multiple layers
- Full Control: Adjust X, Y, blur, spread, color and opacity
- Inset Support: Inner shadows with automatic Flutter package suggestion
- Gradients: Linear and radial with multiple color stops
- Custom Shape: Adjust border-radius and padding
- Presets: Ready-made templates (Soft, Neumorphism, Glass)
- CSS: Ready-to-use code with prefixes (-webkit, -moz)
- Dart/Flutter: Formatted BoxShadow and BoxDecoration
- Tailwind: Arbitrary utility classes
- Smart Copy: Context-sensitive button (CSS/Dart/Tailwind)
| Technology | Usage |
|---|---|
| Svelte 5 | Reactive UI with runes ($state, $derived) |
| TypeScript | Typed state, logic and components |
| Vite | Dev server and production build |
| CSS3 | Variables, Grid, Flexbox, Animations, Glassmorphism |
| Vitest | Unit tests for the pure logic core |
This project was developed with accessibility in mind:
- Skip Link: Quick navigation for keyboard users
- Semantic Landmarks:
main,header,footer,nav,aside - ARIA Roles: Tabs with
role="tablist"androle="tabpanel" - Descriptive Labels: All buttons and links with
aria-label - Focus Visible: Enhanced focus indicators
- Hidden Decoratives:
aria-hidden="true"on visual elements
A pure, framework-free logic core with a thin reactive UI on top:
src/
βββ App.svelte # Layout composition
βββ main.ts # Mounts the app
βββ lib/
βββ shadow.ts # Pure state + code generation (CSS/Dart/Tailwind)
βββ shadow.test.ts # Unit tests (no DOM)
βββ state.svelte.ts # $state singleton + actions
βββ types.ts
βββ config/controls.ts
βββ components/ # Control, LayerList, BackgroundPanel, CodeOutput, β¦
For complete technical details, see ARCHITECTURE.md.
Visit layeredshade.netlify.app
git clone https://github.com/Franklyn-R-Silva/Layered-Shade.git
cd Layered-Shade
npm install
npm run dev # http://localhost:5173Build for production with npm run build (output in dist/) and preview it with npm run preview.
npm install # Install dependencies
npm test # Run tests
npm run test:coverage # Run with coverage
npm run check # Type-check (svelte-check)
npm run lint # Check code styleAutomated tests target the pure logic core (src/lib/shadow.ts) β state mutations and the
CSS/Dart/Tailwind generators β which have no DOM dependency and are covered at ~99%. The Svelte
components are verified via svelte-check and manual testing.
- Flutter
inset: Flutter's nativeBoxShadowhas no inset. When "inset" is enabled, the generated Dart emits a note that theflutter_inset_box_shadowpackage is required. - Multiple background gradients in Flutter:
BoxDecorationaccepts only one gradient, so the Dart export uses the top gradient layer. CSS/Tailwind export all layers.
- Fork the project
- Create your branch (
git checkout -b feature/NewFeature) - Commit your changes (
git commit -m 'Add new feature') - Push to the branch (
git push origin feature/NewFeature) - Open a Pull Request
See CONTRIBUTING.md for detailed guidelines.
Franklyn R. Silva
- GitHub: @Franklyn-R-Silva
- LinkedIn: franklyn-roberto-dev
This project is licensed under the MIT License.
β If this project was helpful, consider giving it a star!

