Is it any way to calling SvelteKit form actions from within children components?
For example I have a route tree like thisfoobar_route||-+page.server.js|-+page.svelte|-child_component.svelte|In +page.server.js I haveexport const actions = { create_content: async ({ cookies, request...
View ArticleHow to use native node modules in sveltekit?
I want to use a native node module in svelte (I'm using sveltekit and vite), the native module has been built using neon rust (https://neon-bindings.com/) which I presume is the same build as...
View ArticleMultiselect with search for a lot of entries
I have a Sveltekit Project with Bootstrap (Sveltestrap) and I want to implement a search function for it.I want to have an input field that allows the user to type in the wanted value and then like a...
View ArticleUsing treant with svelte
I am trying to use the treant tree-drawing library with svelte. Here's as far as I got - I'm ok with basic svelte and JS/TS as well as web dev, but I seem to be missing a key bit of info how things fit...
View ArticleSvelteKit - Nested Prop Cannot read properties of undefined (reading 'whatever')
Simply I don't get it. I store fetch result in writable store and retrieve those data, but I got undefined error when I want to use nested json data (school) see below. Why?<p>item:...
View ArticleSvelte SEO - Dynamic page title
First off, I have already checked this question, but it does not really answer my own question.Here is my situation:I have a main page (+page.svelte, in the same folder as +layout.svelte) and a few...
View ArticleHow to include external css in Svelte Custom Element?
I'm new to Svelte and I'm trying to create a custom element that relies on font-awesome fonts. However, when I build the component and try to use it -- none of my styling (including the font-awesome...
View ArticleCombine data from two different API's into one JSON file in a Sveltekit app?
So essentially I have movie data that's coming in from two different API's. Endpoint #1 has simple movie data (the IMDB ID, a specific rating related to the API I'm calling from, and the movie title)....
View ArticleSveltekit - Form Action - fetch Post api using different port
I have a front end local server using port 5173. I have a rest api backend on localhost but using different port, like port 3422. Is it possible to use Sveltekit Form Action if my front end running on...
View ArticleHow to call a function inside a Svelte component from outside the component
I have created a simple Svelte app that has an overlay component. The code is summarized as follows and there is a REPL here. After selecting the item from the menu, I wish to hide the menu and close...
View ArticleVite css @import from package, "missing specifier" when using file path
I'm currently trying to learn how to use sveltekit, and I'm having trouble with importing css from the @catppuccin/style package.@import "@catppuccin/palette/css/catppuccin.css";returns with [postcss]...
View ArticleUnexpected token when importing an interface in svelte and running vitest
I'm very new to svelte and TS, I'm trying to do a simple import and when I run vitest is fails with the following errorUnexpected token 1 | <script lang="ts"> 2 | import { createEventDispatcher }...
View ArticleDeleting keys from object in Svelte component state
I have a simple object in state, string -> objects. My UI renders the keys and values in a loop. Each object has a delete button. On click, I want to delete keys (or set them to undefined) such that...
View Articlehow to make clipboard with Paragraphs of text in using daisyui?
I want to make a clipboard in my svelte-kit app. I am using daisy ui and tailwind-css.I tried using <textarea> component and made it (readonly) but the problem i am having is it disregards...
View ArticleRange Requests Not Working in SvelteKit App with PDF.js
I'm developing a web application using SvelteKit and attempting to load PDF files using PDF.js. While testing, I noticed that the application does not seem to send partial range requests for PDF...
View ArticleFallback to the "default browser behavior" on an URL instead of interpreting...
I have a route on the path /src/routes/[first]/[[second]]/+page.ts.So far so good.But! Now I also have static assets such as /static/attachments/image1.jpg. These assets are unreachable because the...
View ArticleSvelteKit use:enhance doesn't work and fully reloads the page
I'm new to SvelteKit and trying to build a simple todo app with a MongoDB database. I followed the tutorials and implemented a form to add todos like so:<form action="?/create" method="POST"...
View ArticleHow do I upload large files with Svelte without copying them into memory?
I am currently building a Svelte app where a corefunctionality would be to allow upload of large (20Gig) files to an S3 bucket. I am currently using a form with file input for this and the process...
View ArticleHow do I get this data from server.js file to +page.svelte file?
I am trying to make a dynamic drop down base on what is selected I want to make a pocketbase collection getFulllist call and what ever data I get I want to return it to the frontend (+page.svelte) file...
View ArticleSveltekit on change function not being called when added to a component
I've got the following component called NumericField:<script> import {isNumber} from "../../helpers/index.js"; import {onMount} from "svelte"; export let name; export let id; export let value;...
View Article