@runstack/ui
v0.1.7
Published
React UI components library for runstack
Maintainers
Readme
@runstack/ui
A collection of reusable React UI components for runstack applications.
Installation
npm install @runstack/uiRequirements
- React >= 18.0.0
- React DOM >= 18.0.0
Usage
Draggable List
import { DraggableList } from '@runstack/ui/draggable-list'
function MyComponent() {
const items = [
{ id: '1', title: 'Item 1' },
{ id: '2', title: 'Item 2' },
{ id: '3', title: 'Item 3' }
]
const handleReorder = (newItems) => {
// Handle reordered items
}
return (
<DraggableList
items={items}
onReorder={handleReorder}
/>
)
}Utilities
import { cn } from '@runstack/ui'
// Merge classes with tailwind-merge
const className = cn('base-class', 'additional-class', {
'conditional-class': condition
})Components
- DraggableList: A drag-and-drop sortable list component with editing capabilities
Development
# Install dependencies
npm install
# Run tests
npm test
# Run tests in watch mode
npm run test:watch
# Build the package
npm run build
# Lint the code
npm run lintLicense
MIT
