Question about Svelte's reactive statements with typescript
I got the TS2695 error in this code.<script lang="ts"> let count = 0; $: count, (() => { console.log(`TEST: ${count}`); })();</script>The error was the below.Left side of comma operator...
View ArticleGoJS `diagram.model.toJson()` is not not updating after change
I am using SvelteKit and GoJSI've declared let diagram; before onMount(), and defined diagram = new go.Diagram('Diagram'); inside onMount()and all other details after that,...
View ArticleHow to use vite plugin $env or $lib alias in Svelte project
I'm using the Svelkit project.When importing modules from Sveltkit, path aliases such as $lib and $env are often used.However, when using a separate vite plugin that is not included within the Sveltkit...
View ArticleAre Svelte and SvelteKit static adapter the same?
I have two projects here:Created using npm create vite app-with-svelte -- -t svelte-tsCreated using npm create svelte app-with-sveltekit (Skeleton project)Then, I use the static adapter with it,...
View ArticleSvelte: Times New Roman Font Not Applying to Mathematical Expressions in...
I'm customizing the OpenWebUI project, which uses Svelte for the frontend, and I want to display mathematical expressions (numbers, variables, and operators) in Times New Roman font. However, despite...
View ArticleCreating a writable svelte store from loaded page data in sveltekit
Using sveltekit with svelte 4,There's data required to server side render pages that is loaded in the root +layout.server.js. The data is then used both on the client and server side, however, I need a...
View ArticleCan you add optional _outer_ tags in svelte conditional statement?
Is it possible to use a conditional statement to wrap inner content with an optional outer element?Here is an example of what I want to do in valid Svelte:<script> export let...
View ArticleIs using a dummy variable a good practice to trigger a function call...
My code computes the number of characters the user has input. I allows users to save the entered text to localstorage and then when they visit the page the character count is shown. This is how I load...
View Articlesvelte transition:slide is jumpy when component switch with different height...
i have a two forms, one for sendOTP and the other one for verifyOTP and the verify otp one is taller than the send otp. the height transition for my container is jumpy on getting back from second form...
View ArticleSvelteKit - load() not called from component but works as a Page
If the file test.svelte below is a Page in /routes, it successfully calls load() and populates the template with the JSON array it retrieves when I access it via http://localhost:3000/test. If I move...
View ArticleHow can I receive arbitrary props in a Svelte component and pass to a child...
I want to receive arbitrary props from "above" and spread them onto an <input>, as shown here where inputProps would become an object containing any additional props set on this component...
View ArticleVite refuses to use the correct build target in my Svelte / TS project
I'm creating a website using THREE.js, Svelte, Typescript and Vite. When I tried to test a new THREE.js feature (WebGPURenderer), I got the following error in the build step:[ERROR] Top-level await is...
View ArticleHow to use Query with parameter in Houdini?
Question on Using Queries with Parameters in HoudiniI'm currently working on a SvelteKit project using Houdini for GraphQL integration. I have defined a query in my +page.gql file for logging in a...
View ArticleHow to Reflect Form Submission Results in Svelte After Login Attempt to...
I based on this documentation to create my custom Login page.I am creating a login page using Svelte with Superforms, and I am trying to handle the response from the server after the form submission....
View ArticleSending query parameter via SvelteKit form action
I have created a website using SvelteKit. I am using form action for handling login form.src/routes/(beforeAuth)/login/+page.svelte have login form<form use:enhance method="post"...
View ArticleHow to disable Svelte warning "Unused CSS selector"
The approach of my graphic designer for formatting our Svelte application is having a systematic set of classes in LESS, importing the appropriate LESS file in the component or page, and then applying...
View ArticleGenerate an "infinite" css grid with svelte and intersection observer API
I'm trying to mock up a turn based strategy, civ like game in the browser. I want to have a css grid that can load/unload content as the user scrolls the board/world.My current method is to render a...
View ArticleWhy is Clicking a button intended to modify specific part of view in my...
ContextLanguage used : typescriptUI toolkit svelte and bootstrapIssue descriptionI'm currently writing a vscode extension with one of it's feature being that clicking a button update an HTML table...
View ArticleInconsistent focus loss in sortable list
I’ve been playing around with keyboard navigation trying to build a list of items that can be sorted manually. The steps to use it are the following:Press Tab until the list is focused.Press Arrow Up...
View ArticleSharing state with runes when assigning the value from async
I am a bit new to those stuff and not sure if my approach is wrong. I would like to have a class and the schemaData needs to be loaded from an async request.But when I am getting the schemaData the...
View Article