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

@lonli-lokli/dynamic-forms-daisyui

v6.0.0-gamma9.0

Published

Daisy UI components for react-jsonschema-form

Readme

@lonli-lokli/dynamic-forms-daisyui

Build Status npm npm downloads Contributors License

A DaisyUI theme for react-jsonschema-form.

This package integrates DaisyUI, Tailwind CSS, and RJSF to provide a modern, customizable form experience.

Screenshots

DaisyUI Form Example 1 DaisyUI Form Example 2

Features

  • Complete DaisyUI styling for all RJSF form elements
  • Responsive design with mobile-friendly layouts
  • Connected card styling for nested elements and arrays
  • Consistent visual hierarchy for complex forms
  • Support for all RJSF field types including:
    • Text inputs with proper styling and validation states
    • Select dropdowns with customizable option rendering
    • Checkboxes and radio buttons with optimized layouts
    • Arrays with add/remove/reorder functionality
    • Objects with proper nesting and visual hierarchy
    • Date/time inputs with cross-browser compatibility
  • Support for custom themes via DaisyUI's theme system
  • Accessible form components following WAI-ARIA practices

Installation

npm install @lonli-lokli/dynamic-forms-daisyui @lonli-lokli/dynamic-forms-core @lonli-lokli/dynamic-forms-utils tailwindcss daisyui

Usage

import { Form } from '@lonli-lokli/dynamic-forms-daisyui';
import validator from '@lonli-lokli/dynamic-forms-validator-ajv8';

function App() {
  return (
    <Form schema={schema} uiSchema={uiSchema} validator={validator} onChange={console.log} onSubmit={console.log} />
  );
}

Theme Customization

The form components use DaisyUI's theme system. You can customize the theme by adding DaisyUI theme classes to your HTML:

<html data-theme="light">
  <!-- or any other DaisyUI theme -->
</html>

For dynamic theme switching, you can change the data-theme attribute in your application code.

Tailwind Configuration

Make sure your tailwind.config.js includes the DaisyUI plugin:

/** @type {import('tailwindcss').Config} */
module.exports = {
  content: ['./src/**/*.{js,jsx,ts,tsx}'],
  theme: {
    extend: {},
  },
  plugins: [require('daisyui')],
  daisyui: {
    themes: true,
  },
};

Customization

Grid Layout

The DaisyUI theme supports the standard RJSF layout grid system. You can use grid layouts by incorporating the LayoutGridField in your UI schema:

import { RJSFSchema, UiSchema } from '@lonli-lokli/dynamic-forms-utils';
import Form from '@lonli-lokli/dynamic-forms-daisyui';
import validator from '@lonli-lokli/dynamic-forms-validator-ajv8';

const schema = {
  type: 'object',
  properties: {
    firstName: { type: 'string', title: 'First Name' },
    lastName: { type: 'string', title: 'Last Name' },
    email: { type: 'string', format: 'email', title: 'Email' },
    phone: { type: 'string', title: 'Phone' },
  },
};

// Use grid layout for the form
const uiSchema = {
  'ui:field': 'LayoutGridField',
  'ui:layoutGrid': {
    'ui:row': {
      children: [
        {
          'ui:row': {
            children: [
              {
                'ui:col': {
                  xs: 12,
                  sm: 6,
                  children: ['firstName'],
                },
              },
              {
                'ui:col': {
                  xs: 12,
                  sm: 6,
                  children: ['lastName'],
                },
              },
            ],
          },
        },
        {
          'ui:row': {
            children: [
              {
                'ui:col': {
                  xs: 12,
                  sm: 6,
                  children: ['email'],
                },
              },
              {
                'ui:col': {
                  xs: 12,
                  sm: 6,
                  children: ['phone'],
                },
              },
            ],
          },
        },
      ],
    },
  },
};

const MyForm = () => <Form schema={schema} uiSchema={uiSchema} validator={validator} />;

The DaisyUI theme uses a flexible grid system based on Tailwind CSS's flex utilities. This grid layout integrates with the standard RJSF layout system, providing a consistent experience across all themes.

Theme Configuration

DaisyUI itself provides a variety of themes. To use a specific theme, add the data-theme attribute to your root element:

<div data-theme='dark'>
  <Form schema={schema} validator={validator} />
</div>

You can also dynamically change themes in your application:

import { useState } from 'react';
import { Form } from '@lonli-lokli/dynamic-forms-daisyui';
import validator from '@lonli-lokli/dynamic-forms-validator-ajv8';

function App() {
  const [theme, setTheme] = useState('light');

  return (
    <div data-theme={theme}>
      <select value={theme} onChange={(e) => setTheme(e.target.value)}>
        <option value='light'>Light</option>
        <option value='dark'>Dark</option>
        <option value='cupcake'>Cupcake</option>
        <option value='cyberpunk'>Cyberpunk</option>
        <option value='synthwave'>Synthwave</option>
        {/* Add more themes as needed */}
      </select>

      <Form schema={schema} validator={validator} />
    </div>
  );
}

Development

To develop locally:

# Clone the repository
git clone https://github.com/rjsf-team/react-jsonschema-form.git
cd react-jsonschema-form

# Install dependencies
npm install

# Build packages
npm run build

# Run playground
npm run start:playground

To test the DaisyUI theme specifically, select it from the themes dropdown in the playground.

License

Apache-2.0