CSS Loader Generator - Online Animated Spinner Code
Choose from a dozen pure CSS loading spinners. Customize color, size, and speed. Copy the HTML & CSS. No JavaScript needed.
UD5 Toolkit
Generate production-ready Loader & Action templates for Remix.run
$param for dynamic segments
json() and accessed in the component using useLoaderData(). Loaders receive params, request, and context as arguments, enabling server-side data fetching with full access to databases, APIs, cookies, and sessions.
redirect() on success or json() with errors on failure.
GET requests and fetch read-only data. Actions handle POST, PUT, PATCH, and DELETE requests for mutations. Loaders are called on every navigation; actions are triggered by form submissions or programmatic calls. A critical difference: after an action completes, Remix automatically revalidates all loaders on the current page, ensuring fresh data without extra code. Both run only on the server and are never bundled into the client.
LoaderFunctionArgs and ActionFunctionArgs from @remix-run/node to type your function parameters. Export a type alias using typeof loader so components can use useLoaderData<typeof loader>() for full type inference. For actions, use ActionFunctionArgs and type the return as TypedResponse<YourType> or use ReturnType<typeof action>.
<Await> and <Suspense> in your component to handle the streaming UI. This improves perceived performance by showing the page skeleton while slower data loads in the background.
throw new Response("Not Found", { status: 404 }) — triggers the nearest ErrorBoundary for expected errors. (2) return json({ error: "..." }, { status: 400 }) — returns an error to the component without triggering ErrorBoundary, useful for validation errors. (3) try-catch with logging for unexpected errors. Choose based on whether the error should show a full error page or inline feedback.
Object.fromEntries(formData) with a Zod schema and use safeParse() to avoid throwing. Return json({ errors: result.error.flatten().fieldErrors }) on failure so the component can display inline field errors. For simpler cases, manual checks like if (!name) return json({ error: "Name required" }, 400) work too. Libraries like Conform and Remix Validated Form streamline this further.
fetch(), databases through ORMs like Prisma or Drizzle, headless CMS platforms (Contentful, Strapi), file systems, Redis caches, or even other Remix resource routes. Since loaders run on the server, you have access to environment variables, authentication tokens, and any Node.js API — making them extremely flexible data-fetching entry points.
$userId in your file name map to params.userId in both loaders and actions. For example, a file at routes/users.$userId.tsx receives { userId: string } in params. Use these to fetch user-specific data, apply access control checks, or scope database queries. Params are always strings — convert to numbers with parseInt() or validate with Zod's z.coerce.number() when needed.
request.method rather than creating separate files for each operation.
<Form> component submits to the route's action even before JavaScript loads. When JS is available, Remix intercepts the submission, serializes the form data via request.formData(), and sends it via fetch — avoiding a full page reload. After the action completes, all loaders revalidate automatically. This means your forms work without JavaScript and get enhanced interactivity with it.
z.object() to define schemas for form data, then call schema.safeParse() inside your action. On failure, return json({ errors: result.error.flatten().fieldErrors }, 400). On success, proceed with the mutation. For even tighter integration, libraries like Conform bridge Zod schemas directly to form components, providing type-safe validation with minimal boilerplate.
defer(). Typed responses improved with better json() and redirect() type inference. The headers() function for per-route caching became more powerful. Vite became the official build tool, offering faster HMR. Also, SerializeFrom was introduced for cleaner loader type extraction in components.
Choose from a dozen pure CSS loading spinners. Customize color, size, and speed. Copy the HTML & CSS. No JavaScript needed.
Write a standard README with pre‑filled sections like Installation, Usage, and License. Export as Markdown. Save time.
Create a Svelte single‑file component with script, style, and markup. Choose TypeScript or JavaScript. Copy the .svelte file.
Create an import map JSON with CDN links. Use bare specifiers like `import React from 'react'` without bundlers.
Click to randomize geometric SVG patterns. Copy the inline SVG code for your website.
Design a modern button with gradients, shadows, and hover effects. Copy the clean CSS code.
Pick two images or colors and apply all 16 CSS mix‑blend‑mode values live. See and copy the right CSS for your design.
Style the notoriously hard file input. Generate a consistent button with preview. Copy the HTML/CSS.
Style underlines, overlines, and strike-throughs with colors, wavy styles, and thickness. Modern CSS text‑decoration.
Define brand colors, fonts, and spacing. Generate the Chakra UI extendTheme object. Export as JSON or JavaScript.
Create all kinds of CSS‑only triangles (up, down, left, right, equilateral). Adjust color and size. Grab the code.
Paste an SVG and get a ready‑to‑use data URI for CSS backgrounds or img tags. Optimized with URL encoding. All local.
Create a pure HTML/CSS accordion using <details> elements. Add custom styling and get the clean code. No JavaScript required.
Convert title to URL slug with options: ignore stop words, transliterate special characters, choose separator. SEO friendly.
Visually apply CSS transform functions like rotate, scale, skew, and translate. Obtain the exact CSS code for your elements. No coding needed.
Paste or upload an SVG and convert it into a CSS background‑image data URI. Clean and ready to embed.
Write global CSS and auto‑generate unique, scoped class names with source maps. Understand CSS Modules naming.
Build a custom CSS reset by toggling which elements to normalize. Copy the resulting stylesheet. Lean and clean.
Generate a CSR and private key pair in the browser using the Web Crypto API. Download both as files. No data sent to server.
Select PostCSS plugins (Autoprefixer, nesting, custom‑media) and generate a postcss.config.js file. Streamline your CSS pipeline.
Set up Stylelint rules for your project by selecting extensions (SCSS, order, etc.). Output a valid .stylelintrc.
Design beautiful buttons with gradients, shadows, and hover/active effects. No JavaScript required. Copy the CSS.
Paste Pug template code and compile it to HTML. See the rendered output instantly. For static site devs.
Build a complete font‑stack for your website. Choose a primary font and get the best fallback options for different OS. Copy the CSS.
Pick a target, module system, and strictness. Generate a custom tsconfig.json for your project. No more copy‑paste.
Write a module and import it. See how browser handles module scripts. Learn modern JS structure.
Add rows and columns, merge cells, and set gaps visually. Get the grid‑template CSS and HTML. Fast layout prototyping.
Convert standard HTML into Pug (formerly Jade) syntax. Clean, indented output. For Node.js templating. Client‑side.
Drag points to create a custom clip‑path shape. See the CSS value update live. For creating non‑rectangular elements.
Convert any length between px, rem, em, vw, vh, %, and pt. Set base size for context. Ultimate frontend helper.