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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@kahi-ui/framework

v0.6.4

Published

Straight-forward Svelte UI for the Web

Downloads

1,332

Readme

WARNING: This library is a work-in-progress, use at your own discretion!

Features

  • Svelte-first: All Components are API designed to work well with Svelte as a first-class citizen.
  • Typescript Native: Kahi UI tries to be fully typed by using TypeScript as its base language, so you get a complete IDE experience.
  • Progressive Enhancements: Where possible, most logic is codified via CSS / HTML directly. With Javascript-enabled UX enhancements enabled for compatible clients.
  • Composable: While 30+ prebuilt Components are available, Kahi UI also provides primitives to design your Web Application's UI without touching CSS.
  • Dark Mode: Components in Kahi UI change colors when a compatible Browser views w/ Dark Mode.
  • Framework Independent: Even though Svelte-first, there is no hard toolchain dependencies required. You can just take the built CSS files and use with React or in a traditional SSR environment.

Documentation

Looking for documentation source? Visit github.com/kahi-framework/kahi-ui.nbn.dev.

Visit the documentation at kahi-ui.nbn.dev.

Playground

Want to just mess around and share Kahi UI creations? Visit the playground at kahi-ui.nbn.dev/playground.

F.A.Q.

Visit the F.A.Q (frequently asked questions) at kahi-ui.nbn.dev/docs/resources/faq.

Need Help?

File a new issue or visit the official Discord Server.

Want to Contribute?

Visit the CONTRIBUTING.md for information on getting started.

Browser Support

  • Chrome 88+ — January 2021
  • Edge 88+ — January 2021
  • Firefox 84+ — December 2020
  • Safari 14.1+ — April 2021
  • Edge (Pre Chromium)UNSUPPORTED
  • Internet Explorer — UNSUPPORTED

Installation

Open your terminal and install via npm:

npm install @kahi-ui/framework

Usage

Step 1 — First if your toolchain supports it, import the required CSS files from @kahi-ui/framework/dist:

// For non-minified:
import "@kahi-ui/framework/dist/kahi-ui.framework.css";
import "@kahi-ui/framework/dist/kahi-ui.theme.default.css";

// For minified:
import "@kahi-ui/framework/dist/kahi-ui.framework.min.css";
import "@kahi-ui/framework/dist/kahi-ui.theme.default.min.css";

Otherwise download the required CSS files from Releases and use <link rel="stylesheet">:

<html>
    <head>
        <!-- For non-minified: -->
        <link rel="stylesheet" href="/path/to/kahi-ui.framework.css" />
        <link rel="stylesheet" href="/path/to/kahi-ui.theme.default.css" />

        <!-- For minified: -->

        <link rel="stylesheet" href="/path/to/kahi-ui.framework.min.css" />
        <link rel="stylesheet" href="/path/to/kahi-ui.theme.default.min.css" />
    </head>
</html>

Step 2 — Next, import Components by their variable name from @kahi-ui/framework:

<script>
    import {Button, Text} from "@kahi-ui/framework";

    let clicks = 0;

    function on_click(event) {
        clicks++;
    }
</script>

<Text>{clicks}</Text>
<Button on:click={on_click}>Add +1</Button>

Some Components are multi-part patterns, so you'll need to import their namespaces:

<script>
    import {Button, Card, Text} from "@kahi-ui/framework";
</script>

<Card.Container>
    <Card.Figure>
        <img src="/path/to/card/header/image.png" />
    </Card.Figure>

    <Card.Header>
        Lorem Ipsum
    </Card.Header>

    <Card.Section>
        <Text>
            Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin et consectetur orci.
            Curabitur a egestas turpis, vitae convallis sapien. Sed pellentesque rutrum tellus, in
            iaculis dolor tincidunt non. Orci varius natoque penatibus et magnis dis parturient
            montes, nascetur ridiculus mus.
        </Text>
    </Card.Section>

    <Card.Footer>
        <Button palette="affirmative">Open Details</Button>
    </Card.Footer>
</Card.Container>

Resources

If looking for resources like templates and community projects, visit the resources list at kahi-ui.nbn.dev/docs/resources/official.

License

Kahi UI is licensed under the MIT license.