|
3 | 3 | Shared UI primitives, design tokens, CSS-first Tailwind styles, and the `cn()` utility consumed by Dify's `web/` app. |
4 | 4 |
|
5 | 5 | The primitives are thin, opinionated wrappers around [Base UI] headless components, styled with `cva` + `cn` and Dify design tokens. |
| 6 | +For upstream component docs, start from the [Base UI docs index]. |
6 | 7 |
|
7 | 8 | > `private: true` — this package is consumed by `web/` via the pnpm workspace and is not published to npm. Treat the API as internal to Dify, but stable within the workspace. |
8 | 9 |
|
@@ -39,12 +40,16 @@ Importing from `@langgenius/dify-ui` (no subpath) is intentionally not supported |
39 | 40 |
|
40 | 41 | ## Primitives |
41 | 42 |
|
42 | | -| Category | Subpath | Notes | |
43 | | -| -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------- | |
44 | | -| Overlay | `./alert-dialog`, `./autocomplete`, `./combobox`, `./context-menu`, `./dialog`, `./drawer`, `./dropdown-menu`, `./popover`, `./select`, `./toast`, `./tooltip` | Portalled. See [Overlay & portal contract] below. | |
45 | | -| Form | `./form`, `./field`, `./fieldset`, `./checkbox`, `./checkbox-group`, `./number-field`, `./select`, `./slider`, `./switch` | Native form boundary, field semantics, and controls. | |
46 | | -| Layout | `./scroll-area` | Custom-styled scrollbar over the host viewport. | |
47 | | -| Media | `./avatar`, `./button` | Button exposes `cva` variants. | |
| 43 | +| Category | Subpath | Notes | |
| 44 | +| ---------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------- | |
| 45 | +| Actions | `./button` | Design-system CTA primitive with `cva` variants. | |
| 46 | +| Feedback | `./meter`, `./toast` | Meter is inline status; Toast owns the `z-60` layer. | |
| 47 | +| Form | `./form`, `./field`, `./fieldset`, `./input`, `./checkbox`, `./checkbox-group`, `./radio`, `./radio-group`, `./number-field`, `./select`, `./slider`, `./switch` | Native form boundary, field semantics, and controls. | |
| 48 | +| Layout | `./scroll-area` | Custom-styled scrollbar over the host viewport. | |
| 49 | +| Media | `./avatar` | Avatar root, image, and fallback primitives. | |
| 50 | +| Navigation | `./tabs`, `./toggle-group` | Tabs for panels; ToggleGroup for segmented modes. | |
| 51 | +| Overlay / menu | `./alert-dialog`, `./context-menu`, `./dialog`, `./drawer`, `./dropdown-menu`, `./popover`, `./preview-card`, `./tooltip` | Portalled. See [Overlay & portal contract] below. | |
| 52 | +| Search / pickers | `./autocomplete`, `./combobox`, `./select` | Search input, searchable picker, and closed picker. | |
48 | 53 |
|
49 | 54 | Utilities: |
50 | 55 |
|
@@ -174,5 +179,6 @@ See `[AGENTS.md](./AGENTS.md)` for: |
174 | 179 | [Base UI Fieldset]: https://base-ui.com/react/components/fieldset |
175 | 180 | [Base UI Form]: https://base-ui.com/react/components/form |
176 | 181 | [Base UI Portal]: https://base-ui.com/react/overview/quick-start#portals |
| 182 | +[Base UI docs index]: https://base-ui.com/llms.txt |
177 | 183 | [Base UI]: https://base-ui.com/react |
178 | 184 | [Overlay & portal contract]: #overlay--portal-contract |
0 commit comments