Quantcast
Channel: Active questions tagged svelte - Stack Overflow
Browsing all 1539 articles
Browse latest View live
↧

Dexie livequery with Svelte 5 runes

I am currently using Dexie 4.x and Svelte 4.x and taking advantage of livequery to update state when data in the underlying DB changes. Looking ahead to Svelte 5, I'm wondering how to integrate...

View Article


SvelteKit: get reactive store

I have this +page<script lang="ts"> import { chatStore } from '$lib/stores/chat/chatStore'; import type { Message } from '$lib/types/message'; import { faker } from '@faker-js/faker'; import {...

View Article


Sveltekit - Trigger function when new rows added to the Table element

I'd like to trigger my toast function when a new rows added to the table with a sound notification.<script> function toastTrigger() { toast.push('Hello world!');...

View Article

How to detect whether script was loaded client side or server side in Svelte?

How do I detect whether a script was loaded from +page.server.js or +page.svelte?Is there a (Svelte) function that I can import to see the difference?

View Article

Why cant this Astro/Svelte component access the document element?

<script lang="ts"> let theme = localStorage.getItem("theme") ?? "light"; const handleClick = () => { theme = (theme === "light" ? "dark" : "light");...

View Article


weird issue when updating a value of an array in a object

Assume the following state object:const state = writable({});$state = {value: ['a','b','c'], label: 'test'};And replace one specific item of the array like this:$state.value[1] = 'e';Ok, no big deal so...

View Article

403 error with SvelteKit form submissions behind ALB with TLS termination

I'm encountering an issue with form submissions in my SvelteKit application hosted behind an Application Load Balancer (ALB) in AWS with TLS termination. When submitting a form via HTTPS, the request...

View Article

Bootstrap 3: Open Dropdown on Hover When Another Dropdown Is Open

I have a couple of Bootstrap 3 (have to use it for reasons out of my control) Dropdowns within a navbar that I would like to behave like an application menu. Normally, the dropdowns open on click, but...

View Article


Why does scroll jump to last css snapped element?

I am making project in SvelteKit, but I'm fairly sure this is going to happen in vanilla all the same. Since that context and working example is important here, Here's minimal reproduction instead of...

View Article


How animate Svelte component on page load without causing a layout shift

ProblemI would like to animate a header once the landing page of my SvelteKit app is loaded, causing each letter of the heading to appear one slightly after the other, but all the solutions I've found...

View Article

How to deploy a svelte kit app after build using nginx as web server

I have a svelte kit project. I want to deploy the app in an Nginx web server after an npm run build. At the moment I have a node container and I use to start using npm run preview. It's working fine,...

View Article

Why in the svelte component when entering text does not change the text...

I'm learning Svelte. Wrote a component. When you enter text, the length of the text should be displayed. But for some reason it does not change, but remains equal to 0/1000. If the text length is more...

View Article

What is the correct way for updating a Svelte writable array store?

What is the correct way (or differences if both are correct) for updating a $orderItems = writable([]) Svelte writable array store? We'll assume result is a new item I want to push at the end of...

View Article


svelte-navigator not working with latest release of svelte

I was wondering if anyone is also having trouble installing svelte-navigator. Before the latest update of Svelte (4.2.8) this worked fine but with the latest update I got an error that svelte-navigator...

View Article

Set crossOriginIsolated Svelte and SvelteKit

I'm new in Svelte and SvelteKit and I'm getting this error when trying to execute a worker:Uncaught DOMException: Failed to execute 'postMessage' on 'Worker': SharedArrayBuffer transfer requires...

View Article


unable to "vite build" for svelte and its components: skeleton and tailwind

I have tried the same on different version of node (v18 and v20) but still end up with the same error. I am trying to "vite build" svelte and some of its components, namely @skeletonlabs/skeleton...

View Article

Sveltekit: Get last visited route

I've been trying to get the last visited route, after googling for long time I'm not able to find anything, it looks like is not so simple as it sounds, is it?What I want is to store the last visited...

View Article


Astro, Typescript and svelte-check

I'm building a frontend project using Astro. For some dynamic components I added svelte as a UI framework.Now I want to integrate svelte-check but the command is failing because of: Type annotations...

View Article

Open WebUI Personalization

I've finished setting up the Open WebUI with the docker and wanted to make some changes to the landing page to have it more personalized. Looking through all the files didn't really help as I'm not...

View Article

Dynamically injected script execution not working on page navigation using

In my test application using Sveltekit, I tried to inject third party scripts to page using<script> let scriptsData = 'console.log("Some script executed")'; </script><svelte:head>...

View Article
Browsing all 1539 articles
Browse latest View live