Skip to content

Onu framework using Onu's Tailwind styles #8

Closed

Description

@n4ff4h

Add an onu framework whose components output the same markup classes and design tokens as @javaabu/onu, so Blade and React pages look identical. Reuse Onu's Tailwind CSS (tokens and component classes) rather than copying values; document how apps include it.

Activity

  1. added
    next-genNext-gen Javaabu packages
    featurePackage feature from the spec
    on Nov 4, 2026
  2. added a commit that references this issue on Nov 4, 2026
    d26d4c1
  3. n4ff4h commented on Nov 4, 2026

    @n4ff4h
    Author

    Done in d26d4c1 on next-gen; CI green.

    How it works:

    • The classes come from Onu, not copies. scripts/onu-classes.mjs server-renders @javaabu/onu's own components (FormField, TextInput, NativeSelect, Checkbox, Button × every variant/size, Callout, StatusBadge, Card, Accordion, Tabs, NavTabs, Modal, Table, Pagination, Empty, DescriptionList) and records every data-slot's classes in resources/onu/classes.php. The Blade views read them through Frameworks\Onu. The Assets CI job fails if the file doesn't match the installed Onu version (pnpm check).
    • Tokens and theme come from Onu. Apps import @javaabu/onu/tailwind.css and then vendor/javaabu/forms/resources/css/onu.css. That file only @sources the views and class map, and styles the native controls Onu draws with React (checkbox, radio, <dialog>, file input), using Onu's CSS variables.
    • Apps without Tailwind get a prebuilt dist/onu.css (~46 KB gzipped) via php artisan vendor:publish --tag=forms-assets.
    • onu is the default framework.

    Intentional differences from React (documented in docs/frameworks/onu.md): there are no floating labels (Onu has none), checkboxes and radios are native inputs, and modals and accordions use <dialog> / <details>.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    featurePackage feature from the specnext-genNext-gen Javaabu packages

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions