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

How does the SvelteKit form property work with client side rendering?

I'm having trouble accessing the result of my +page.server.ts actions function using the $page.form property when ssr is disabled, while the data prop from the load function is working fine. Is this a...

View Article


How can I pass parameters to on:click in Svelte?

Binding a function to a button is easy and straightforward:<button on:click={handleClick}> Clicks are handled by the handleClick function!</button>But I don't see a way to pass parameters...

View Article


How do I access webhook data for a sigle user in a Sveltekit project?

I am currently working on a sveltekit project about connecting with APIs. Once a session is created, you choose your API provider you want to connect to. The prompt to choose a provider is a button...

View Article

vite bundle skeleton ui -- safelisting skeleton-tailwind utility classes

I am trying to use SkeletonUI for my Svelte project (without sveltekit). I create a bundle using Vite for all the SkeletonUI tailwind directives (badge, variant-filled), and skeletonUI svelte...

View Article

Svelte not generating public or dist folder with vite

I'm extremely confused about why when I run npm run buid it says it's compiling everything but it does not generate a public or dist folder. I'm able to develop and preview everything fine with npm run...

View Article


Create a TypeScript generic type that extends another generic type

I am trying to create a Svelte component that displays hierarchical data. This component, named for now HierarchicalBar renders itself by using the data tree provided. The data tree provided looks like...

View Article

How to share custom data in Capacitor Background Runner

I'm building my first app with Capacitor 5.4 and Svelte 3.49. The app is going to send notifications based on a remote API, it is fetching periodically an endpoint and based on the last API activity it...

View Article

Astrojs "window is not defined" error, even though i'm using client:only...

We're trying to use Astro to have a website where each top component can be developed by a different team using whatever framework they want. We start with a very simple example using Svelte as the...

View Article


Replacing content of div without triggering scrollend

I might have backed myself into a corner with this one, but I am creating an image carousel in svelte.I want the carousel to work with horizontal scroll, and I want the image in the center to be...

View Article


Svelte: Selection not updating [CSS ISSUE]

I have a Svelte Selection that fetches data and displays it in a dropdown. Users can select various properties, and this functionality works well. However, now I want to preselect certain options;...

View Article

semantics of svelte syntax greater then in `action={trigger}> {$open ?...

I came across this syntax from example in (MeltUI -- a svelte based component library<Button on:click={() => console.log('clicked')} {...$trigger} action={trigger}> {$open ? 'Close' :...

View Article

Svelte execute function when any of group of variables changes

In Svelte RealWorld App there is something like this:$: query && getData();This calls REST API when page size or other query parameters change.I have similar situation for listing entities and...

View Article

astro check fails with svelte-testing-library

I'm building a website with Astro together with Svelte. For component tests I added svelte-testing-library which runs fine when being executed with npm test.Unfortunately after adding component tests...

View Article


How to loop through data a certain number of times in Svelte

I've successfully connected my app to supabase - and it's fetching data from a table I've recently setup.I've got the law-firm names appearing in a card template, so there's a seperate card for each h3...

View Article

Linting `import.meta.env` expressions in svelte+vite app

I have a primitive svelte app, which is built with Vite. I'm using Vite's way to access env vars, like this:<div class="app"> {import.meta.env.VITE_WHATEVER}</div>I works and show my var as...

View Article


Mobile Mode Screen Size Wrong

I just finished the desktop version of my website and now wanted to star working on mobile mode (bad practice, I know), but when I tried out mobile mode, both on dev and deployed, the screen width...

View Article

Vite build commnad fails with ssr.noExternal

I am trying to build svelte project with vite and I'm facing the issue, that when I import an external library into the project it throws the following error:[ERR_UNKNOWN_FILE_EXTENSION]: Unknown file...

View Article


difference between svelte store and svelte context

What is exact different between Svelte Context and Svelte Store?When to use in different situation?import { getContext } from 'svelte';import { writable } from 'svelte/store';

View Article

Svelte 4 Migration Issues and hosting on Digital Ocean

I am experiencing issues with my Svelte 4 Project, migrated to Svelte 4 by a previous developer.Site it hosted on DigitalOcean App Platform. I am having issues getting it to build or run on the dev...

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
Browsing all 1539 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>