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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@smartsoft001/react

v2.205.0

Published

A metadata-driven React UI library: Smart* components, the provider, services and hooks behind them, and the form factory that turns model metadata into a form.

Downloads

1,780

Readme

@smartsoft001/react

A metadata-driven UI library for React. Describe a model once with the @Model / @Field decorators of @smartsoft001/models and the components render it: SmartForm builds the inputs and validation from the field options, SmartList the columns, SmartDetails the read-only view. Around them come layout, navigation and feedback components, a SmartProvider with the services they share, and a form engine that needs no form library.

npm install @smartsoft001/react @smartsoft001/domain-core @smartsoft001/models @smartsoft001/utils react react-dom reflect-metadata

React 19, reflect-metadata and the three @smartsoft001 packages the models come from are peer dependencies.

Usage

Import the compiled stylesheet once (@smartsoft001/react/styles.css) and wrap the application in SmartProvider:

import '@smartsoft001/react/styles.css';

import type { ReactNode } from 'react';

import {
  createHistoryNavigation,
  SmartProvider,
  SMART_PRESET_COMPONENTS,
} from '@smartsoft001/react';

const navigation = createHistoryNavigation();

export function AppProviders({ children }: { children: ReactNode }) {
  return (
    <SmartProvider
      language="eng"
      navigation={navigation}
      fileServiceConfig={{ apiUrl: '/api' }}
      {...SMART_PRESET_COMPONENTS}
    >
      {children}
    </SmartProvider>
  );
}

Then render a component, e.g. a form built from a model:

import { useState } from 'react';

import { Field, FieldType, Model } from '@smartsoft001/models';
import { SmartForm } from '@smartsoft001/react';

@Model({})
export class Contact {
  @Field({ type: FieldType.text, create: { required: true } })
  name!: string;

  @Field({ type: FieldType.email, create: true })
  email!: string;
}

export function ContactForm({ onSave }: { onSave: (value: Contact) => void }) {
  const [model] = useState(() => new Contact());

  return (
    <SmartForm
      options={{ model, mode: 'create', show: true }}
      onInvokeSubmit={(value) => onSave(value as Contact)}
    />
  );
}

What is inside

  • Components — SmartForm, SmartList, SmartDetails, SmartInput (one field component per FieldType), and the layout, navigation and feedback pieces around them: SmartApp, SmartPage, SmartCard, SmartModal, SmartTabs, SmartTable, SmartNotification and more. Most come in a standard and a Preline-styled preset implementation; each renders the standard one unless the provider registers another.
  • SmartProvider — the translations (Polish and English defaults, merged with the application's dictionary), a router-agnostic navigation adapter, the services, the component registry (components, inputFieldComponents, detailFieldComponents, listModeComponents) and the model providers. SMART_PRESET_COMPONENTS registers every preset at once. Without a provider the components still work against a default configuration.
  • Services — AuthService (the JWT in storage and its permissions), SmartHttpClient (fetch with interceptors; the default one adds the bearer token), FileService (attachments with upload progress), ToastService, AlertService and ModalService (rendered by SmartOverlays, which the provider includes), and AppService, MenuService, StyleService, ErrorService, StorageService. Each has a use… hook.
  • Forms — SmartFormControl, SmartFormGroup and SmartFormArray: status propagates up the tree, async validators run once the sync ones pass and hold the control PENDING, disabled controls are left out of the value. useControlState and useControlBinding connect them to React. FormFactory and useModelForm build them from a model: modes, permissions, nested objects and arrays, confirmations, unique checks and enabled specifications.
  • Helpers — SmartStore / useStore (the small external store the services keep their state in), trustHtml and sanitizeHtml (HTML from lists and details is sanitised with DOMPurify unless trusted), and model label and list cell helpers.

The components are styled with Tailwind CSS 4; every utility carries the smart: prefix, so the library's classes never collide with the application's. A dark class on <html> switches the theme.

Storybook

nx storybook react

The stories show the components and their variants, with a toolbar switch for the dark theme.

The full documentation is at https://framework.smartflow.biz.pl/docs/packages/react/.