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

Warning: "The following packages have a svelte field in their package.json...

I'm encountering a warning message in my Vite project related to the Vite Plugin Svelte. The warning message reads:[vite-plugin-svelte] WARNING: The following packages have a svelte field in their...

View Article


Image may be NSFW.
Clik here to view.

SvelteKit - API fetches data correctly in javascript but UI fails to render...

+page.svelte:<script> import { onMount } from 'svelte'; let careers = []; const fetchCareers = async () => { const apiUrl = 'http://localhost:4000/api/v1/careers'; try { const response = await...

View Article


No value attribute in input element when renders from Svelte

Can someone explain to me why if I create input component in Svelte, using html input like, for example<input type="text" id="testId" name="name" value="random text">the value attribute doesn't...

View Article

Why would my setTimeout() return a random number on screen when the callback...

I am trying to learn Svelte by building a quiz app.What I wanted to achieve is that when the user has answered a question from the quiz, it automatically jumps to the next one. I set a setTimeout() of...

View Article

Checkbox missing in form data when using SvelteKit Superforms with Zod

I am trying to build a form using SvelteKit Actions, Superforms, Formsnap and Zod. But my checkbox is not working as expected.// schema.tsexport const formSchema = z.object({ ... private:...

View Article


Loading HTML from variable name as page content in SvelteKit

How can I load an HTML, in a SvelteKit project, using the [slug] param as the page name?I have a pretty simple SvelteKit project with some basic data loading. The structure (relevant to the question)...

View Article

Svlete error 500 when "import { FireOutline } from 'flowbite-svelte-icons';"

i just followed the tutorial given on the flowbite svelte page.on the quickstart page everything went smoothly, I followed all the directions, but here I used bun not pnpm as in the tutorial.im...

View Article

Need Guidance: Connecting ElysiaJS to Svelte for JavaScript Framework...

How can I integrate ElysiaJS with Svelte? I'm looking for guidance on connecting ElysiaJS, a JavaScript framework, to Svelte in order to build a web application. Specifically, I want to ensure that the...

View Article


Background video not auto playing on safari browser used svelte to build the...

I have used svelte to build a website.<script lang="ts"> import { MetaTags } from 'svelte-meta-tags'; import Viewport from 'svelte-viewport-info' import vi from './assets/videofile.mp4' import...

View Article


Using pdfjs in Sveltekit/Typescript

I need to use pdfjs (current 4.1.392) for text extraction in a sveltekit 4 typescript project. This is how I try to import pdfjs into my src/routes/+page.svelte:<script lang="ts">import * as...

View Article

The URL Changes but page doesn't

I made this project with tauri-svelte.// src/+page.svelte<script lang="ts"></script><main id="container"><a href="/routes"><button>2nd...

View Article

Svelte: editablecontent and onChange

In svelte, I know that one can use editablecontent with bind:innerHTML to bind the content of a div with a variable. But in my case I want to modify the variable only when the div loses the focus...

View Article

Supabase SignUp Function with Sveltekit

I am making a register site using sveltekit and supabase until now i have been able to successfully save a user to the database but now i also want to save a displayname and a phone number into the...

View Article


Consistent delay after page creation in svelte

I'm trying to create a new page after submitting a form to the server then redirecting the client to this new page. After redirecting, I get an error 404 and after a refresh it work (at least in dev, i...

View Article

Svelte component in plain HTML [duplicate]

I have a function that returns the HTML code for a custom component. That code, together with more HTML code, is then rendered somewhere else with {@html codeToDisplay}.My firsts two guesses...

View Article


Style leak from Svelte component

Question:I'd like to use a plugin (daisyUI) for TailwindCSS in one of my Svelte components. It looks like style information leaks from this component and affects the entire site. How can I avoid this?I...

View Article

how to display in the selected currency input placeholder a value of 1?

i'm trying to display a value of 1 in the placeholder of my input when i select a currency, but instead of 1 i see the exchange rate of the selected currency with USD, for example if i select EUR...

View Article


Svelte Carousel nav dots active colors aren't transitioning with slides

I'm working on a carousel component using schadcn-svelte and embla carousel. The initial click on dot 2 transitions from slide 1 to slide 2, and the active dot styles update perfectly. However after...

View Article

Using uPlot with svelte, does not render

I'm struggling to make uPlot work with svelte. I can't find any minimal working example, so I'm crafting one myself and it does not render. Repro goes as follows:npm create svelte repro# y# skeleton#...

View Article

Problem with the reactivity issue in svelte

<div class="scrollable-div"><AnnotatedText {iobStringLatest} /></div>I am writing this code in svelte where I have developed a component to re use in my code. Howeve, I am giving an...

View Article
Browsing all 1655 articles
Browse latest View live