npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@casoon/skibidoo-ui

v0.1.9

Published

SSR-first UI component library for Skibidoo - AHA-Stack (Astro + HTMX + Alpine.js + Tailwind)

Readme

@casoon/skibidoo-ui

SSR-first UI component library for the AHA-Stack (Astro + HTMX + Alpine.js + Tailwind).

Built on @casoon/fragment-renderer for server-side component rendering with automatic style delivery.

Features

  • SSR-First: Components render on the server with fragment-renderer
  • Registry Pattern: Central component registry for dynamic rendering
  • Style Delivery: Automatic CSS injection via fragment-renderer
  • Progressive Enhancement: Works without JavaScript
  • HTMX Compatible: Fragment-based partial updates
  • TypeScript: Full type safety

Installation

npm install @casoon/skibidoo-ui @casoon/fragment-renderer astro

Quick Start

Using the Registry with fragment-renderer

The recommended approach is using the component registry with @casoon/fragment-renderer:

import { createAstroRuntime } from "@casoon/fragment-renderer";
import { createPartialRegistry } from "@casoon/skibidoo-ui/registry";

// Create runtime with selected components
const runtime = createAstroRuntime({
  components: createPartialRegistry(["ui-grid", "ui-form"]),
});

// Render a component by ID
const html = await runtime.renderToString({
  componentId: "ui-grid",
  props: {
    columns: [
      { field: "name", label: "Name", sortable: true },
      { field: "email", label: "E-Mail", sortable: true },
    ],
    data: users,
    pagination: { pageSize: 10 },
    sorting: true,
  },
});

Astro Config

Add @casoon/skibidoo-ui to your Vite SSR config to enable Astro component compilation:

// astro.config.mjs
export default defineConfig({
  vite: {
    ssr: {
      noExternal: ["@casoon/skibidoo-ui"],
    },
  },
});

Direct Component Import

You can also import components directly in Astro pages:

---
import Grid from "@casoon/skibidoo-ui/src/components/grid/Grid.astro";
import Form from "@casoon/skibidoo-ui/src/components/form/Form.astro";
---

<Grid
  columns={columns}
  data={data}
  pagination={{ pageSize: 10 }}
  sorting={true}
/>

Available Components

| Component ID | Description | |-----------------|--------------------------------| | ui-button | Button with variants | | ui-card | Card container | | ui-alert | Alert/notification box | | ui-input | Text input field | | ui-select | Select dropdown | | ui-form | Dynamic form with validation | | ui-datepicker | Date picker | | ui-grid | Data grid with sort/filter/pagination | | ui-modal | Modal dialog |

Registry Functions

import {
  createUIRegistry,        // All components
  createPartialRegistry,   // Selected components by ID
  createRegistryByCategory,// Components by category
  listComponentIds,        // List all IDs
  listCategories,          // List all categories
} from "@casoon/skibidoo-ui/registry";

// Full registry
const allComponents = createUIRegistry();

// Partial registry
const gridOnly = createPartialRegistry(["ui-grid"]);

// By category: "general", "form", "data", "overlay"
const formComponents = createRegistryByCategory("form");

API Endpoint Example

// src/pages/api/users.ts
import { createAstroRuntime } from "@casoon/fragment-renderer";
import { createPartialRegistry } from "@casoon/skibidoo-ui/registry";
import type { APIRoute } from "astro";

export const GET: APIRoute = async ({ url }) => {
  const page = parseInt(url.searchParams.get("page") || "1");
  
  const runtime = createAstroRuntime({
    components: createPartialRegistry(["ui-grid"]),
  });

  const html = await runtime.renderToString({
    componentId: "ui-grid",
    props: {
      columns: gridColumns,
      data: paginatedData,
      pagination: { pageSize: 10 },
      currentPage: page,
      totalItems: totalCount,
      endpoint: "/api/users",
    },
  });

  return new Response(html, {
    headers: { "Content-Type": "text/html" },
  });
};

Theming

Components use CSS Custom Properties for theming.

Built-in Themes

<link rel="stylesheet" href="@casoon/skibidoo-ui/styles/themes/light.css">
<link rel="stylesheet" href="@casoon/skibidoo-ui/styles/themes/dark.css">

Custom Theme

:root {
  --ui-primary: #your-color;
  --ui-surface: #your-surface;
  --ui-border-color: #your-border;
  /* See dist/styles/tokens.css for all variables */
}

Project Structure

src/
  registry.ts           # Component registry (import from /registry)
  runtime/              # SSR runtime utilities
  components/           # Astro components
    grid/Grid.astro
    form/Form.astro
    button/Button.astro
    card/Card.astro
    alert/Alert.astro
    input/Input.astro
    select/Select.astro
    modal/Modal.astro
    datepicker/DatePicker.astro
  client/               # Client-side hydration
  styles/               # CSS & themes
  types/                # TypeScript definitions

Requirements

  • Node.js >= 24
  • Astro >= 5.0
  • @casoon/fragment-renderer >= 0.1.1

License

LGPL-3.0