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

uikernel

v1.0.0

Published

UI library

Downloads

7

Readme

UIKernel

UIKernel is a lib, built in React, with a CRUD wrapper for building complex admin dashboards.

UIKernel tries to avoid unnecessary abstractions, giving you the opportunity to define a model as you want. Nevertheless, it includes basic implementation examples that work with client data and models linking server and client interface using API.

Features

  • Data Grid

    • Interact with data. You can set up grid not only to display data but to add new records, update or delete them.

    • Filtering. UIKernel grid supports filtering by different fields.

    • Sorting & pagination. Sort data by default order or by user choice and paginate the data.

    • Data export. Export grid data in JSON or CSV formats for further interaction.

    • Bulk operations.

  • Forms

    • Form management. FormService and @connectForm decorator simplify development of forms.

    • Grid to Form model adapters. You can use Grid models in forms.

  • Validation. Use UIKernel validators to check fields on client, or both on client and the server. Also supports custom validation rules.

  • Data source. Pass data from a static array, a REST service or any other source to the UIKernel model.

  • Convenient inputs. Each form input or grid cell can be edited, including: a date picker, suggest box, number, select, checkbox.

  • Synchronize multiple components. Automatic synchronization of multiple forms and grids with a shared data model.

Documentation

You can find the full documentation on the website.

Examples

We have examples on the website.

Getting Started

To get started:

  1. Setup Create React App in terminal
# Setup React boilerplate
npm install -g create-react-app
create-react-app react-app
cd react-app

# Install UIKernel
npm i uikernel
  1. Open up src/index.js and replace all with:
 import React from 'react';
 import ReactDOM from 'react-dom';
 import UIKernel from 'uikernel';
 import 'uikernel/themes/base/main.css';

 // You can implement own data source with GridModel interface
 const model = new UIKernel.Models.Grid.Collection({
   data: [
     [1, {
       name: 'Pace',
       surname: 'White',
       age: 20
     }],
     [2, {
       name: 'Evangeline',
       surname: 'Terrell',
       age: 72
     }],
     [3, {
       name: 'Roach',
       surname: 'Potts',
       age: 14
     }]
   ]
 });

 const columns = {
   name: {
     name: 'First Name',
     render: ['name', record => record.name]
   },
   surname: {
     name: 'Last Name',
     render: ['surname', record => record.surname]
   },
   age: {
     name: 'Age',
     render: ['age', record => record.age]
   }
 };

 ReactDOM.render(
   <UIKernel.Grid cols={columns} model={model}/>,
   document.getElementById('root')
 );
  1. Try it out using npm start

As you can see, we've passed UIKernel.Grid two props: cols and model. We've defined these props in the columns and model script parts as you can see in comments.

Then, to create a grid model, we've used UIKernel.Models.Grid.Collection.

And that's all. Here's the live demo and code.