Consuming Svelte store data in functions
Yes Im dumb. Coming from 6 years of React dev and building my first app with Svelte. The tutorial was fun but now im trying to actually just build and I'm confused with how a store works. I can't seem...
View ArticleHow to set bounds and flyToBounds using svelte-map-leaflet?
Recently I'm started using Svelte and I want to add a map to my project. I choose leaflet in svelte-map-leaflet package.Unfortunately I don't know how to set bounds and flyToBound (like in my old...
View ArticleSelect option is blank in Svelte template when using Svelecte
I am using Svelecte in an App. When I select multiple items and the associated template is rendered, the <select> options in the template become blank after each item is selected in Svelecte....
View ArticleWhere to put svelte default layout template components
INTRODUCTIONIn svelte, we know that default layout is store onsrc/routes/+layout.svelteand I also know some people use group layoutsrc/route/(app)/+layout.svelteBut that's not what I'm looking for...
View ArticleSvelte Material UI Autocomplete weird focus styles when varient is "outlined"
I'm new to svelte and I'm trying to use Autocomplete from Material UI and running into a bit of a weird issue with the styling (see attached screen shots). I've configured tailwindcss which is working...
View ArticleSveltekit not placing form value on input field (using use:enhance)
I'm facing a kind of weird situation. I've got the following form:<script> import RecordForm from "../../../components/forms/RecordForm.svelte"; /* data returned from load function in...
View ArticlePreventing Persistent CSS Styles Across Pages in SvelteKit
I'm using SvelteKit and have encountered an issue where CSS styles persist across page changes. I'm importing a CSS file in a Svelte component like this:<script> import...
View ArticleSet specific headers for static files in SvelteKit
I need to serve some files from my SvelteKit project with permissive CORS headers.Some options I've explored:Placing the files in /staticIf I place those files in /static I get restrictive CORS...
View ArticleModal not showing inside an each loop in Svelte
I am working with SvelteKit, Tailwind and DaysiUi.I have a minimenu, its data is in supabase and its options are read. This menu is located inside another component which is a card and of course I have...
View Articlesvelte conditionnal class with a tailwind class including a slash in its name
I use tailwind in a sveltejs project.Some tailwind classes have a slash in their name,not compatible with svelte conditionnal classes.Example:<div class:w-1/3={condition}>there is an error on the...
View ArticleHow do I create a cookie in svelte and access it?
I am trying to create a cookie in svelte (and I am also using svelte kit) and access it. I am want to use the cookie for authentication purposes, more specifically, to store a JWT Token.I am tried...
View ArticleProblem with changing font of text in javascript
So, i wanted to make a website to change the font of the text that you enter in, basically like lingojam.com.I did make it but for some reason only some fonts are working and i have no idea why, can...
View ArticleCompiling individual pages for an existing Flask app?
Full disclosure: I am an inexperienced frontend dev.I have an existing Flask app backend which is being used to interact with the usual suspects (do work in the main python app, database interactions,...
View ArticleCookies behavior in `` tag, and fetch inside a `.server.ts` file in SvelteKit?
I attempting to create a SvelteKit application, and I think I am misunderstanding the use of fetch and hooks. When I have a login page, and in the form actions I am able to decode a jwt and add it to...
View ArticleLoad basic Google Map with array of coordinates in SvelteKit
I am new to web development, so also SvelteKit. I am trying to show a Google Map with markers for a list of locations. The locations come from coordinates. I have found a few similar posts here and on...
View ArticleHow do I upload files to pocketbase?
I am using pocketbase and svelte.js.How can I upload pictures to pocketbase via an html input.<script lang="ts"> import { currentUser, pb } from './pocketbase'; const axios =...
View ArticleHow to dynamically access and render the children of the wrapper svelte...
I am trying to create a wrapper component just to create a card with gray background. Lets call it GrayCardGrayCard.svelte<script></script><div class="graycard-container"><slot...
View ArticleHow to use youtube embed api in svelte
How do i use the js code from https://developers.google.com/youtube/iframe_api_reference in svelte? Running the code in a script tag like their snippet seems to behave differently to running it in...
View ArticleBasic Playwright setup not working in Sveltkit
When i run npm test after timeout i get these results:Running 0 tests using 0 workers[Webserver]... some unused css selectors messages[WebServer]Error: Timed out waiting 60000ms from config.webServer.I...
View ArticleCannot find module '@nativescript/webpack/lib/before-checkForChanges.js'
Cannot build android with svelte-native on linux:$ ns build androidPreparing project...assets by path fonts/ 350 KiB asset fonts/fa-solid-900.ttf 188 KiB [compared for emit] [from:...
View Article