Svelte / SuperForm - Checkbox value instead of boolean
I try to use checkboxs with SuperForm (and formFieldProxy).And i have some problems:i don't understand why i have no way (or don't find the one) to retrieve checkbox value instead of the checked...
View ArticleLaravel 12 Breeze with Svelte multiple file compiling in Vite not working
I am trying to add Svelte components to a Laravel Breeze setup that already has Bootstrap 5.3. The 'vite.config.js is setup and uses the build property to extract all assets to seperate files (this...
View ArticlePass Svelte Component as Props
I am pretty new to the svelte environment,I have some react code and try to convert them as svelte for the learning purpose.In the react, we can pass a string or React Node as...
View ArticleTouch event triggers `:hover` in Svelte [closed]
Hello, guys! I need some on :hover CSS changes to animate the component in Svelte project. I only need this behavior on devices with the pointer, I don't need touch events to trigger them. And I...
View ArticleIdiomatic way in Svelte to do two way binding with an intermediate...
Two way binding is great and elegant in Svelte, but a recurrent situation I've come across is needing two way binding with an intermediate transformation that converts types or does some kind of clean...
View ArticleSvelteKitError: Not found: /@vite/client
i have a SvelteKit Website with Skeleton as the UI kit.Locally everything works like a charm, but the moment i deploy to firebase hosting i get the following error:SvelteKitError: Not found:...
View ArticleExport function from Svelte component
Component.svelte:<script>export function test(){ return "test";}</script>App.svelte:<script> import { test } from "./Component.svelte" // error; let testValue =...
View ArticleSvelte 5 Error "Not implemented type annotation EmptyStatement" when using...
my coworker has got a really strange bug with svelte 5 where doing this works fine{#snippet test()}<span>Hello world</span>{/snippet}<div> {@render test()}</div>Adding...
View ArticlePrevent effect from being run intially
I noticed that in svelte effects run initially all the time, even tho dependencies do not change initially. import config from "config.svelte"; // it's an exported state var from a another file const...
View ArticleSet Leaflet marker to always stay in the middle of the map
I'm working on a SvelteKit project where we're moving from Google Maps to OpenStreetMap using Leaflet.js. With Google Maps we have a marker that always stays in the center of the map even when panning...
View ArticleConvert component inheritance syntax to Svelte 5 function component
I am migrating my codebase from Svelte 4 to Svelte 5.I had the following code:import MarkdownLinkRenderer from '$lib/MarkdownLinkRenderer.svelte';export function createMarkdownLinkRenderer(styles:...
View ArticleProvide a fallback icon when using @iconify/svelte for icons that may not be...
I am loading symbols dynamically from an API endpointI am using iconify/svelte to render iconsMy code below looks like this<script lang="ts"> import Icon from 'iconify/svelte'; type NewsItem = {...
View ArticleSvelte page.form is undefined when destructured
I am building a simple form component following the Svelte documentation, which says that I can access the form action data from an external component using the page state.When I destructure form from...
View ArticleSvelteMap not reactive
I'm trying to use SvelteMap: https://svelte.dev/docs/svelte/svelte-reactivity#SvelteMapbut for some reason it's not reactive.I am exporting it from a .svelte file:export const items = new...
View ArticleSvelte : Document Loaded inside onMount
I am new to Svelte. If understood what onMount does, it fires after components are loaded. If so, how do I call a function when all the images, and assets are available like window.load does? import {...
View ArticleHow to get the value of a streamed promise outside the scope of its await...
I have a +layout.server.ts that performs an API request and returns the data to its sibling +layout.svelte. Since this request can take a second or two, it's value is inside an await block in my Svelte...
View ArticleCloudflare subdomain address as separate access to main site
I used nginx for multiple web servers on a single public IP but...Now I have a different problem, I'd like to make a multisite with different subdomains, liketest.domain.comtest1.domain.comall...
View ArticleHow does the parent component re-execute a function after a Svelte child...
I have a svelte code.I want to implement a function that the parent component re-executes after the child component is updated.I am facing a problem now.After the child component is updated, the parent...
View ArticleSvelte: correct way to use type ReactiveValue< number | undefined > in a...
I'd like to make the following comparison:import { innerWidth } from 'svelte/reactivity/window';const breakPoint = 777;let screenIsBig: boolean = $derived(innerWidth >= breakPoint);However, this...
View ArticleSvelte onMount method does't wait for await
I have Firebase app with Svelte 5. Svelte is '5.17.5', @sveltejs/kit is '2.15.3', firebase is '11.2.0', vite is '6.0.7'. Here is method, it doesn't stop on await/async. What am I missing?Here is...
View Article