Category "svelte"

Sveltekit how do I set checkboxes checked based on query params?

I am trying to set checkboxes active based on query parameters using Sveltekit. To achieve this, I tried to get all route query parameters using the 'url.search

How do I deploy a sveltekit app to a dfinity container?

Difinity is a blockchain container. I need a rock solid example on how to deploy a standard sveltekit app to it. Their web page doesn’t cover sveltekit ht

Svelte: Remount component to overwrite media elements

Context In my Svelte app, I have multiple pages, each showing one or multiple videos. For rendering the videos I reuse a video component (simplified): // video

adding dynamic class name in svelte

I am currently writing an app with svelte, sapper and tailwind. So to get tailwind working I have added this to my rollup config svelte({ compilerOption

static adapter not working with nginx and refreshing pages

This is my config: import adapter from '@sveltejs/adapter-static'; import preprocess from 'svelte-preprocess'; import path from 'path'; /** @type {import('@sve

svelte component-library intellisense for exported properties

I have created a small component-library for myself based on this GitHub Repo: https://github.com/sveltejs/component-template This works fine and i have uploade

Sveltekit communication between layout, routes and components

I'm trying to move a svelte SPA into Sveltekit. In my SPA, the communication schema is what I would call a "controller component" which takes care of displaying

How to setup global bootstrap via scss in Svelte?

I want to use Bootstrap (v4.5) in a Svelte (v3) project with custom theme. The bootstrap documentation states that you can do this with scss. So I've setup Svel

How can I address a Netlify function with Svelte?

I have written a vanilla html app to test a Netlify function and it works I have attempted to write a Svelte application to mimic the same functionality The two

Svelte/SvelteKit: Dynamic import of components with variable

I want to dynamically import components without importing a specific component. I want to set the component name with a variable, received from the store: <s

ESLint error "'svelte' is not defined" when using svelte.JSX.MouseEventHandler

In a SvelteKit project, I have included the a svelte type. My problem is that my linting (ESLint) throws an error saying that 'svelte' is not defined. My code i

Testing Svelte components with dynamically imported components in jest (await import)

I'm writing a test in jest for a svelte component which dynamically imports another component. The following snippet is the part where the dynamic import happen

How to route programmatically in SvelteKit?

I want to be able manage history of my SvelteKit app while simultaneously making sure the whole routing system of SvelteKit doesn't get affected in any way. Som

can I change Svelte delimiter?

I am working on a big project that use Smarty template engine with AngularJs and we need to move out from AngularJs to Svelte. we face a bad problem that the de

Is it possible in Svelte to have #each loops with two-way binding to nested object values?

The following Svelte code works fine: <input bind:value='options.name.value' placeholder='{{options.name.placeholder}}'> <p>Hello {{options.name.va

Svelte - is there a way to use JS inside #each?

I'm iterating over an array of data and I want to do some processing on it before rendering it. I know that I could create a new component and pass array entry

Use postcss-normalize with Svelte

I didn't manage to import postcss-normalize to Svelte using official starting boileprlate and svelte-preprocess. My rollup config: … plugins: [ svelte(

How to write a "Delayed" svelte component?

I'm trying to write a Svelte component that hides its slot during the time specified. For example, this next line should hide the paragraph during 3 seconds <

Sveltekit Greensock Scrolltrigger breaking in production

I have a Green Sock animation that is working fine in development, but breaks in yarn run preview and production: ScrollTrigger-4a410f45.js:9 Uncaught (in promi

How to use Svelte store with tree-like nested object?

The Svelte official tutorial employs such complex object in its document for <svelte:self> let root = [ { type: 'folder', name: 'Impor