Skip to main content
Filter by
Sorted by
Tagged with
2 votes
1 answer
75 views

I have component <Component> which is basically an instance of another component <Modal> (a modal used for a specific action). For consistency and improved legibility I am passing all the ...
Moon Rat's user avatar
0 votes
1 answer
93 views

I’m using a custom Select component inside a table, and I want to make some reactive calculations in the parent component for example, updating the total price when a discount is selected through a ...
Juan Jose Rios's user avatar
1 vote
0 answers
127 views

Not able to get routing to work without a bug. The route works if I click on the link twice, the second time, the correct page renders. The first a console output error is generated. ERROR: Uncaught ...
Bill's user avatar
  • 1,235
0 votes
1 answer
96 views

I am using svelte to build a chrome extension which has the ability to upload images and Post that image to instagram. Here is my project directory structure. ├── .git/ ├── .gitignore ├── .npmrc ├── ...
Danish Xavier's user avatar
0 votes
1 answer
73 views

Component.svelte: <script> export function test(){ return "test"; } </script> App.svelte: <script> import { test } from "./Component.svelte" // error; ...
Alex's user avatar
  • 66.6k
2 votes
2 answers
1k views

New to SvelteKit and trying to figure this part out... Here's a couple of ways I was trying to achieve this, but the sidebar either doesn't load, or the navigation appears twice for some reason; with ...
Brad T's user avatar
  • 45
0 votes
1 answer
166 views

I have a component written in Svelte 5, using $props() rune. LogActions.svelte <script lang="ts"> //@ts-expect-error let { onSave }: { (): void } = $props() ; </script> <...
Jindrich Vavruska's user avatar
1 vote
1 answer
364 views

In Svelte 5, how can I wrap each child with a tag like the example below? {#if children} {#each children as child} <button onclick={() => { handleClick(); }} > ...
Baboyiban's user avatar
0 votes
1 answer
1k views

I'm following the tutorial provided by the Svelte team in their website! There is this section in the tutorial that basically explains how we can expose certain functionalities from a custom component:...
A . R . B's user avatar
0 votes
1 answer
582 views

I'm making a site using Svelte and SvelteKit, and I'd like to use a predefined array of colors for styling in a normalized way-- if I change one of the values later, everywhere that styles using that ...
food's user avatar
  • 27
-1 votes
1 answer
90 views

I have a webpage with several tabs. Inside one of them I include an iframe as a way to manage certain properties, therefore I need the data to be persistent. Each time I change to another tab and come ...
dea's user avatar
  • 1
1 vote
1 answer
409 views

I have a couple of svelte components in a folder and I wish to display in a single page all the components in that folder. The only way I've found is creating an index.ts file in that folder and then ...
Ben Quan's user avatar
  • 839
0 votes
1 answer
138 views

In Svelte, I am using the Modal component. This component provides the possibility do declare a div with the property slot="footer". This will keep the footer always at the bottom of the ...
Jacob's user avatar
  • 659
0 votes
1 answer
69 views

I am trying to conditionally render different parts of my navbar to the user depending on if they are logged in or not. I initially achieved this by using the onMount function, but it is not ideal as ...
hypedstan's user avatar
5 votes
1 answer
70 views

I have the following component Form.svelte: <script> export let onDelete; </script> <form> <button type="submit">Update</button> <button on:click={...
Patrick Chin's user avatar
1 vote
1 answer
888 views

I've built an app localized by Astro's i18n routing. To get the current locale, on server-side I use Astro.currentLocale and on client-side I use window.location.pathname with a helper function that ...
abegehr's user avatar
  • 579
0 votes
2 answers
299 views

I have a form in a Svelte app like this: <!-- markup for editing todo: label, input text, Cancel and Save Button --> <form on:submit|preventDefault={onSave} class="stack-small" ...
opensas's user avatar
  • 64.4k
0 votes
1 answer
92 views

I have a svelte code.I want to implement a function that the parent component re-executes after the child component is updated. I am facing a problem now.After the child component is updated, the ...
cnfj's user avatar
  • 31
0 votes
1 answer
48 views

In svelte, I would like to strongly type an array to match the properties that a specific component exports. So in the following example I would like const things = [] to know that each item within ...
CT14.IT's user avatar
  • 1,767
4 votes
1 answer
1k views

In the svelte framework I installed Shadcn UI library and installed three of it's components but now when I try to install any other library it gives me this error. Component.json file looks like this ...
Nikhil Kumar's user avatar
0 votes
1 answer
444 views

I have a SvelteKit app with an @error.svelte page at the root of the /routes folder. Inside of this page, I have two buttons. One is in the header and the other one trigger's a page event when clicked ...
user2030942's user avatar
0 votes
1 answer
90 views

Radio components are being made and used. However, the input tag cannot be found because the parent page onMount runs earlier than the logic in the component. Is there any way to disable onMount on ...
car's user avatar
  • 3
2 votes
0 answers
321 views

I have a simple custom component in Svelte, where I use reactivity to execute some code. <script lang="ts"> export let liked: boolean $: { //..code that should be ...
scedira's user avatar
  • 31
0 votes
0 answers
540 views

I have a component that accesses a svelte store writable but the component just gets rendered before the data arrives into the store variable. This are the errors enter image description here I want ...
Nico's user avatar
  • 21
0 votes
2 answers
950 views

I've managed to create a Svelte web component that can be used on external websites running on different frameworks. The final problem I'm having is that Tailwind doesn't seem to be included in the ...
Dally's user avatar
  • 1,487

1
2 3 4 5
12