@nice2dev/ui-buildings
v1.0.15
Published
Nice2Dev Buildings — Comprehensive React component library for smart buildings: floor plan editor, dashboards, device controls, automation rules and scene management — covers smart home, smart office, facility management and beyond
Maintainers
Readme
@nice2dev/ui-buildings
Building automation & unified spatial editor — floor plans, CAD, network topology, interior design, infrastructure, game scenes.
Features
NiceSpatialEditor
One React component with 6 editing modes, replacing 5+ separate editors:
| Mode | Description | | -------------------- | ----------------------------------------------------------------- | | floor-plan | 2D floor plan for smart home / building automation | | network-topology | Network topology overlay on floor plan or standalone | | infrastructure | Data center, server racks, network closets | | cad | 3D CAD mode — walls, floors, rooms, dimensions, DXF | | interior | 3D interior design / Sims mode — furniture placement (140+ items) | | game-scene | 2D/3D game scene editing — tilemap, terrain, objects |
Common Features (all modes)
- Snap to grid — unified snap system (
useSnapToGrid+ spatial-core) - Layers panel, object library sidebar
- Measurement tools (distance, area, angle)
- Undo/redo, multi-select, properties panel
- Minimap, zoom/pan (scroll + keyboard)
- Export — PNG, SVG, PDF, DXF,
.nsp.json
Dependencies
@nice2dev/spatial-core— grid system, object catalog, floor-plan model, .nsp.json serialization
Installation
npm install @nice2dev/ui-buildings @nice2dev/spatial-coreStyling
This package ships unstyled component logic. Import the shared CSS bundle once at your app entrypoint:
import '@nice2dev/ui/style.css';Optional: opt into the legacy shorthand token aliases (--bg-*, --text-*, --border-*, ...) when migrating from a custom design-token system:
import '@nice2dev/ui/css/legacy-bg-text-aliases.css';License
MIT © NiceToDev
