Skip to content

Instantly share code, notes, and snippets.

@vidyesh95
vidyesh95 / +layout.svelte
Created October 11, 2025 05:04
Splash Cursor colorful
<SplashCursor
SPLAT_FORCE={8000}
COLOR_UPDATE_SPEED={15}
CURL={5}
/>
@vidyesh95
vidyesh95 / Hero.svelte
Created October 11, 2025 05:08
Hybrid shader for svelte
<script lang="ts">
import HybridShader from '$lib/components/landing/HybridShader.svelte';
import { onMount } from 'svelte';
import type { Component } from 'svelte';
let HybridShaderComp = $state<Component | null>(null);
onMount(async () => {
const m = await import('$lib/components/landing/HybridShader.svelte');
HybridShaderComp = m.default;
@vidyesh95
vidyesh95 / pagination.svelte
Created January 6, 2026 11:25
dynamic pagination
<script lang="ts">
/**
* WatchlistPagination Component
*
* A smart pagination component that handles large page counts by showing
* a condensed view with ellipses.
*
* Core Behavior:
* - Always shows the first page (1) and the last page (totalPages).
* - Near the start (pages 1-3): Shows first 5 pages, then ellipsis, then last page.