@petrarca/sonnet-ui
v0.1.4
Published
UI primitives, data components, and table schema system for the Petrarca Sonnet component library
Readme
@petrarca/sonnet-ui
UI primitives and data components for the Petrarca Sonnet component library.
What's included
UI primitives -- Tailwind CSS + Radix UI based components following the shadcn pattern: Button, Badge, Card, Dialog, Tabs, Input, Tooltip, Spinner, Stepper, and more.
Data components -- Higher-level components for building data-driven UIs:
- EntityTable -- Schema-driven data table with pagination, row actions, custom cell renderers
- EntitySelect -- Async searchable select with typeahead, backed by a fetcher API
- EntityTree -- Hierarchical tree browser with search, edit, drag support
- TreeView -- Generic tree renderer with keyboard navigation
- SearchInput -- Faceted search input with chip-based filters
- JsonEditor -- CodeMirror-based JSON editor with validation highlighting (subpath:
@petrarca/sonnet-ui/json-editor)
Install
pnpm add @petrarca/sonnet-ui @petrarca/sonnet-corePeer dependencies: react, react-dom, tailwindcss.
Tailwind setup
Add the package dist to your Tailwind content config so component classes are included:
content: [
"./src/**/*.{ts,tsx}",
"./node_modules/@petrarca/sonnet-*/dist/**/*.js",
]License
Apache 2.0
