@alkimi.org/ui-kit 0.9.10 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.github.md +589 -589
- package/README.md +589 -589
- package/README.npm.md +589 -589
- package/dist/{chunk-INXG2ITG.js → chunk-372VUZFE.js} +3 -3
- package/dist/chunk-372VUZFE.js.map +1 -0
- package/dist/{chunk-XNLDCAFS.js → chunk-3BVMHDYA.js} +1 -1
- package/dist/chunk-3BVMHDYA.js.map +1 -0
- package/dist/{chunk-IFNCRMNZ.js → chunk-3PEPOFYU.js} +1 -1
- package/dist/chunk-3PEPOFYU.js.map +1 -0
- package/dist/{chunk-7ENKXOF3.js → chunk-3TLCOZ5R.js} +2 -2
- package/dist/chunk-3TLCOZ5R.js.map +1 -0
- package/dist/{chunk-KYBTGVFM.mjs → chunk-4LR7SOCY.mjs} +1 -1
- package/dist/chunk-4LR7SOCY.mjs.map +1 -0
- package/dist/{chunk-HV2SGTFQ.mjs → chunk-4LUOGI24.mjs} +2 -2
- package/dist/chunk-4LUOGI24.mjs.map +1 -0
- package/dist/{chunk-B4YKLEVL.mjs → chunk-4PTRLHCB.mjs} +2 -2
- package/dist/chunk-4PTRLHCB.mjs.map +1 -0
- package/dist/{chunk-ZWYGJJTH.mjs → chunk-574USYNO.mjs} +2 -2
- package/dist/chunk-574USYNO.mjs.map +1 -0
- package/dist/chunk-5L5DM2X5.js +3 -0
- package/dist/chunk-5L5DM2X5.js.map +1 -0
- package/dist/{chunk-YK3UJT7O.mjs → chunk-5TVDBV74.mjs} +2 -2
- package/dist/chunk-5TVDBV74.mjs.map +1 -0
- package/dist/{chunk-TLGEA7LM.js → chunk-5X26XR44.js} +2 -2
- package/dist/chunk-5X26XR44.js.map +1 -0
- package/dist/{chunk-EA66F2ZN.mjs → chunk-7FUNOEYE.mjs} +2 -2
- package/dist/chunk-7FUNOEYE.mjs.map +1 -0
- package/dist/{chunk-SOZAPZ65.js → chunk-7J2ETVGK.js} +2 -2
- package/dist/chunk-7J2ETVGK.js.map +1 -0
- package/dist/{chunk-DRPEVJT7.mjs → chunk-7ONK6HHN.mjs} +1 -1
- package/dist/chunk-7ONK6HHN.mjs.map +1 -0
- package/dist/{chunk-NFHHEYXW.js → chunk-7SOZ6MOV.js} +2 -2
- package/dist/chunk-7SOZ6MOV.js.map +1 -0
- package/dist/{chunk-VNPIYQD6.mjs → chunk-7Y3KH5OM.mjs} +1 -1
- package/dist/chunk-7Y3KH5OM.mjs.map +1 -0
- package/dist/{chunk-7J43VVOI.mjs → chunk-AEZ5XKKG.mjs} +2 -2
- package/dist/chunk-AEZ5XKKG.mjs.map +1 -0
- package/dist/{chunk-KBEHHIN6.mjs → chunk-BLHKJHNV.mjs} +2 -2
- package/dist/chunk-BLHKJHNV.mjs.map +1 -0
- package/dist/{chunk-DEGPIR53.js → chunk-BV7RXRSL.js} +2 -2
- package/dist/chunk-BV7RXRSL.js.map +1 -0
- package/dist/{chunk-DVS5O7CS.mjs → chunk-C7GTPYMH.mjs} +2 -2
- package/dist/chunk-C7GTPYMH.mjs.map +1 -0
- package/dist/{chunk-EBSYGLCA.mjs → chunk-CMV76O4U.mjs} +2 -2
- package/dist/chunk-CMV76O4U.mjs.map +1 -0
- package/dist/{chunk-W4PJBJNX.mjs → chunk-CNRZOMR4.mjs} +2 -2
- package/dist/chunk-CNRZOMR4.mjs.map +1 -0
- package/dist/{chunk-5RIDFCU4.js → chunk-CT2CRYC2.js} +2 -2
- package/dist/chunk-CT2CRYC2.js.map +1 -0
- package/dist/{chunk-IUCIWRTI.mjs → chunk-DATWXRPT.mjs} +2 -2
- package/dist/chunk-DATWXRPT.mjs.map +1 -0
- package/dist/{chunk-CVGE3ROD.js → chunk-DHHZMQ72.js} +2 -2
- package/dist/chunk-DHHZMQ72.js.map +1 -0
- package/dist/{chunk-QJ7457IP.js → chunk-DIKQRVZO.js} +1 -1
- package/dist/chunk-DIKQRVZO.js.map +1 -0
- package/dist/{chunk-36L2E4K7.mjs → chunk-DKMCJGI4.mjs} +2 -2
- package/dist/chunk-DKMCJGI4.mjs.map +1 -0
- package/dist/{chunk-TOTBP4CJ.js → chunk-EIM5R7AJ.js} +2 -2
- package/dist/chunk-EIM5R7AJ.js.map +1 -0
- package/dist/{chunk-KCEGGK36.js → chunk-EJTY2ABY.js} +2 -2
- package/dist/chunk-EJTY2ABY.js.map +1 -0
- package/dist/{chunk-6N5E7FKO.js → chunk-EWRKHBIV.js} +2 -2
- package/dist/chunk-EWRKHBIV.js.map +1 -0
- package/dist/{chunk-VBARF35N.js → chunk-FUYXCJOQ.js} +1 -1
- package/dist/chunk-FUYXCJOQ.js.map +1 -0
- package/dist/{chunk-6HUPRCXQ.mjs → chunk-FZ3NXOFK.mjs} +2 -2
- package/dist/chunk-FZ3NXOFK.mjs.map +1 -0
- package/dist/{chunk-7HVZPUTO.js → chunk-G76GSW2A.js} +2 -2
- package/dist/chunk-G76GSW2A.js.map +1 -0
- package/dist/{chunk-4X3MFRSQ.js → chunk-GRXC46JC.js} +2 -2
- package/dist/chunk-GRXC46JC.js.map +1 -0
- package/dist/{chunk-OCAU343S.js → chunk-I5INE4KG.js} +2 -2
- package/dist/chunk-I5INE4KG.js.map +1 -0
- package/dist/{chunk-SKA5YFCS.mjs → chunk-IKJ4QRNB.mjs} +2 -2
- package/dist/chunk-IKJ4QRNB.mjs.map +1 -0
- package/dist/{chunk-UAJUT7B7.js → chunk-K4GMCVHO.js} +2 -2
- package/dist/chunk-K4GMCVHO.js.map +1 -0
- package/dist/{chunk-VUHWNO54.mjs → chunk-KLU33CJI.mjs} +2 -2
- package/dist/chunk-KLU33CJI.mjs.map +1 -0
- package/dist/{chunk-XQS62AJH.mjs → chunk-L36V45FD.mjs} +2 -2
- package/dist/chunk-L36V45FD.mjs.map +1 -0
- package/dist/{chunk-IOHKGN45.js → chunk-LQMOWEA7.js} +2 -2
- package/dist/chunk-LQMOWEA7.js.map +1 -0
- package/dist/{chunk-2R3FRGV4.mjs → chunk-MQMO7DMT.mjs} +2 -2
- package/dist/chunk-MQMO7DMT.mjs.map +1 -0
- package/dist/{chunk-VSRWPJJB.mjs → chunk-NEOUFWZN.mjs} +2 -2
- package/dist/chunk-NEOUFWZN.mjs.map +1 -0
- package/dist/{chunk-N4LDE7DZ.mjs → chunk-NKELJSLY.mjs} +2 -2
- package/dist/chunk-NKELJSLY.mjs.map +1 -0
- package/dist/{chunk-DP2FXFMQ.mjs → chunk-NKLBPY3T.mjs} +2 -2
- package/dist/chunk-NKLBPY3T.mjs.map +1 -0
- package/dist/{chunk-JNK2KBEK.mjs → chunk-PD43W3YN.mjs} +2 -2
- package/dist/chunk-PD43W3YN.mjs.map +1 -0
- package/dist/{chunk-57XZUJL4.mjs → chunk-QC5MA4WL.mjs} +2 -2
- package/dist/chunk-QC5MA4WL.mjs.map +1 -0
- package/dist/{chunk-N3ZLPC5C.mjs → chunk-QMJVRGPB.mjs} +2 -2
- package/dist/chunk-QMJVRGPB.mjs.map +1 -0
- package/dist/{chunk-PBOK6TUC.mjs → chunk-QVMQ55JW.mjs} +2 -2
- package/dist/chunk-QVMQ55JW.mjs.map +1 -0
- package/dist/{chunk-NIHULISF.js → chunk-RJMIOBXZ.js} +2 -2
- package/dist/chunk-RJMIOBXZ.js.map +1 -0
- package/dist/{chunk-4PODZIEU.js → chunk-RKRTEMMZ.js} +2 -2
- package/dist/chunk-RKRTEMMZ.js.map +1 -0
- package/dist/{chunk-SN3YJA4C.js → chunk-RRAIGAHU.js} +2 -2
- package/dist/chunk-RRAIGAHU.js.map +1 -0
- package/dist/{chunk-AJM7GGVC.mjs → chunk-S5TKCF6T.mjs} +1 -1
- package/dist/chunk-S5TKCF6T.mjs.map +1 -0
- package/dist/{chunk-BUS3E5OY.js → chunk-TDMRUCR6.js} +2 -2
- package/dist/chunk-TDMRUCR6.js.map +1 -0
- package/dist/{chunk-LNIGQUON.mjs → chunk-UAUSYTY4.mjs} +2 -2
- package/dist/chunk-UAUSYTY4.mjs.map +1 -0
- package/dist/{chunk-JVQJZ5HP.js → chunk-UJZP6L4S.js} +2 -2
- package/dist/chunk-UJZP6L4S.js.map +1 -0
- package/dist/{chunk-5ESMRNR3.js → chunk-ULIOO55I.js} +2 -2
- package/dist/chunk-ULIOO55I.js.map +1 -0
- package/dist/{chunk-S7CZVGW7.js → chunk-UNR6ATUH.js} +2 -2
- package/dist/chunk-UNR6ATUH.js.map +1 -0
- package/dist/{chunk-MKLABTST.js → chunk-USPGZYMV.js} +2 -2
- package/dist/chunk-USPGZYMV.js.map +1 -0
- package/dist/{chunk-K5ARCQIP.js → chunk-VBPIXXIA.js} +2 -2
- package/dist/chunk-VBPIXXIA.js.map +1 -0
- package/dist/{chunk-CA75YECJ.mjs → chunk-WAX33IZF.mjs} +2 -2
- package/dist/chunk-WAX33IZF.mjs.map +1 -0
- package/dist/{chunk-AHQNHOS2.js → chunk-WFD523CV.js} +1 -1
- package/dist/chunk-WFD523CV.js.map +1 -0
- package/dist/{chunk-NMU4NNZ2.mjs → chunk-WY4HCUAP.mjs} +2 -2
- package/dist/chunk-WY4HCUAP.mjs.map +1 -0
- package/dist/{chunk-SUZ2FZQ2.js → chunk-WYRD4UAK.js} +2 -2
- package/dist/chunk-WYRD4UAK.js.map +1 -0
- package/dist/{chunk-ZX7652AR.mjs → chunk-WZ5F5VT3.mjs} +2 -2
- package/dist/chunk-WZ5F5VT3.mjs.map +1 -0
- package/dist/{chunk-QP7CDVWG.js → chunk-XQILGD5B.js} +2 -2
- package/dist/chunk-XQILGD5B.js.map +1 -0
- package/dist/chunk-XSJKREFJ.mjs +3 -0
- package/dist/chunk-XSJKREFJ.mjs.map +1 -0
- package/dist/chunk-XYO4VLMF.js.map +1 -1
- package/dist/{chunk-O2FPBOOV.mjs → chunk-YBV4CPVD.mjs} +2 -2
- package/dist/chunk-YBV4CPVD.mjs.map +1 -0
- package/dist/chunk-YKXP3INY.js +3 -0
- package/dist/chunk-YKXP3INY.js.map +1 -0
- package/dist/{chunk-IFS4OO3L.js → chunk-Z5V4P3EC.js} +2 -2
- package/dist/chunk-Z5V4P3EC.js.map +1 -0
- package/dist/{chunk-NMI6DEUG.mjs → chunk-Z6RAFZ3C.mjs} +1 -1
- package/dist/chunk-Z6RAFZ3C.mjs.map +1 -0
- package/dist/components/GeometricFluidGrid.js +1 -1
- package/dist/components/GeometricFluidGrid.js.map +1 -1
- package/dist/components/GeometricFluidGrid.mjs +1 -1
- package/dist/components/GlitchLink.js +1 -1
- package/dist/components/GlitchLink.js.map +1 -1
- package/dist/components/GlitchLink.mjs +1 -1
- package/dist/components/PixelLoad.js +1 -1
- package/dist/components/PixelLoad.js.map +1 -1
- package/dist/components/PixelLoad.mjs +1 -1
- package/dist/components/TextDecoder.js +1 -1
- package/dist/components/TextDecoder.js.map +1 -1
- package/dist/components/TextDecoder.mjs +1 -1
- package/dist/components/accordion.js +1 -1
- package/dist/components/accordion.js.map +1 -1
- package/dist/components/accordion.mjs +1 -1
- package/dist/components/avatar.js +1 -1
- package/dist/components/avatar.js.map +1 -1
- package/dist/components/avatar.mjs +1 -1
- package/dist/components/breadcrumb.js +1 -1
- package/dist/components/breadcrumb.js.map +1 -1
- package/dist/components/breadcrumb.mjs +1 -1
- package/dist/components/breadcrumb.mjs.map +1 -1
- package/dist/components/button.js +1 -1
- package/dist/components/button.js.map +1 -1
- package/dist/components/button.mjs +1 -1
- package/dist/components/calendar.js +1 -1
- package/dist/components/calendar.js.map +1 -1
- package/dist/components/calendar.mjs +1 -1
- package/dist/components/card.js +1 -1
- package/dist/components/card.js.map +1 -1
- package/dist/components/card.mjs +1 -1
- package/dist/components/card.mjs.map +1 -1
- package/dist/components/checkbox.js +1 -1
- package/dist/components/checkbox.js.map +1 -1
- package/dist/components/checkbox.mjs +1 -1
- package/dist/components/combobox.d.mts +4 -1
- package/dist/components/combobox.d.ts +4 -1
- package/dist/components/combobox.js +1 -1
- package/dist/components/combobox.js.map +1 -1
- package/dist/components/combobox.mjs +1 -1
- package/dist/components/command.js +1 -1
- package/dist/components/command.js.map +1 -1
- package/dist/components/command.mjs +1 -1
- package/dist/components/date-picker.js +1 -1
- package/dist/components/date-picker.js.map +1 -1
- package/dist/components/date-picker.mjs +1 -1
- package/dist/components/date-range-picker.js +1 -1
- package/dist/components/date-range-picker.js.map +1 -1
- package/dist/components/date-range-picker.mjs +1 -1
- package/dist/components/dialog.js +1 -1
- package/dist/components/dialog.js.map +1 -1
- package/dist/components/dialog.mjs +1 -1
- package/dist/components/drawer.js +1 -1
- package/dist/components/drawer.js.map +1 -1
- package/dist/components/drawer.mjs +1 -1
- package/dist/components/dropdown-menu.js +1 -1
- package/dist/components/dropdown-menu.js.map +1 -1
- package/dist/components/dropdown-menu.mjs +1 -1
- package/dist/components/field.js +1 -1
- package/dist/components/field.js.map +1 -1
- package/dist/components/field.mjs +1 -1
- package/dist/components/file-upload.js +1 -1
- package/dist/components/file-upload.js.map +1 -1
- package/dist/components/file-upload.mjs +1 -1
- package/dist/components/input.js +1 -1
- package/dist/components/input.js.map +1 -1
- package/dist/components/input.mjs +1 -1
- package/dist/components/label.js +1 -1
- package/dist/components/label.js.map +1 -1
- package/dist/components/label.mjs +1 -1
- package/dist/components/popover.js +1 -1
- package/dist/components/popover.js.map +1 -1
- package/dist/components/popover.mjs +1 -1
- package/dist/components/progress.js +1 -1
- package/dist/components/progress.js.map +1 -1
- package/dist/components/progress.mjs +1 -1
- package/dist/components/progress.mjs.map +1 -1
- package/dist/components/radio-group.js +1 -1
- package/dist/components/radio-group.js.map +1 -1
- package/dist/components/radio-group.mjs +1 -1
- package/dist/components/scroll-area.js +1 -1
- package/dist/components/scroll-area.js.map +1 -1
- package/dist/components/scroll-area.mjs +1 -1
- package/dist/components/separator.js +1 -1
- package/dist/components/separator.js.map +1 -1
- package/dist/components/separator.mjs +1 -1
- package/dist/components/sheet.js +1 -1
- package/dist/components/sheet.js.map +1 -1
- package/dist/components/sheet.mjs +1 -1
- package/dist/components/sidebar.js +1 -1
- package/dist/components/sidebar.js.map +1 -1
- package/dist/components/sidebar.mjs +1 -1
- package/dist/components/skeleton.js +1 -1
- package/dist/components/skeleton.js.map +1 -1
- package/dist/components/skeleton.mjs +1 -1
- package/dist/components/slider.js +1 -1
- package/dist/components/slider.js.map +1 -1
- package/dist/components/slider.mjs +1 -1
- package/dist/components/slider.mjs.map +1 -1
- package/dist/components/switch.js +1 -1
- package/dist/components/switch.js.map +1 -1
- package/dist/components/switch.mjs +1 -1
- package/dist/components/switch.mjs.map +1 -1
- package/dist/components/table.js +1 -1
- package/dist/components/table.js.map +1 -1
- package/dist/components/table.mjs +1 -1
- package/dist/components/tabs.js +1 -1
- package/dist/components/tabs.js.map +1 -1
- package/dist/components/tabs.mjs +1 -1
- package/dist/components/textarea.js +1 -1
- package/dist/components/textarea.js.map +1 -1
- package/dist/components/textarea.mjs +1 -1
- package/dist/components/toast.js +1 -1
- package/dist/components/toast.js.map +1 -1
- package/dist/components/toast.mjs +1 -1
- package/dist/components/tooltip.js +1 -1
- package/dist/components/tooltip.js.map +1 -1
- package/dist/components/tooltip.mjs +1 -1
- package/dist/components/tree-select.js +1 -1
- package/dist/components/tree-select.js.map +1 -1
- package/dist/components/tree-select.mjs +1 -1
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/styles.css +1 -1
- package/dist/styles.css.map +1 -1
- package/package.json +109 -109
- package/dist/chunk-2R3FRGV4.mjs.map +0 -1
- package/dist/chunk-2RQVAC3C.mjs +0 -3
- package/dist/chunk-2RQVAC3C.mjs.map +0 -1
- package/dist/chunk-36L2E4K7.mjs.map +0 -1
- package/dist/chunk-4PODZIEU.js.map +0 -1
- package/dist/chunk-4X3MFRSQ.js.map +0 -1
- package/dist/chunk-57XZUJL4.mjs.map +0 -1
- package/dist/chunk-5ESMRNR3.js.map +0 -1
- package/dist/chunk-5RIDFCU4.js.map +0 -1
- package/dist/chunk-6HUPRCXQ.mjs.map +0 -1
- package/dist/chunk-6N5E7FKO.js.map +0 -1
- package/dist/chunk-7ENKXOF3.js.map +0 -1
- package/dist/chunk-7HVZPUTO.js.map +0 -1
- package/dist/chunk-7J43VVOI.mjs.map +0 -1
- package/dist/chunk-AHQNHOS2.js.map +0 -1
- package/dist/chunk-AJM7GGVC.mjs.map +0 -1
- package/dist/chunk-B4YKLEVL.mjs.map +0 -1
- package/dist/chunk-BUS3E5OY.js.map +0 -1
- package/dist/chunk-CA75YECJ.mjs.map +0 -1
- package/dist/chunk-CVGE3ROD.js.map +0 -1
- package/dist/chunk-DEGPIR53.js.map +0 -1
- package/dist/chunk-DP2FXFMQ.mjs.map +0 -1
- package/dist/chunk-DRPEVJT7.mjs.map +0 -1
- package/dist/chunk-DVS5O7CS.mjs.map +0 -1
- package/dist/chunk-EA66F2ZN.mjs.map +0 -1
- package/dist/chunk-EBSYGLCA.mjs.map +0 -1
- package/dist/chunk-HV2SGTFQ.mjs.map +0 -1
- package/dist/chunk-IFNCRMNZ.js.map +0 -1
- package/dist/chunk-IFS4OO3L.js.map +0 -1
- package/dist/chunk-INXG2ITG.js.map +0 -1
- package/dist/chunk-IOHKGN45.js.map +0 -1
- package/dist/chunk-IUCIWRTI.mjs.map +0 -1
- package/dist/chunk-JNK2KBEK.mjs.map +0 -1
- package/dist/chunk-JVQJZ5HP.js.map +0 -1
- package/dist/chunk-K5ARCQIP.js.map +0 -1
- package/dist/chunk-KBEHHIN6.mjs.map +0 -1
- package/dist/chunk-KCEGGK36.js.map +0 -1
- package/dist/chunk-KYBTGVFM.mjs.map +0 -1
- package/dist/chunk-LNIGQUON.mjs.map +0 -1
- package/dist/chunk-M2PMK5S2.js +0 -3
- package/dist/chunk-M2PMK5S2.js.map +0 -1
- package/dist/chunk-MKLABTST.js.map +0 -1
- package/dist/chunk-N3ZLPC5C.mjs.map +0 -1
- package/dist/chunk-N4LDE7DZ.mjs.map +0 -1
- package/dist/chunk-NFHHEYXW.js.map +0 -1
- package/dist/chunk-NIHULISF.js.map +0 -1
- package/dist/chunk-NMI6DEUG.mjs.map +0 -1
- package/dist/chunk-NMU4NNZ2.mjs.map +0 -1
- package/dist/chunk-O2FPBOOV.mjs.map +0 -1
- package/dist/chunk-OCAU343S.js.map +0 -1
- package/dist/chunk-PBOK6TUC.mjs.map +0 -1
- package/dist/chunk-QJ7457IP.js.map +0 -1
- package/dist/chunk-QP7CDVWG.js.map +0 -1
- package/dist/chunk-S7CZVGW7.js.map +0 -1
- package/dist/chunk-SKA5YFCS.mjs.map +0 -1
- package/dist/chunk-SN3YJA4C.js.map +0 -1
- package/dist/chunk-SOZAPZ65.js.map +0 -1
- package/dist/chunk-SUZ2FZQ2.js.map +0 -1
- package/dist/chunk-TLGEA7LM.js.map +0 -1
- package/dist/chunk-TOTBP4CJ.js.map +0 -1
- package/dist/chunk-UAJUT7B7.js.map +0 -1
- package/dist/chunk-VBARF35N.js.map +0 -1
- package/dist/chunk-VNPIYQD6.mjs.map +0 -1
- package/dist/chunk-VSRWPJJB.mjs.map +0 -1
- package/dist/chunk-VUHWNO54.mjs.map +0 -1
- package/dist/chunk-W4PJBJNX.mjs.map +0 -1
- package/dist/chunk-WMHK5YWO.js +0 -3
- package/dist/chunk-WMHK5YWO.js.map +0 -1
- package/dist/chunk-XNLDCAFS.js.map +0 -1
- package/dist/chunk-XQS62AJH.mjs.map +0 -1
- package/dist/chunk-YK3UJT7O.mjs.map +0 -1
- package/dist/chunk-ZWYGJJTH.mjs.map +0 -1
- package/dist/chunk-ZX7652AR.mjs.map +0 -1
package/README.github.md
CHANGED
|
@@ -1,589 +1,589 @@
|
|
|
1
|
-
# Alkimi UI Kit
|
|
2
|
-
|
|
3
|
-
A React component library built with [shadcn/ui](https://ui.shadcn.com/) and [Tailwind CSS](https://tailwindcss.com/).
|
|
4
|
-
|
|
5
|
-
## Installation
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
npm install @alkimi.org/ui-kit
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
## Setup
|
|
12
|
-
|
|
13
|
-
You have **two setup options** depending on your needs:
|
|
14
|
-
|
|
15
|
-
- **Option A (Recommended)**: Import pre-compiled library styles - simpler setup, works immediately
|
|
16
|
-
- **Option B (Advanced)**: Manual styling with full control - requires more configuration
|
|
17
|
-
|
|
18
|
-
Choose the option that best fits your project requirements.
|
|
19
|
-
|
|
20
|
-
---
|
|
21
|
-
|
|
22
|
-
### Option A: Import Library Styles (Recommended)
|
|
23
|
-
|
|
24
|
-
**Best for**: Most projects. Simple setup with minimal configuration.
|
|
25
|
-
|
|
26
|
-
**What you get**: Pre-compiled utility classes (`rounded-lg`, `bg-primary`, etc.) + CSS variables + fonts
|
|
27
|
-
|
|
28
|
-
#### 1. Install Tailwind CSS v4
|
|
29
|
-
|
|
30
|
-
```bash
|
|
31
|
-
npm install -D tailwindcss@next @tailwindcss/postcss@next postcss autoprefixer
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
#### 2. Configure PostCSS
|
|
35
|
-
|
|
36
|
-
Create or update your `postcss.config.js`:
|
|
37
|
-
|
|
38
|
-
```js
|
|
39
|
-
module.exports = {
|
|
40
|
-
plugins: {
|
|
41
|
-
"@tailwindcss/postcss": {},
|
|
42
|
-
autoprefixer: {},
|
|
43
|
-
},
|
|
44
|
-
}
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
#### 3. Import Library Styles
|
|
48
|
-
|
|
49
|
-
In your root layout file (e.g., `app/layout.tsx` for Next.js App Router):
|
|
50
|
-
|
|
51
|
-
```tsx
|
|
52
|
-
import "@alkimi.org/ui-kit/styles.css"
|
|
53
|
-
import "./globals.css" // Your custom CSS
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
**Important**: Import the library styles **before** your custom CSS so you can override variables if needed.
|
|
57
|
-
|
|
58
|
-
#### 4. Configure Your CSS
|
|
59
|
-
|
|
60
|
-
Create your `globals.css`:
|
|
61
|
-
|
|
62
|
-
```css
|
|
63
|
-
@import "tailwindcss";
|
|
64
|
-
|
|
65
|
-
/* Optional: Override library CSS variables */
|
|
66
|
-
:root {
|
|
67
|
-
/* Base color variables */
|
|
68
|
-
--background: oklch(0.992 0.019 155.826);
|
|
69
|
-
--foreground: oklch(0.205 0 0);
|
|
70
|
-
--primary: oklch(0.992 0.019 155.826);
|
|
71
|
-
--primary-foreground: oklch(0.205 0 0);
|
|
72
|
-
--secondary: oklch(0.269 0 0);
|
|
73
|
-
--secondary-foreground: oklch(0.992 0.019 155.826);
|
|
74
|
-
--muted: oklch(0.269 0 0);
|
|
75
|
-
--muted-foreground: oklch(0.608 0 0);
|
|
76
|
-
--accent: oklch(0.269 0 0);
|
|
77
|
-
--accent-foreground: oklch(0.992 0.019 155.826);
|
|
78
|
-
--destructive: oklch(0.576 0.214 25.467);
|
|
79
|
-
--destructive-foreground: oklch(0.992 0.019 155.826);
|
|
80
|
-
--border: #3f3f46;
|
|
81
|
-
--input: #3f3f46;
|
|
82
|
-
--ring: oklch(0.992 0.019 155.826);
|
|
83
|
-
--radius: 0.625rem;
|
|
84
|
-
|
|
85
|
-
/* Component-specific variables (optional - default to base variables) */
|
|
86
|
-
/* Override these to customize individual components independently */
|
|
87
|
-
--sidebar: var(--background);
|
|
88
|
-
--sidebar-foreground: var(--primary-accent);
|
|
89
|
-
--sidebar-accent: var(--base-accent);
|
|
90
|
-
--sidebar-accent-foreground: var(--base-accent-foreground);
|
|
91
|
-
--sidebar-border: var(--border);
|
|
92
|
-
--sidebar-ring: var(--ring);
|
|
93
|
-
|
|
94
|
-
--card: var(--background);
|
|
95
|
-
--card-foreground: var(--primary-accent);
|
|
96
|
-
|
|
97
|
-
--popover: var(--background);
|
|
98
|
-
--popover-foreground: var(--primary-accent);
|
|
99
|
-
|
|
100
|
-
--dialog: var(--background);
|
|
101
|
-
--dialog-foreground: var(--foreground);
|
|
102
|
-
|
|
103
|
-
--sheet: var(--background);
|
|
104
|
-
--sheet-foreground: var(--foreground);
|
|
105
|
-
|
|
106
|
-
--tooltip: var(--background);
|
|
107
|
-
--tooltip-foreground: var(--primary-accent);
|
|
108
|
-
|
|
109
|
-
--dropdown-menu: var(--background);
|
|
110
|
-
--dropdown-menu-foreground: var(--primary-accent);
|
|
111
|
-
}
|
|
112
|
-
```
|
|
113
|
-
|
|
114
|
-
**That's it!** The library components will work immediately because:
|
|
115
|
-
|
|
116
|
-
- `styles.css` contains pre-compiled utility classes
|
|
117
|
-
- All CSS variables are defined
|
|
118
|
-
- Fonts are included
|
|
119
|
-
- **No `@source` directive needed** (utilities are already compiled into the CSS)
|
|
120
|
-
|
|
121
|
-
#### When to Use Option A
|
|
122
|
-
|
|
123
|
-
- You want the quickest setup
|
|
124
|
-
- You're happy with the library's default styling approach
|
|
125
|
-
- You want to customize colors via CSS variables
|
|
126
|
-
- You don't need complete control over Tailwind configuration
|
|
127
|
-
|
|
128
|
-
---
|
|
129
|
-
|
|
130
|
-
### Option B: Manual Styling (Advanced)
|
|
131
|
-
|
|
132
|
-
**Best for**: Advanced users who want complete control over CSS generation and Tailwind configuration.
|
|
133
|
-
|
|
134
|
-
**What you do**: Define all CSS variables yourself and use `@source` to dynamically generate utility classes.
|
|
135
|
-
|
|
136
|
-
#### 1. Install Tailwind CSS v4
|
|
137
|
-
|
|
138
|
-
```bash
|
|
139
|
-
npm install -D tailwindcss@next @tailwindcss/postcss@next postcss autoprefixer
|
|
140
|
-
```
|
|
141
|
-
|
|
142
|
-
#### 2. Configure PostCSS
|
|
143
|
-
|
|
144
|
-
Create or update your `postcss.config.js`:
|
|
145
|
-
|
|
146
|
-
```js
|
|
147
|
-
module.exports = {
|
|
148
|
-
plugins: {
|
|
149
|
-
"@tailwindcss/postcss": {},
|
|
150
|
-
autoprefixer: {},
|
|
151
|
-
},
|
|
152
|
-
}
|
|
153
|
-
```
|
|
154
|
-
|
|
155
|
-
#### 3. Do NOT Import Library Styles
|
|
156
|
-
|
|
157
|
-
In your root layout file (e.g., `app/layout.tsx`):
|
|
158
|
-
|
|
159
|
-
```tsx
|
|
160
|
-
// ❌ Do NOT import library styles in Option B
|
|
161
|
-
// import "@alkimi.org/ui-kit/styles.css"
|
|
162
|
-
|
|
163
|
-
import "./globals.css" // Only import your custom CSS
|
|
164
|
-
```
|
|
165
|
-
|
|
166
|
-
#### 4. Configure Your CSS with @source
|
|
167
|
-
|
|
168
|
-
Create your `globals.css`:
|
|
169
|
-
|
|
170
|
-
```css
|
|
171
|
-
@import "tailwindcss";
|
|
172
|
-
|
|
173
|
-
/* REQUIRED: Tell Tailwind v4 to scan library components */
|
|
174
|
-
@source "../node_modules/@alkimi.org/ui-kit/dist/**/*.{js,mjs}";
|
|
175
|
-
|
|
176
|
-
/* REQUIRED: Define ALL CSS variables the library needs */
|
|
177
|
-
:root {
|
|
178
|
-
/* Base color variables */
|
|
179
|
-
--background: oklch(0.992 0.019 155.826);
|
|
180
|
-
--foreground: oklch(0.205 0 0);
|
|
181
|
-
--primary: oklch(0.992 0.019 155.826);
|
|
182
|
-
--primary-foreground: oklch(0.205 0 0);
|
|
183
|
-
--primary-accent: oklch(0.992 0.019 155.826);
|
|
184
|
-
--secondary: oklch(0.269 0 0);
|
|
185
|
-
--secondary-foreground: oklch(0.992 0.019 155.826);
|
|
186
|
-
--muted: oklch(0.269 0 0);
|
|
187
|
-
--muted-foreground: oklch(0.608 0 0);
|
|
188
|
-
--accent: oklch(0.269 0 0);
|
|
189
|
-
--accent-foreground: oklch(0.992 0.019 155.826);
|
|
190
|
-
--base-accent: oklch(0.269 0 0);
|
|
191
|
-
--base-accent-foreground: oklch(0.992 0.019 155.826);
|
|
192
|
-
--destructive: oklch(0.576 0.214 25.467);
|
|
193
|
-
--destructive-foreground: oklch(0.992 0.019 155.826);
|
|
194
|
-
--border: #3f3f46;
|
|
195
|
-
--input: #3f3f46;
|
|
196
|
-
--ring: oklch(0.992 0.019 155.826);
|
|
197
|
-
--radius: 0.625rem;
|
|
198
|
-
--font-family: "Helvetica Now Display", "Helvetica", sans-serif;
|
|
199
|
-
|
|
200
|
-
/* Component-specific variables (default to base variables, can be overridden) */
|
|
201
|
-
--sidebar: var(--background);
|
|
202
|
-
--sidebar-foreground: var(--primary-accent);
|
|
203
|
-
--sidebar-primary: var(--primary-accent);
|
|
204
|
-
--sidebar-primary-foreground: var(--primary-foreground);
|
|
205
|
-
--sidebar-accent: var(--base-accent);
|
|
206
|
-
--sidebar-accent-foreground: var(--base-accent-foreground);
|
|
207
|
-
--sidebar-border: var(--border);
|
|
208
|
-
--sidebar-ring: var(--ring);
|
|
209
|
-
|
|
210
|
-
--card: var(--background);
|
|
211
|
-
--card-foreground: var(--primary-accent);
|
|
212
|
-
|
|
213
|
-
--popover: var(--background);
|
|
214
|
-
--popover-foreground: var(--primary-accent);
|
|
215
|
-
|
|
216
|
-
--dialog: var(--background);
|
|
217
|
-
--dialog-foreground: var(--foreground);
|
|
218
|
-
|
|
219
|
-
--sheet: var(--background);
|
|
220
|
-
--sheet-foreground: var(--foreground);
|
|
221
|
-
|
|
222
|
-
--tooltip: var(--background);
|
|
223
|
-
--tooltip-foreground: var(--primary-accent);
|
|
224
|
-
|
|
225
|
-
--dropdown-menu: var(--background);
|
|
226
|
-
--dropdown-menu-foreground: var(--primary-accent);
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
body {
|
|
230
|
-
@apply bg-background text-foreground;
|
|
231
|
-
}
|
|
232
|
-
```
|
|
233
|
-
|
|
234
|
-
**Key points**:
|
|
235
|
-
|
|
236
|
-
- The `@source` directive tells Tailwind v4 to scan the library's component files
|
|
237
|
-
- Tailwind will dynamically generate utility classes for any classes used in those components
|
|
238
|
-
- You must define all CSS variables the library expects
|
|
239
|
-
- VS Code may show a warning for `@source` - you can safely ignore it (it's a valid Tailwind v4 directive)
|
|
240
|
-
|
|
241
|
-
#### When to Use Option B
|
|
242
|
-
|
|
243
|
-
- You want complete control over CSS generation
|
|
244
|
-
- You're customizing Tailwind's configuration extensively
|
|
245
|
-
- You want to manage all CSS variables manually
|
|
246
|
-
- You're comfortable with more advanced Tailwind v4 configuration
|
|
247
|
-
|
|
248
|
-
---
|
|
249
|
-
|
|
250
|
-
## Customizing Component Colors
|
|
251
|
-
|
|
252
|
-
The library supports **component-specific color customization**. By default, all components use base color variables, but you can override individual component colors independently.
|
|
253
|
-
|
|
254
|
-
### How It Works
|
|
255
|
-
|
|
256
|
-
Component-specific variables (like `--sidebar`, `--card`, `--popover`, etc.) default to base variables but can be overridden:
|
|
257
|
-
|
|
258
|
-
```css
|
|
259
|
-
:root {
|
|
260
|
-
/* Base colors */
|
|
261
|
-
--background: oklch(0.992 0.019 155.826);
|
|
262
|
-
--primary-accent: oklch(0.992 0.019 155.826);
|
|
263
|
-
|
|
264
|
-
/* Override just the sidebar color */
|
|
265
|
-
--sidebar: oklch(0.2 0.05 200); /* Custom sidebar background */
|
|
266
|
-
--sidebar-foreground: oklch(0.9 0.02 150); /* Custom sidebar text */
|
|
267
|
-
|
|
268
|
-
/* Override card independently */
|
|
269
|
-
--card: oklch(0.95 0.02 150);
|
|
270
|
-
--card-foreground: oklch(0.1 0.05 200);
|
|
271
|
-
|
|
272
|
-
/* All other components still use --background */
|
|
273
|
-
}
|
|
274
|
-
```
|
|
275
|
-
|
|
276
|
-
### Available Component Variables
|
|
277
|
-
|
|
278
|
-
- **Sidebar**: `--sidebar`, `--sidebar-foreground`, `--sidebar-accent`, `--sidebar-accent-foreground`, `--sidebar-border`, `--sidebar-ring`
|
|
279
|
-
- **Card**: `--card`, `--card-foreground`
|
|
280
|
-
- **Popover**: `--popover`, `--popover-foreground`
|
|
281
|
-
- **Dialog**: `--dialog`, `--dialog-foreground`
|
|
282
|
-
- **Sheet**: `--sheet`, `--sheet-foreground`
|
|
283
|
-
- **Tooltip**: `--tooltip`, `--tooltip-foreground`
|
|
284
|
-
- **Dropdown Menu**: `--dropdown-menu`, `--dropdown-menu-foreground`
|
|
285
|
-
|
|
286
|
-
### Example: Custom Sidebar Theme
|
|
287
|
-
|
|
288
|
-
```css
|
|
289
|
-
:root {
|
|
290
|
-
/* Custom sidebar with different colors */
|
|
291
|
-
--sidebar: oklch(0.15 0.05 250); /* Dark blue sidebar */
|
|
292
|
-
--sidebar-foreground: oklch(0.95 0.02 150); /* Light text */
|
|
293
|
-
--sidebar-accent: oklch(0.25 0.08 250); /* Hover state */
|
|
294
|
-
--sidebar-accent-foreground: oklch(0.98 0.01 150);
|
|
295
|
-
}
|
|
296
|
-
```
|
|
297
|
-
|
|
298
|
-
---
|
|
299
|
-
|
|
300
|
-
## Typography & Sizing
|
|
301
|
-
|
|
302
|
-
### Default Font
|
|
303
|
-
|
|
304
|
-
The library uses **Helvetica Now Display** as the default font family. This font is included in the library and will be automatically loaded when you import the styles.
|
|
305
|
-
|
|
306
|
-
### Font Sizes
|
|
307
|
-
|
|
308
|
-
The library uses **rem-based sizing** with a base font size of **1rem (16px)**. All font sizes use rem units for better accessibility and scalability:
|
|
309
|
-
|
|
310
|
-
- **Base text**: 1rem (16px)
|
|
311
|
-
- **Small text**: 0.875rem (14px) - Used in small buttons, captions, etc.
|
|
312
|
-
- **Large text**: 1.125rem (18px) and above
|
|
313
|
-
|
|
314
|
-
### Button Sizes
|
|
315
|
-
|
|
316
|
-
Buttons have the following font sizes by default:
|
|
317
|
-
|
|
318
|
-
- **Small** (`size="sm"`): 0.875rem (14px)
|
|
319
|
-
- **Default**: 1rem (16px)
|
|
320
|
-
- **Large** (`size="lg"`): 1rem (16px)
|
|
321
|
-
|
|
322
|
-
You can override these sizes using Tailwind's text utility classes (e.g., `className="text-lg"`) on any component.
|
|
323
|
-
|
|
324
|
-
## Customizing Font
|
|
325
|
-
|
|
326
|
-
You can override the default font family by setting the `--font-family` CSS variable in your own CSS file:
|
|
327
|
-
|
|
328
|
-
```css
|
|
329
|
-
/* In your app.css or globals.css */
|
|
330
|
-
@import "tailwindcss";
|
|
331
|
-
@import "@alkimi.org/ui-kit/styles.css";
|
|
332
|
-
|
|
333
|
-
@layer base {
|
|
334
|
-
:root {
|
|
335
|
-
/* Override the library's default font */
|
|
336
|
-
--font-family: "Your Custom Font", "Helvetica", sans-serif;
|
|
337
|
-
}
|
|
338
|
-
}
|
|
339
|
-
```
|
|
340
|
-
|
|
341
|
-
Make sure to include your custom font using `@font-face` or a web font service like Google Fonts:
|
|
342
|
-
|
|
343
|
-
```css
|
|
344
|
-
/* Example: Using Google Fonts */
|
|
345
|
-
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");
|
|
346
|
-
|
|
347
|
-
@layer base {
|
|
348
|
-
:root {
|
|
349
|
-
--font-family: "Inter", system-ui, sans-serif;
|
|
350
|
-
}
|
|
351
|
-
}
|
|
352
|
-
```
|
|
353
|
-
|
|
354
|
-
## Available Components
|
|
355
|
-
|
|
356
|
-
### Sidebar
|
|
357
|
-
|
|
358
|
-
A collapsible sidebar component with responsive design and keyboard shortcuts. The sidebar supports multiple variants, collapsible modes, and includes all necessary sub-components for building navigation interfaces.
|
|
359
|
-
|
|
360
|
-
#### Basic Usage
|
|
361
|
-
|
|
362
|
-
```tsx
|
|
363
|
-
import {
|
|
364
|
-
Sidebar,
|
|
365
|
-
SidebarContent,
|
|
366
|
-
SidebarHeader,
|
|
367
|
-
SidebarProvider,
|
|
368
|
-
SidebarInset,
|
|
369
|
-
SidebarTrigger,
|
|
370
|
-
} from "@alkimi.org/ui-kit"
|
|
371
|
-
|
|
372
|
-
function App() {
|
|
373
|
-
return (
|
|
374
|
-
<SidebarProvider>
|
|
375
|
-
<Sidebar collapsible="icon">
|
|
376
|
-
<SidebarHeader showTrigger>
|
|
377
|
-
<h2>My App</h2>
|
|
378
|
-
</SidebarHeader>
|
|
379
|
-
<SidebarContent>{/* Your sidebar content */}</SidebarContent>
|
|
380
|
-
</Sidebar>
|
|
381
|
-
<SidebarInset>
|
|
382
|
-
<header>
|
|
383
|
-
<SidebarTrigger />
|
|
384
|
-
<h1>Main Content Area</h1>
|
|
385
|
-
</header>
|
|
386
|
-
{/* Your main content */}
|
|
387
|
-
</SidebarInset>
|
|
388
|
-
</SidebarProvider>
|
|
389
|
-
)
|
|
390
|
-
}
|
|
391
|
-
```
|
|
392
|
-
|
|
393
|
-
#### Components
|
|
394
|
-
|
|
395
|
-
##### SidebarProvider
|
|
396
|
-
|
|
397
|
-
Wraps your entire layout and provides sidebar context.
|
|
398
|
-
|
|
399
|
-
**Props:**
|
|
400
|
-
|
|
401
|
-
- `defaultOpen?: boolean` - Initial sidebar state (default: `true`)
|
|
402
|
-
- `open?: boolean` - Controlled sidebar state
|
|
403
|
-
- `onOpenChange?: (open: boolean) => void` - Callback when sidebar state changes
|
|
404
|
-
|
|
405
|
-
##### Sidebar
|
|
406
|
-
|
|
407
|
-
The main sidebar container.
|
|
408
|
-
|
|
409
|
-
**Props:**
|
|
410
|
-
|
|
411
|
-
- `side?: "left" | "right"` - Sidebar position (default: `"left"`)
|
|
412
|
-
- `variant?: "sidebar" | "floating" | "inset"` - Visual style (default: `"sidebar"`)
|
|
413
|
-
- `collapsible?: "offcanvas" | "icon" | "none"` - Collapse behavior (default: `"offcanvas"`)
|
|
414
|
-
- `offcanvas` - Sidebar slides completely off-screen
|
|
415
|
-
- `icon` - Sidebar collapses to icon-only mode
|
|
416
|
-
- `none` - Sidebar is always visible and non-collapsible
|
|
417
|
-
|
|
418
|
-
##### SidebarHeader
|
|
419
|
-
|
|
420
|
-
Header section of the sidebar.
|
|
421
|
-
|
|
422
|
-
**Props:**
|
|
423
|
-
|
|
424
|
-
- `showTrigger?: boolean` - Show toggle button in header (default: `false`)
|
|
425
|
-
|
|
426
|
-
##### SidebarContent
|
|
427
|
-
|
|
428
|
-
Scrollable content area of the sidebar.
|
|
429
|
-
|
|
430
|
-
##### SidebarFooter
|
|
431
|
-
|
|
432
|
-
Footer section of the sidebar.
|
|
433
|
-
|
|
434
|
-
##### SidebarTrigger
|
|
435
|
-
|
|
436
|
-
Button to toggle sidebar visibility. Automatically shows appropriate icons for mobile and desktop.
|
|
437
|
-
|
|
438
|
-
##### SidebarInset
|
|
439
|
-
|
|
440
|
-
Main content area wrapper that adapts to sidebar state.
|
|
441
|
-
|
|
442
|
-
##### Navigation Components
|
|
443
|
-
|
|
444
|
-
Build navigation menus using these components:
|
|
445
|
-
|
|
446
|
-
```tsx
|
|
447
|
-
import {
|
|
448
|
-
SidebarMenu,
|
|
449
|
-
SidebarMenuItem,
|
|
450
|
-
SidebarMenuButton,
|
|
451
|
-
SidebarGroup,
|
|
452
|
-
SidebarGroupLabel,
|
|
453
|
-
SidebarGroupContent,
|
|
454
|
-
} from "@alkimi.org/ui-kit"
|
|
455
|
-
|
|
456
|
-
;<SidebarGroup>
|
|
457
|
-
<SidebarGroupLabel>Navigation</SidebarGroupLabel>
|
|
458
|
-
<SidebarGroupContent>
|
|
459
|
-
<SidebarMenu>
|
|
460
|
-
<SidebarMenuItem>
|
|
461
|
-
<SidebarMenuButton tooltip="Home">
|
|
462
|
-
<Home />
|
|
463
|
-
<span>Home</span>
|
|
464
|
-
</SidebarMenuButton>
|
|
465
|
-
</SidebarMenuItem>
|
|
466
|
-
</SidebarMenu>
|
|
467
|
-
</SidebarGroupContent>
|
|
468
|
-
</SidebarGroup>
|
|
469
|
-
```
|
|
470
|
-
|
|
471
|
-
**Available Components:**
|
|
472
|
-
|
|
473
|
-
- `SidebarGroup` - Groups related menu items
|
|
474
|
-
- `SidebarGroupLabel` - Label for a group
|
|
475
|
-
- `SidebarGroupContent` - Container for group items
|
|
476
|
-
- `SidebarGroupAction` - Action button for a group
|
|
477
|
-
- `SidebarMenu` - Menu list container
|
|
478
|
-
- `SidebarMenuItem` - Individual menu item
|
|
479
|
-
- `SidebarMenuButton` - Interactive menu button with tooltip support
|
|
480
|
-
- `SidebarMenuAction` - Action button for menu items
|
|
481
|
-
- `SidebarMenuBadge` - Badge/count indicator
|
|
482
|
-
- `SidebarMenuSub` - Submenu container
|
|
483
|
-
- `SidebarMenuSubItem` - Submenu item
|
|
484
|
-
- `SidebarMenuSubButton` - Submenu button
|
|
485
|
-
|
|
486
|
-
##### SidebarMenuButton Props
|
|
487
|
-
|
|
488
|
-
- `variant?: "default" | "outline"` - Visual style
|
|
489
|
-
- `size?: "default" | "sm" | "lg"` - Button size
|
|
490
|
-
- `isActive?: boolean` - Highlight as active
|
|
491
|
-
- `tooltip?: string | TooltipProps` - Tooltip text or props
|
|
492
|
-
- `asChild?: boolean` - Render as child component (e.g., for links)
|
|
493
|
-
|
|
494
|
-
##### Utility Components
|
|
495
|
-
|
|
496
|
-
- `SidebarInput` - Styled input for sidebar (e.g., search)
|
|
497
|
-
- `SidebarSeparator` - Visual separator
|
|
498
|
-
- `SidebarRail` - Clickable rail for toggling sidebar
|
|
499
|
-
- `SidebarMenuSkeleton` - Loading skeleton for menu items
|
|
500
|
-
|
|
501
|
-
##### useSidebar Hook
|
|
502
|
-
|
|
503
|
-
Access sidebar state and controls from any component within `SidebarProvider`:
|
|
504
|
-
|
|
505
|
-
```tsx
|
|
506
|
-
import { useSidebar } from "@alkimi.org/ui-kit"
|
|
507
|
-
|
|
508
|
-
function MyComponent() {
|
|
509
|
-
const { state, open, toggleSidebar, isMobile } = useSidebar()
|
|
510
|
-
|
|
511
|
-
return (
|
|
512
|
-
<div>
|
|
513
|
-
Sidebar is {state} {/* "expanded" or "collapsed" */}
|
|
514
|
-
</div>
|
|
515
|
-
)
|
|
516
|
-
}
|
|
517
|
-
```
|
|
518
|
-
|
|
519
|
-
**Returns:**
|
|
520
|
-
|
|
521
|
-
- `state: "expanded" | "collapsed"` - Current sidebar state
|
|
522
|
-
- `open: boolean` - Whether sidebar is open (desktop)
|
|
523
|
-
- `setOpen: (open: boolean) => void` - Set sidebar state
|
|
524
|
-
- `openMobile: boolean` - Whether sidebar is open (mobile)
|
|
525
|
-
- `setOpenMobile: (open: boolean) => void` - Set mobile sidebar state
|
|
526
|
-
- `isMobile: boolean` - Whether viewing on mobile
|
|
527
|
-
- `toggleSidebar: () => void` - Toggle sidebar visibility
|
|
528
|
-
|
|
529
|
-
#### Keyboard Shortcuts
|
|
530
|
-
|
|
531
|
-
- `Cmd+B` (Mac) or `Ctrl+B` (Windows/Linux) - Toggle sidebar
|
|
532
|
-
|
|
533
|
-
#### Responsive Behavior
|
|
534
|
-
|
|
535
|
-
- **Desktop**: Sidebar is fixed and collapsible based on the `collapsible` prop
|
|
536
|
-
- **Mobile**: Sidebar automatically becomes a slide-out sheet overlay
|
|
537
|
-
|
|
538
|
-
## Usage
|
|
539
|
-
|
|
540
|
-
You can import components in two ways:
|
|
541
|
-
|
|
542
|
-
### Option 1: Import from Main Package
|
|
543
|
-
|
|
544
|
-
Import all components from the main package entry point:
|
|
545
|
-
|
|
546
|
-
```tsx
|
|
547
|
-
import { Button, Tabs } from "@alkimi.org/ui-kit"
|
|
548
|
-
|
|
549
|
-
function App() {
|
|
550
|
-
return (
|
|
551
|
-
<div>
|
|
552
|
-
<Button>Click me</Button>
|
|
553
|
-
<Button variant="secondary">Secondary</Button>
|
|
554
|
-
<Button variant="destructive">Delete</Button>
|
|
555
|
-
<Button variant="outline">Outline</Button>
|
|
556
|
-
<Button variant="ghost">Ghost</Button>
|
|
557
|
-
<Button variant="link">Link</Button>
|
|
558
|
-
<Button size="sm">Small</Button>
|
|
559
|
-
<Button size="lg">Large</Button>
|
|
560
|
-
</div>
|
|
561
|
-
)
|
|
562
|
-
}
|
|
563
|
-
```
|
|
564
|
-
|
|
565
|
-
### Option 2: Import Individual Components (Optimized Bundle Size)
|
|
566
|
-
|
|
567
|
-
For better code splitting and smaller production bundles, import components individually:
|
|
568
|
-
|
|
569
|
-
```tsx
|
|
570
|
-
// Import only the Button component
|
|
571
|
-
import { Button } from "@alkimi.org/ui-kit/button"
|
|
572
|
-
|
|
573
|
-
// Import only the Tabs components
|
|
574
|
-
import {
|
|
575
|
-
Tabs,
|
|
576
|
-
TabsList,
|
|
577
|
-
TabsTrigger,
|
|
578
|
-
TabsContent,
|
|
579
|
-
} from "@alkimi.org/ui-kit/tabs"
|
|
580
|
-
|
|
581
|
-
// Import utilities
|
|
582
|
-
import { cn } from "@alkimi.org/ui-kit/utils"
|
|
583
|
-
```
|
|
584
|
-
|
|
585
|
-
**Note**: Both import methods require installing the full `@alkimi.org/ui-kit` package. The individual imports help optimize your production bundle size (only used components are included), but don't reduce installation size.
|
|
586
|
-
|
|
587
|
-
## License
|
|
588
|
-
|
|
589
|
-
MIT
|
|
1
|
+
# Alkimi UI Kit
|
|
2
|
+
|
|
3
|
+
A React component library built with [shadcn/ui](https://ui.shadcn.com/) and [Tailwind CSS](https://tailwindcss.com/).
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @alkimi.org/ui-kit
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Setup
|
|
12
|
+
|
|
13
|
+
You have **two setup options** depending on your needs:
|
|
14
|
+
|
|
15
|
+
- **Option A (Recommended)**: Import pre-compiled library styles - simpler setup, works immediately
|
|
16
|
+
- **Option B (Advanced)**: Manual styling with full control - requires more configuration
|
|
17
|
+
|
|
18
|
+
Choose the option that best fits your project requirements.
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
### Option A: Import Library Styles (Recommended)
|
|
23
|
+
|
|
24
|
+
**Best for**: Most projects. Simple setup with minimal configuration.
|
|
25
|
+
|
|
26
|
+
**What you get**: Pre-compiled utility classes (`rounded-lg`, `bg-primary`, etc.) + CSS variables + fonts
|
|
27
|
+
|
|
28
|
+
#### 1. Install Tailwind CSS v4
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
npm install -D tailwindcss@next @tailwindcss/postcss@next postcss autoprefixer
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
#### 2. Configure PostCSS
|
|
35
|
+
|
|
36
|
+
Create or update your `postcss.config.js`:
|
|
37
|
+
|
|
38
|
+
```js
|
|
39
|
+
module.exports = {
|
|
40
|
+
plugins: {
|
|
41
|
+
"@tailwindcss/postcss": {},
|
|
42
|
+
autoprefixer: {},
|
|
43
|
+
},
|
|
44
|
+
}
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
#### 3. Import Library Styles
|
|
48
|
+
|
|
49
|
+
In your root layout file (e.g., `app/layout.tsx` for Next.js App Router):
|
|
50
|
+
|
|
51
|
+
```tsx
|
|
52
|
+
import "@alkimi.org/ui-kit/styles.css"
|
|
53
|
+
import "./globals.css" // Your custom CSS
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
**Important**: Import the library styles **before** your custom CSS so you can override variables if needed.
|
|
57
|
+
|
|
58
|
+
#### 4. Configure Your CSS
|
|
59
|
+
|
|
60
|
+
Create your `globals.css`:
|
|
61
|
+
|
|
62
|
+
```css
|
|
63
|
+
@import "tailwindcss";
|
|
64
|
+
|
|
65
|
+
/* Optional: Override library CSS variables */
|
|
66
|
+
:root {
|
|
67
|
+
/* Base color variables */
|
|
68
|
+
--background: oklch(0.992 0.019 155.826);
|
|
69
|
+
--foreground: oklch(0.205 0 0);
|
|
70
|
+
--primary: oklch(0.992 0.019 155.826);
|
|
71
|
+
--primary-foreground: oklch(0.205 0 0);
|
|
72
|
+
--secondary: oklch(0.269 0 0);
|
|
73
|
+
--secondary-foreground: oklch(0.992 0.019 155.826);
|
|
74
|
+
--muted: oklch(0.269 0 0);
|
|
75
|
+
--muted-foreground: oklch(0.608 0 0);
|
|
76
|
+
--accent: oklch(0.269 0 0);
|
|
77
|
+
--accent-foreground: oklch(0.992 0.019 155.826);
|
|
78
|
+
--destructive: oklch(0.576 0.214 25.467);
|
|
79
|
+
--destructive-foreground: oklch(0.992 0.019 155.826);
|
|
80
|
+
--border: #3f3f46;
|
|
81
|
+
--input: #3f3f46;
|
|
82
|
+
--ring: oklch(0.992 0.019 155.826);
|
|
83
|
+
--radius: 0.625rem;
|
|
84
|
+
|
|
85
|
+
/* Component-specific variables (optional - default to base variables) */
|
|
86
|
+
/* Override these to customize individual components independently */
|
|
87
|
+
--sidebar: var(--background);
|
|
88
|
+
--sidebar-foreground: var(--primary-accent);
|
|
89
|
+
--sidebar-accent: var(--base-accent);
|
|
90
|
+
--sidebar-accent-foreground: var(--base-accent-foreground);
|
|
91
|
+
--sidebar-border: var(--border);
|
|
92
|
+
--sidebar-ring: var(--ring);
|
|
93
|
+
|
|
94
|
+
--card: var(--background);
|
|
95
|
+
--card-foreground: var(--primary-accent);
|
|
96
|
+
|
|
97
|
+
--popover: var(--background);
|
|
98
|
+
--popover-foreground: var(--primary-accent);
|
|
99
|
+
|
|
100
|
+
--dialog: var(--background);
|
|
101
|
+
--dialog-foreground: var(--foreground);
|
|
102
|
+
|
|
103
|
+
--sheet: var(--background);
|
|
104
|
+
--sheet-foreground: var(--foreground);
|
|
105
|
+
|
|
106
|
+
--tooltip: var(--background);
|
|
107
|
+
--tooltip-foreground: var(--primary-accent);
|
|
108
|
+
|
|
109
|
+
--dropdown-menu: var(--background);
|
|
110
|
+
--dropdown-menu-foreground: var(--primary-accent);
|
|
111
|
+
}
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
**That's it!** The library components will work immediately because:
|
|
115
|
+
|
|
116
|
+
- `styles.css` contains pre-compiled utility classes
|
|
117
|
+
- All CSS variables are defined
|
|
118
|
+
- Fonts are included
|
|
119
|
+
- **No `@source` directive needed** (utilities are already compiled into the CSS)
|
|
120
|
+
|
|
121
|
+
#### When to Use Option A
|
|
122
|
+
|
|
123
|
+
- You want the quickest setup
|
|
124
|
+
- You're happy with the library's default styling approach
|
|
125
|
+
- You want to customize colors via CSS variables
|
|
126
|
+
- You don't need complete control over Tailwind configuration
|
|
127
|
+
|
|
128
|
+
---
|
|
129
|
+
|
|
130
|
+
### Option B: Manual Styling (Advanced)
|
|
131
|
+
|
|
132
|
+
**Best for**: Advanced users who want complete control over CSS generation and Tailwind configuration.
|
|
133
|
+
|
|
134
|
+
**What you do**: Define all CSS variables yourself and use `@source` to dynamically generate utility classes.
|
|
135
|
+
|
|
136
|
+
#### 1. Install Tailwind CSS v4
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
npm install -D tailwindcss@next @tailwindcss/postcss@next postcss autoprefixer
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
#### 2. Configure PostCSS
|
|
143
|
+
|
|
144
|
+
Create or update your `postcss.config.js`:
|
|
145
|
+
|
|
146
|
+
```js
|
|
147
|
+
module.exports = {
|
|
148
|
+
plugins: {
|
|
149
|
+
"@tailwindcss/postcss": {},
|
|
150
|
+
autoprefixer: {},
|
|
151
|
+
},
|
|
152
|
+
}
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
#### 3. Do NOT Import Library Styles
|
|
156
|
+
|
|
157
|
+
In your root layout file (e.g., `app/layout.tsx`):
|
|
158
|
+
|
|
159
|
+
```tsx
|
|
160
|
+
// ❌ Do NOT import library styles in Option B
|
|
161
|
+
// import "@alkimi.org/ui-kit/styles.css"
|
|
162
|
+
|
|
163
|
+
import "./globals.css" // Only import your custom CSS
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
#### 4. Configure Your CSS with @source
|
|
167
|
+
|
|
168
|
+
Create your `globals.css`:
|
|
169
|
+
|
|
170
|
+
```css
|
|
171
|
+
@import "tailwindcss";
|
|
172
|
+
|
|
173
|
+
/* REQUIRED: Tell Tailwind v4 to scan library components */
|
|
174
|
+
@source "../node_modules/@alkimi.org/ui-kit/dist/**/*.{js,mjs}";
|
|
175
|
+
|
|
176
|
+
/* REQUIRED: Define ALL CSS variables the library needs */
|
|
177
|
+
:root {
|
|
178
|
+
/* Base color variables */
|
|
179
|
+
--background: oklch(0.992 0.019 155.826);
|
|
180
|
+
--foreground: oklch(0.205 0 0);
|
|
181
|
+
--primary: oklch(0.992 0.019 155.826);
|
|
182
|
+
--primary-foreground: oklch(0.205 0 0);
|
|
183
|
+
--primary-accent: oklch(0.992 0.019 155.826);
|
|
184
|
+
--secondary: oklch(0.269 0 0);
|
|
185
|
+
--secondary-foreground: oklch(0.992 0.019 155.826);
|
|
186
|
+
--muted: oklch(0.269 0 0);
|
|
187
|
+
--muted-foreground: oklch(0.608 0 0);
|
|
188
|
+
--accent: oklch(0.269 0 0);
|
|
189
|
+
--accent-foreground: oklch(0.992 0.019 155.826);
|
|
190
|
+
--base-accent: oklch(0.269 0 0);
|
|
191
|
+
--base-accent-foreground: oklch(0.992 0.019 155.826);
|
|
192
|
+
--destructive: oklch(0.576 0.214 25.467);
|
|
193
|
+
--destructive-foreground: oklch(0.992 0.019 155.826);
|
|
194
|
+
--border: #3f3f46;
|
|
195
|
+
--input: #3f3f46;
|
|
196
|
+
--ring: oklch(0.992 0.019 155.826);
|
|
197
|
+
--radius: 0.625rem;
|
|
198
|
+
--font-family: "Helvetica Now Display", "Helvetica", sans-serif;
|
|
199
|
+
|
|
200
|
+
/* Component-specific variables (default to base variables, can be overridden) */
|
|
201
|
+
--sidebar: var(--background);
|
|
202
|
+
--sidebar-foreground: var(--primary-accent);
|
|
203
|
+
--sidebar-primary: var(--primary-accent);
|
|
204
|
+
--sidebar-primary-foreground: var(--primary-foreground);
|
|
205
|
+
--sidebar-accent: var(--base-accent);
|
|
206
|
+
--sidebar-accent-foreground: var(--base-accent-foreground);
|
|
207
|
+
--sidebar-border: var(--border);
|
|
208
|
+
--sidebar-ring: var(--ring);
|
|
209
|
+
|
|
210
|
+
--card: var(--background);
|
|
211
|
+
--card-foreground: var(--primary-accent);
|
|
212
|
+
|
|
213
|
+
--popover: var(--background);
|
|
214
|
+
--popover-foreground: var(--primary-accent);
|
|
215
|
+
|
|
216
|
+
--dialog: var(--background);
|
|
217
|
+
--dialog-foreground: var(--foreground);
|
|
218
|
+
|
|
219
|
+
--sheet: var(--background);
|
|
220
|
+
--sheet-foreground: var(--foreground);
|
|
221
|
+
|
|
222
|
+
--tooltip: var(--background);
|
|
223
|
+
--tooltip-foreground: var(--primary-accent);
|
|
224
|
+
|
|
225
|
+
--dropdown-menu: var(--background);
|
|
226
|
+
--dropdown-menu-foreground: var(--primary-accent);
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
body {
|
|
230
|
+
@apply bg-background text-foreground;
|
|
231
|
+
}
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
**Key points**:
|
|
235
|
+
|
|
236
|
+
- The `@source` directive tells Tailwind v4 to scan the library's component files
|
|
237
|
+
- Tailwind will dynamically generate utility classes for any classes used in those components
|
|
238
|
+
- You must define all CSS variables the library expects
|
|
239
|
+
- VS Code may show a warning for `@source` - you can safely ignore it (it's a valid Tailwind v4 directive)
|
|
240
|
+
|
|
241
|
+
#### When to Use Option B
|
|
242
|
+
|
|
243
|
+
- You want complete control over CSS generation
|
|
244
|
+
- You're customizing Tailwind's configuration extensively
|
|
245
|
+
- You want to manage all CSS variables manually
|
|
246
|
+
- You're comfortable with more advanced Tailwind v4 configuration
|
|
247
|
+
|
|
248
|
+
---
|
|
249
|
+
|
|
250
|
+
## Customizing Component Colors
|
|
251
|
+
|
|
252
|
+
The library supports **component-specific color customization**. By default, all components use base color variables, but you can override individual component colors independently.
|
|
253
|
+
|
|
254
|
+
### How It Works
|
|
255
|
+
|
|
256
|
+
Component-specific variables (like `--sidebar`, `--card`, `--popover`, etc.) default to base variables but can be overridden:
|
|
257
|
+
|
|
258
|
+
```css
|
|
259
|
+
:root {
|
|
260
|
+
/* Base colors */
|
|
261
|
+
--background: oklch(0.992 0.019 155.826);
|
|
262
|
+
--primary-accent: oklch(0.992 0.019 155.826);
|
|
263
|
+
|
|
264
|
+
/* Override just the sidebar color */
|
|
265
|
+
--sidebar: oklch(0.2 0.05 200); /* Custom sidebar background */
|
|
266
|
+
--sidebar-foreground: oklch(0.9 0.02 150); /* Custom sidebar text */
|
|
267
|
+
|
|
268
|
+
/* Override card independently */
|
|
269
|
+
--card: oklch(0.95 0.02 150);
|
|
270
|
+
--card-foreground: oklch(0.1 0.05 200);
|
|
271
|
+
|
|
272
|
+
/* All other components still use --background */
|
|
273
|
+
}
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
### Available Component Variables
|
|
277
|
+
|
|
278
|
+
- **Sidebar**: `--sidebar`, `--sidebar-foreground`, `--sidebar-accent`, `--sidebar-accent-foreground`, `--sidebar-border`, `--sidebar-ring`
|
|
279
|
+
- **Card**: `--card`, `--card-foreground`
|
|
280
|
+
- **Popover**: `--popover`, `--popover-foreground`
|
|
281
|
+
- **Dialog**: `--dialog`, `--dialog-foreground`
|
|
282
|
+
- **Sheet**: `--sheet`, `--sheet-foreground`
|
|
283
|
+
- **Tooltip**: `--tooltip`, `--tooltip-foreground`
|
|
284
|
+
- **Dropdown Menu**: `--dropdown-menu`, `--dropdown-menu-foreground`
|
|
285
|
+
|
|
286
|
+
### Example: Custom Sidebar Theme
|
|
287
|
+
|
|
288
|
+
```css
|
|
289
|
+
:root {
|
|
290
|
+
/* Custom sidebar with different colors */
|
|
291
|
+
--sidebar: oklch(0.15 0.05 250); /* Dark blue sidebar */
|
|
292
|
+
--sidebar-foreground: oklch(0.95 0.02 150); /* Light text */
|
|
293
|
+
--sidebar-accent: oklch(0.25 0.08 250); /* Hover state */
|
|
294
|
+
--sidebar-accent-foreground: oklch(0.98 0.01 150);
|
|
295
|
+
}
|
|
296
|
+
```
|
|
297
|
+
|
|
298
|
+
---
|
|
299
|
+
|
|
300
|
+
## Typography & Sizing
|
|
301
|
+
|
|
302
|
+
### Default Font
|
|
303
|
+
|
|
304
|
+
The library uses **Helvetica Now Display** as the default font family. This font is included in the library and will be automatically loaded when you import the styles.
|
|
305
|
+
|
|
306
|
+
### Font Sizes
|
|
307
|
+
|
|
308
|
+
The library uses **rem-based sizing** with a base font size of **1rem (16px)**. All font sizes use rem units for better accessibility and scalability:
|
|
309
|
+
|
|
310
|
+
- **Base text**: 1rem (16px)
|
|
311
|
+
- **Small text**: 0.875rem (14px) - Used in small buttons, captions, etc.
|
|
312
|
+
- **Large text**: 1.125rem (18px) and above
|
|
313
|
+
|
|
314
|
+
### Button Sizes
|
|
315
|
+
|
|
316
|
+
Buttons have the following font sizes by default:
|
|
317
|
+
|
|
318
|
+
- **Small** (`size="sm"`): 0.875rem (14px)
|
|
319
|
+
- **Default**: 1rem (16px)
|
|
320
|
+
- **Large** (`size="lg"`): 1rem (16px)
|
|
321
|
+
|
|
322
|
+
You can override these sizes using Tailwind's text utility classes (e.g., `className="text-lg"`) on any component.
|
|
323
|
+
|
|
324
|
+
## Customizing Font
|
|
325
|
+
|
|
326
|
+
You can override the default font family by setting the `--font-family` CSS variable in your own CSS file:
|
|
327
|
+
|
|
328
|
+
```css
|
|
329
|
+
/* In your app.css or globals.css */
|
|
330
|
+
@import "tailwindcss";
|
|
331
|
+
@import "@alkimi.org/ui-kit/styles.css";
|
|
332
|
+
|
|
333
|
+
@layer base {
|
|
334
|
+
:root {
|
|
335
|
+
/* Override the library's default font */
|
|
336
|
+
--font-family: "Your Custom Font", "Helvetica", sans-serif;
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
```
|
|
340
|
+
|
|
341
|
+
Make sure to include your custom font using `@font-face` or a web font service like Google Fonts:
|
|
342
|
+
|
|
343
|
+
```css
|
|
344
|
+
/* Example: Using Google Fonts */
|
|
345
|
+
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");
|
|
346
|
+
|
|
347
|
+
@layer base {
|
|
348
|
+
:root {
|
|
349
|
+
--font-family: "Inter", system-ui, sans-serif;
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
```
|
|
353
|
+
|
|
354
|
+
## Available Components
|
|
355
|
+
|
|
356
|
+
### Sidebar
|
|
357
|
+
|
|
358
|
+
A collapsible sidebar component with responsive design and keyboard shortcuts. The sidebar supports multiple variants, collapsible modes, and includes all necessary sub-components for building navigation interfaces.
|
|
359
|
+
|
|
360
|
+
#### Basic Usage
|
|
361
|
+
|
|
362
|
+
```tsx
|
|
363
|
+
import {
|
|
364
|
+
Sidebar,
|
|
365
|
+
SidebarContent,
|
|
366
|
+
SidebarHeader,
|
|
367
|
+
SidebarProvider,
|
|
368
|
+
SidebarInset,
|
|
369
|
+
SidebarTrigger,
|
|
370
|
+
} from "@alkimi.org/ui-kit"
|
|
371
|
+
|
|
372
|
+
function App() {
|
|
373
|
+
return (
|
|
374
|
+
<SidebarProvider>
|
|
375
|
+
<Sidebar collapsible="icon">
|
|
376
|
+
<SidebarHeader showTrigger>
|
|
377
|
+
<h2>My App</h2>
|
|
378
|
+
</SidebarHeader>
|
|
379
|
+
<SidebarContent>{/* Your sidebar content */}</SidebarContent>
|
|
380
|
+
</Sidebar>
|
|
381
|
+
<SidebarInset>
|
|
382
|
+
<header>
|
|
383
|
+
<SidebarTrigger />
|
|
384
|
+
<h1>Main Content Area</h1>
|
|
385
|
+
</header>
|
|
386
|
+
{/* Your main content */}
|
|
387
|
+
</SidebarInset>
|
|
388
|
+
</SidebarProvider>
|
|
389
|
+
)
|
|
390
|
+
}
|
|
391
|
+
```
|
|
392
|
+
|
|
393
|
+
#### Components
|
|
394
|
+
|
|
395
|
+
##### SidebarProvider
|
|
396
|
+
|
|
397
|
+
Wraps your entire layout and provides sidebar context.
|
|
398
|
+
|
|
399
|
+
**Props:**
|
|
400
|
+
|
|
401
|
+
- `defaultOpen?: boolean` - Initial sidebar state (default: `true`)
|
|
402
|
+
- `open?: boolean` - Controlled sidebar state
|
|
403
|
+
- `onOpenChange?: (open: boolean) => void` - Callback when sidebar state changes
|
|
404
|
+
|
|
405
|
+
##### Sidebar
|
|
406
|
+
|
|
407
|
+
The main sidebar container.
|
|
408
|
+
|
|
409
|
+
**Props:**
|
|
410
|
+
|
|
411
|
+
- `side?: "left" | "right"` - Sidebar position (default: `"left"`)
|
|
412
|
+
- `variant?: "sidebar" | "floating" | "inset"` - Visual style (default: `"sidebar"`)
|
|
413
|
+
- `collapsible?: "offcanvas" | "icon" | "none"` - Collapse behavior (default: `"offcanvas"`)
|
|
414
|
+
- `offcanvas` - Sidebar slides completely off-screen
|
|
415
|
+
- `icon` - Sidebar collapses to icon-only mode
|
|
416
|
+
- `none` - Sidebar is always visible and non-collapsible
|
|
417
|
+
|
|
418
|
+
##### SidebarHeader
|
|
419
|
+
|
|
420
|
+
Header section of the sidebar.
|
|
421
|
+
|
|
422
|
+
**Props:**
|
|
423
|
+
|
|
424
|
+
- `showTrigger?: boolean` - Show toggle button in header (default: `false`)
|
|
425
|
+
|
|
426
|
+
##### SidebarContent
|
|
427
|
+
|
|
428
|
+
Scrollable content area of the sidebar.
|
|
429
|
+
|
|
430
|
+
##### SidebarFooter
|
|
431
|
+
|
|
432
|
+
Footer section of the sidebar.
|
|
433
|
+
|
|
434
|
+
##### SidebarTrigger
|
|
435
|
+
|
|
436
|
+
Button to toggle sidebar visibility. Automatically shows appropriate icons for mobile and desktop.
|
|
437
|
+
|
|
438
|
+
##### SidebarInset
|
|
439
|
+
|
|
440
|
+
Main content area wrapper that adapts to sidebar state.
|
|
441
|
+
|
|
442
|
+
##### Navigation Components
|
|
443
|
+
|
|
444
|
+
Build navigation menus using these components:
|
|
445
|
+
|
|
446
|
+
```tsx
|
|
447
|
+
import {
|
|
448
|
+
SidebarMenu,
|
|
449
|
+
SidebarMenuItem,
|
|
450
|
+
SidebarMenuButton,
|
|
451
|
+
SidebarGroup,
|
|
452
|
+
SidebarGroupLabel,
|
|
453
|
+
SidebarGroupContent,
|
|
454
|
+
} from "@alkimi.org/ui-kit"
|
|
455
|
+
|
|
456
|
+
;<SidebarGroup>
|
|
457
|
+
<SidebarGroupLabel>Navigation</SidebarGroupLabel>
|
|
458
|
+
<SidebarGroupContent>
|
|
459
|
+
<SidebarMenu>
|
|
460
|
+
<SidebarMenuItem>
|
|
461
|
+
<SidebarMenuButton tooltip="Home">
|
|
462
|
+
<Home />
|
|
463
|
+
<span>Home</span>
|
|
464
|
+
</SidebarMenuButton>
|
|
465
|
+
</SidebarMenuItem>
|
|
466
|
+
</SidebarMenu>
|
|
467
|
+
</SidebarGroupContent>
|
|
468
|
+
</SidebarGroup>
|
|
469
|
+
```
|
|
470
|
+
|
|
471
|
+
**Available Components:**
|
|
472
|
+
|
|
473
|
+
- `SidebarGroup` - Groups related menu items
|
|
474
|
+
- `SidebarGroupLabel` - Label for a group
|
|
475
|
+
- `SidebarGroupContent` - Container for group items
|
|
476
|
+
- `SidebarGroupAction` - Action button for a group
|
|
477
|
+
- `SidebarMenu` - Menu list container
|
|
478
|
+
- `SidebarMenuItem` - Individual menu item
|
|
479
|
+
- `SidebarMenuButton` - Interactive menu button with tooltip support
|
|
480
|
+
- `SidebarMenuAction` - Action button for menu items
|
|
481
|
+
- `SidebarMenuBadge` - Badge/count indicator
|
|
482
|
+
- `SidebarMenuSub` - Submenu container
|
|
483
|
+
- `SidebarMenuSubItem` - Submenu item
|
|
484
|
+
- `SidebarMenuSubButton` - Submenu button
|
|
485
|
+
|
|
486
|
+
##### SidebarMenuButton Props
|
|
487
|
+
|
|
488
|
+
- `variant?: "default" | "outline"` - Visual style
|
|
489
|
+
- `size?: "default" | "sm" | "lg"` - Button size
|
|
490
|
+
- `isActive?: boolean` - Highlight as active
|
|
491
|
+
- `tooltip?: string | TooltipProps` - Tooltip text or props
|
|
492
|
+
- `asChild?: boolean` - Render as child component (e.g., for links)
|
|
493
|
+
|
|
494
|
+
##### Utility Components
|
|
495
|
+
|
|
496
|
+
- `SidebarInput` - Styled input for sidebar (e.g., search)
|
|
497
|
+
- `SidebarSeparator` - Visual separator
|
|
498
|
+
- `SidebarRail` - Clickable rail for toggling sidebar
|
|
499
|
+
- `SidebarMenuSkeleton` - Loading skeleton for menu items
|
|
500
|
+
|
|
501
|
+
##### useSidebar Hook
|
|
502
|
+
|
|
503
|
+
Access sidebar state and controls from any component within `SidebarProvider`:
|
|
504
|
+
|
|
505
|
+
```tsx
|
|
506
|
+
import { useSidebar } from "@alkimi.org/ui-kit"
|
|
507
|
+
|
|
508
|
+
function MyComponent() {
|
|
509
|
+
const { state, open, toggleSidebar, isMobile } = useSidebar()
|
|
510
|
+
|
|
511
|
+
return (
|
|
512
|
+
<div>
|
|
513
|
+
Sidebar is {state} {/* "expanded" or "collapsed" */}
|
|
514
|
+
</div>
|
|
515
|
+
)
|
|
516
|
+
}
|
|
517
|
+
```
|
|
518
|
+
|
|
519
|
+
**Returns:**
|
|
520
|
+
|
|
521
|
+
- `state: "expanded" | "collapsed"` - Current sidebar state
|
|
522
|
+
- `open: boolean` - Whether sidebar is open (desktop)
|
|
523
|
+
- `setOpen: (open: boolean) => void` - Set sidebar state
|
|
524
|
+
- `openMobile: boolean` - Whether sidebar is open (mobile)
|
|
525
|
+
- `setOpenMobile: (open: boolean) => void` - Set mobile sidebar state
|
|
526
|
+
- `isMobile: boolean` - Whether viewing on mobile
|
|
527
|
+
- `toggleSidebar: () => void` - Toggle sidebar visibility
|
|
528
|
+
|
|
529
|
+
#### Keyboard Shortcuts
|
|
530
|
+
|
|
531
|
+
- `Cmd+B` (Mac) or `Ctrl+B` (Windows/Linux) - Toggle sidebar
|
|
532
|
+
|
|
533
|
+
#### Responsive Behavior
|
|
534
|
+
|
|
535
|
+
- **Desktop**: Sidebar is fixed and collapsible based on the `collapsible` prop
|
|
536
|
+
- **Mobile**: Sidebar automatically becomes a slide-out sheet overlay
|
|
537
|
+
|
|
538
|
+
## Usage
|
|
539
|
+
|
|
540
|
+
You can import components in two ways:
|
|
541
|
+
|
|
542
|
+
### Option 1: Import from Main Package
|
|
543
|
+
|
|
544
|
+
Import all components from the main package entry point:
|
|
545
|
+
|
|
546
|
+
```tsx
|
|
547
|
+
import { Button, Tabs } from "@alkimi.org/ui-kit"
|
|
548
|
+
|
|
549
|
+
function App() {
|
|
550
|
+
return (
|
|
551
|
+
<div>
|
|
552
|
+
<Button>Click me</Button>
|
|
553
|
+
<Button variant="secondary">Secondary</Button>
|
|
554
|
+
<Button variant="destructive">Delete</Button>
|
|
555
|
+
<Button variant="outline">Outline</Button>
|
|
556
|
+
<Button variant="ghost">Ghost</Button>
|
|
557
|
+
<Button variant="link">Link</Button>
|
|
558
|
+
<Button size="sm">Small</Button>
|
|
559
|
+
<Button size="lg">Large</Button>
|
|
560
|
+
</div>
|
|
561
|
+
)
|
|
562
|
+
}
|
|
563
|
+
```
|
|
564
|
+
|
|
565
|
+
### Option 2: Import Individual Components (Optimized Bundle Size)
|
|
566
|
+
|
|
567
|
+
For better code splitting and smaller production bundles, import components individually:
|
|
568
|
+
|
|
569
|
+
```tsx
|
|
570
|
+
// Import only the Button component
|
|
571
|
+
import { Button } from "@alkimi.org/ui-kit/button"
|
|
572
|
+
|
|
573
|
+
// Import only the Tabs components
|
|
574
|
+
import {
|
|
575
|
+
Tabs,
|
|
576
|
+
TabsList,
|
|
577
|
+
TabsTrigger,
|
|
578
|
+
TabsContent,
|
|
579
|
+
} from "@alkimi.org/ui-kit/tabs"
|
|
580
|
+
|
|
581
|
+
// Import utilities
|
|
582
|
+
import { cn } from "@alkimi.org/ui-kit/utils"
|
|
583
|
+
```
|
|
584
|
+
|
|
585
|
+
**Note**: Both import methods require installing the full `@alkimi.org/ui-kit` package. The individual imports help optimize your production bundle size (only used components are included), but don't reduce installation size.
|
|
586
|
+
|
|
587
|
+
## License
|
|
588
|
+
|
|
589
|
+
MIT
|