@svgrid/ui 0.3.4 → 0.4.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.
Files changed (88) hide show
  1. package/LICENSE +0 -25
  2. package/README.md +238 -218
  3. package/index.mjs +591 -591
  4. package/package.json +4 -4
  5. package/recipes/buttons/button-group.svelte +18 -18
  6. package/recipes/buttons/button.svelte +17 -17
  7. package/recipes/buttons/check-box.svelte +10 -10
  8. package/recipes/buttons/radio-group.svelte +18 -18
  9. package/recipes/buttons/rating.svelte +8 -8
  10. package/recipes/buttons/repeat-button.svelte +10 -10
  11. package/recipes/buttons/segmented.svelte +14 -0
  12. package/recipes/buttons/switch-button.svelte +12 -12
  13. package/recipes/buttons/toggle-button.svelte +8 -8
  14. package/recipes/date-time/calendar.svelte +15 -15
  15. package/recipes/date-time/date-range-input.svelte +15 -15
  16. package/recipes/date-time/date-time-picker.svelte +16 -16
  17. package/recipes/date-time/time-picker.svelte +15 -15
  18. package/recipes/feedback/alert.svelte +11 -11
  19. package/recipes/feedback/avatar-group.svelte +11 -11
  20. package/recipes/feedback/avatar.svelte +8 -8
  21. package/recipes/feedback/badge.svelte +8 -8
  22. package/recipes/feedback/carousel.svelte +10 -10
  23. package/recipes/feedback/chip.svelte +10 -10
  24. package/recipes/feedback/empty-state.svelte +8 -8
  25. package/recipes/feedback/loading-overlay.svelte +14 -0
  26. package/recipes/feedback/result.svelte +15 -0
  27. package/recipes/feedback/skeleton.svelte +8 -8
  28. package/recipes/feedback/spinner.svelte +8 -0
  29. package/recipes/feedback/timeline.svelte +10 -10
  30. package/recipes/inputs/color-input.svelte +8 -8
  31. package/recipes/inputs/duration-input.svelte +9 -9
  32. package/recipes/inputs/masked-input.svelte +14 -14
  33. package/recipes/inputs/number-input.svelte +17 -17
  34. package/recipes/inputs/otp-input.svelte +13 -13
  35. package/recipes/inputs/password-input.svelte +14 -14
  36. package/recipes/inputs/phone-input.svelte +8 -8
  37. package/recipes/inputs/tags-input.svelte +8 -8
  38. package/recipes/inputs/text-area.svelte +15 -15
  39. package/recipes/inputs/text-input.svelte +14 -14
  40. package/recipes/layout/accordion.svelte +17 -17
  41. package/recipes/layout/card.svelte +9 -9
  42. package/recipes/layout/collapsible.svelte +13 -0
  43. package/recipes/layout/display.svelte +15 -0
  44. package/recipes/layout/divider.svelte +9 -9
  45. package/recipes/layout/dock-layout.svelte +22 -22
  46. package/recipes/layout/dock-manager.svelte +24 -24
  47. package/recipes/layout/field.svelte +15 -15
  48. package/recipes/layout/file-upload.svelte +16 -16
  49. package/recipes/layout/form.svelte +14 -14
  50. package/recipes/layout/grid-chart.svelte +16 -16
  51. package/recipes/layout/layout.svelte +18 -0
  52. package/recipes/layout/scroll-area.svelte +10 -10
  53. package/recipes/layout/splitter.svelte +13 -13
  54. package/recipes/layout/tabs.svelte +17 -17
  55. package/recipes/layout/typography.svelte +17 -0
  56. package/recipes/navigation/breadcrumb.svelte +12 -12
  57. package/recipes/navigation/command.svelte +12 -12
  58. package/recipes/navigation/nav-pane.svelte +14 -14
  59. package/recipes/navigation/pagination.svelte +13 -13
  60. package/recipes/navigation/rich-text.svelte +8 -8
  61. package/recipes/navigation/stepper.svelte +13 -13
  62. package/recipes/navigation/tour.svelte +14 -14
  63. package/recipes/navigation/tree.svelte +14 -14
  64. package/recipes/overlays/context-menu.svelte +15 -15
  65. package/recipes/overlays/drawer.svelte +13 -13
  66. package/recipes/overlays/hover-card.svelte +15 -0
  67. package/recipes/overlays/menu.svelte +15 -15
  68. package/recipes/overlays/menubar.svelte +27 -0
  69. package/recipes/overlays/modal.svelte +13 -13
  70. package/recipes/overlays/popconfirm.svelte +18 -0
  71. package/recipes/overlays/popover.svelte +9 -9
  72. package/recipes/overlays/toaster.svelte +9 -9
  73. package/recipes/overlays/tooltip.svelte +8 -8
  74. package/recipes/range/circular-progress.svelte +9 -9
  75. package/recipes/range/gauge.svelte +16 -16
  76. package/recipes/range/progress.svelte +10 -10
  77. package/recipes/range/slider.svelte +19 -19
  78. package/recipes/range/sparkline.svelte +9 -9
  79. package/recipes/range/stat.svelte +9 -9
  80. package/recipes/registry.json +237 -4
  81. package/recipes/selection/auto-complete.svelte +10 -10
  82. package/recipes/selection/combo-box.svelte +13 -13
  83. package/recipes/selection/country-input.svelte +8 -8
  84. package/recipes/selection/drop-down-list.svelte +13 -13
  85. package/recipes/selection/grid-select.svelte +17 -17
  86. package/recipes/selection/list-box.svelte +13 -13
  87. package/recipes/selection/multi-select.svelte +13 -13
  88. package/recipes/selection/tree-select.svelte +15 -15
package/LICENSE CHANGED
@@ -1,28 +1,3 @@
1
- This repository is a multi-package workspace. Different packages ship
2
- under different licenses. The authoritative license for each package is
3
- the LICENSE file inside that package directory.
4
-
5
- ------------------------------------------------------------------------
6
- Per-package licensing
7
- ------------------------------------------------------------------------
8
-
9
- packages/grid/ MIT (terms below, and packages/grid/LICENSE)
10
- packages/enterprise/ Commercial - see packages/enterprise/LICENSE
11
- packages/mcp/ Commercial - see packages/mcp/LICENSE
12
- website/ Proprietary - see website/LICENSE
13
-
14
- Only `@svgrid/grid` is open source. Everything else in this
15
- repository (the Pro feature pack, the MCP server, the marketing +
16
- docs website, and any other package added later that does not ship
17
- its own MIT LICENSE) is proprietary and may not be copied, modified,
18
- or redistributed without a paid license. Source is visible in this
19
- repository for transparency and for paying customers; visibility does
20
- not grant a license.
21
-
22
- ------------------------------------------------------------------------
23
- MIT License (applies ONLY to packages/grid)
24
- ------------------------------------------------------------------------
25
-
26
1
  MIT License
27
2
 
28
3
  Copyright (c) 2026 jQWidgets Ltd
package/README.md CHANGED
@@ -1,218 +1,238 @@
1
- # @svgrid/ui
2
-
3
- Add [SvGrid UI](https://www.svgrid.com/docs/help/ui-components) components to your
4
- app - and see them - in one command:
5
-
6
- ```sh
7
- npx @svgrid/ui try calendar # open it in a throwaway sandbox, no project needed
8
- npx @svgrid/ui add calendar # write the recipe into your app + install the dep
9
- ```
10
-
11
- ## How it works
12
-
13
- `@svgrid/ui` is a **recipe scaffolder**, not a component library. `add` writes a
14
- minimal, ready-to-edit `.svelte` starter into your project that imports from
15
- [`@svgrid/grid`](https://www.npmjs.com/package/@svgrid/grid), and installs the
16
- package for you. The components themselves live in `@svgrid/grid` - you get bug
17
- fixes and new features by bumping the package, while the file `add` drops in is
18
- yours to style and wire however you like. Each recipe is a self-contained demo, so
19
- `try` and `--preview` can render it immediately.
20
-
21
- ## See it immediately
22
-
23
- ```sh
24
- # zero setup: spins up a sandbox and opens the component in your browser
25
- npx @svgrid/ui try button
26
-
27
- # try several at once (or a whole family) - they share one sandbox
28
- npx @svgrid/ui try button calendar slider
29
- npx @svgrid/ui try inputs
30
-
31
- # in your own SvelteKit app: also writes a /preview/button route
32
- npx @svgrid/ui add button --preview
33
- # -> start your dev server, open http://localhost:5173/preview/button
34
- ```
35
-
36
- `try` needs no project - it caches a tiny Vite + Svelte sandbox under your temp
37
- dir (so repeat runs are instant) and opens the browser, with a **theme picker
38
- (all 19 presets) and a light/dark toggle** so you can see the component in your
39
- target theme. Pass **several component ids** (or a group id) to render them
40
- together in the same sandbox. `--preview` drops a `src/routes/preview/<id>` page
41
- (plus a `/preview` index) into an existing SvelteKit app so it renders in your
42
- running dev server.
43
-
44
- ## Usage
45
-
46
- ```sh
47
- # add one component (installs @svgrid/grid)
48
- npx @svgrid/ui add calendar
49
-
50
- # add several, into a custom folder
51
- npx @svgrid/ui add calendar time-picker --dir src/lib/ui
52
-
53
- # add a whole family
54
- npx @svgrid/ui add date-time
55
-
56
- # just write files, don't run the package manager
57
- npx @svgrid/ui add calendar --no-install
58
-
59
- # see what you can add
60
- npx @svgrid/ui list
61
- ```
62
-
63
- ### Options
64
-
65
- | Flag | Description |
66
- | ---------------- | ------------------------------------------------------------------------ |
67
- | `--preview`, `-p`| (with `add`) Also write a `src/routes/preview/<id>` route so you can see it in your dev server. SvelteKit apps only. |
68
- | `--dir <path>` | Where to write files. Default: `src/lib/components/ui` (or `componentsDir` in a project `svgrid.json`). |
69
- | `--force` | Overwrite files that already exist. |
70
- | `--no-install` | Skip installing the dependency; just print the install command. |
71
-
72
- ## Components
73
-
74
- <p align="center">
75
- <img src="https://svgrid.com/docs-media/svgrid-ui-map.svg" alt="The SvGrid UI suite: nine families of components, each usable standalone and as a grid cell editor." width="820" />
76
- </p>
77
-
78
- All 72 components ship in [`@svgrid/grid`](https://www.npmjs.com/package/@svgrid/grid) and work standalone **or** as grid cell editors. Add any one with `npx @svgrid/ui add <id>`, a whole family with its group id, or see it instantly with `npx @svgrid/ui try <id>`. Click a component to see it live in the docs.
79
-
80
- ### Date & time family
81
-
82
- Add the whole family: `npx @svgrid/ui add date-time` &nbsp;·&nbsp; see them all: `npx @svgrid/ui try date-time`
83
-
84
- | Component | id | What it is |
85
- | --- | --- | --- |
86
- | [Calendar](https://svgrid.com/docs/help/ui-components/sv-calendar/) | `calendar` | Themeable month / year / decade calendar with every selection mode. |
87
- | [Time picker](https://svgrid.com/docs/help/ui-components/sv-time-picker/) | `time-picker` | Analog clock-dial time picker (12/24-hour, minute snapping). |
88
- | [Date-time picker](https://svgrid.com/docs/help/ui-components/sv-date-time-picker/) | `date-time-picker` | Masked text field with DATE / TIME dropdown tabs. |
89
- | [Date-range input](https://svgrid.com/docs/help/ui-components/sv-date-range-input/) | `date-range-input` | Compact start-to-end range field with preset shortcuts. |
90
-
91
- ### Buttons & toggles
92
-
93
- Add the whole family: `npx @svgrid/ui add buttons` &nbsp;·&nbsp; see them all: `npx @svgrid/ui try buttons`
94
-
95
- | Component | id | What it is |
96
- | --- | --- | --- |
97
- | [Button](https://svgrid.com/docs/help/ui-components/sv-button/) | `button` | Themeable press primitive with variants, sizes, loading state, icon slot, and auto anchor rendering. |
98
- | [Button group](https://svgrid.com/docs/help/ui-components/sv-button-group/) | `button-group` | Segmented button bar - single-select switcher, multi-select toggle set, or plain action row. |
99
- | [Repeat button](https://svgrid.com/docs/help/ui-components/sv-repeat-button/) | `repeat-button` | A button that keeps firing while held - after an initial delay, then at a steady interval. |
100
- | [Toggle button](https://svgrid.com/docs/help/ui-components/sv-toggle-button/) | `toggle-button` | A button with a sticky pressed on/off state, exposed via aria-pressed. |
101
- | [Switch button](https://svgrid.com/docs/help/ui-components/sv-switch-button/) | `switch-button` | An on/off sliding switch with the ARIA switch role for settings that apply immediately. |
102
- | [Checkbox](https://svgrid.com/docs/help/ui-components/sv-check-box/) | `check-box` | A themed checkbox with a true indeterminate state and an optional inline label. |
103
- | [Radio group](https://svgrid.com/docs/help/ui-components/sv-radio-group/) | `radio-group` | Accessible single-select radio group with roving tabindex and arrow-key navigation. |
104
- | [Rating](https://svgrid.com/docs/help/ui-components/sv-rating/) | `rating` | Star rating control on the ARIA slider pattern with hover preview, keyboard, and half steps. |
105
-
106
- ### Inputs
107
-
108
- Add the whole family: `npx @svgrid/ui add inputs` &nbsp;·&nbsp; see them all: `npx @svgrid/ui try inputs`
109
-
110
- | Component | id | What it is |
111
- | --- | --- | --- |
112
- | [Text input](https://svgrid.com/docs/help/ui-components/sv-text-input/) | `text-input` | Single-line text field for text, email, url, tel and search, with clear button and validation chrome. |
113
- | [Text area](https://svgrid.com/docs/help/ui-components/sv-text-area/) | `text-area` | Multi-line text field with optional auto-grow and a character counter. |
114
- | [Number input](https://svgrid.com/docs/help/ui-components/sv-number-input/) | `number-input` | Numeric field with min/max/step, spinner buttons, thousands grouping, precision and prefix/suffix. |
115
- | [Password input](https://svgrid.com/docs/help/ui-components/sv-password-input/) | `password-input` | Password field with a reveal toggle and an optional 4-level strength meter. |
116
- | [Masked input](https://svgrid.com/docs/help/ui-components/sv-masked-input/) | `masked-input` | Pattern-masked text input that formats as you type and reports masked and raw values. |
117
- | [Phone input](https://svgrid.com/docs/help/ui-components/sv-phone-input/) | `phone-input` | Country dial-code selector plus a national number field that emits an E.164-style string. |
118
- | [Color input](https://svgrid.com/docs/help/ui-components/sv-color-input/) | `color-input` | Color swatch that opens a popover with a hex field, native picker and preset palette. |
119
- | [OTP input](https://svgrid.com/docs/help/ui-components/sv-otp-input/) | `otp-input` | Segmented one-time-code / PIN entry with auto-advance and paste distribution. |
120
- | [Duration input](https://svgrid.com/docs/help/ui-components/sv-duration-input/) | `duration-input` | Duration editor whose value is minutes but which accepts 1h 30m, 1:30 or 90. |
121
- | [Tags input](https://svgrid.com/docs/help/ui-components/sv-tags-input/) | `tags-input` | Editable token / chips input over a string array with de-dupe and a max cap. |
122
-
123
- ### Selection
124
-
125
- Add the whole family: `npx @svgrid/ui add selection` &nbsp;·&nbsp; see them all: `npx @svgrid/ui try selection`
126
-
127
- | Component | id | What it is |
128
- | --- | --- | --- |
129
- | [List box](https://svgrid.com/docs/help/ui-components/sv-list-box/) | `list-box` | Inline single/multi-select list, a WAI-ARIA listbox with type-ahead and optional windowing. |
130
- | [Drop-down list](https://svgrid.com/docs/help/ui-components/sv-drop-down-list/) | `drop-down-list` | Single-select dropdown with a portalled, auto-flipping option list and no typing. |
131
- | [Combo box](https://svgrid.com/docs/help/ui-components/sv-combo-box/) | `combo-box` | Searchable single-select where the value must come from the list; local or remote filtering. |
132
- | [Auto complete](https://svgrid.com/docs/help/ui-components/sv-auto-complete/) | `auto-complete` | Free-text input with a live-filtered suggestion list; any value allowed. |
133
- | [Multi select](https://svgrid.com/docs/help/ui-components/sv-multi-select/) | `multi-select` | Multi-select dropdown with a chip trigger, search box, and remote options. |
134
- | [Tree select](https://svgrid.com/docs/help/ui-components/sv-tree-select/) | `tree-select` | Single-select dropdown over an indented, collapsible tree (cascader pattern). |
135
- | [Grid select](https://svgrid.com/docs/help/ui-components/sv-grid-select/) | `grid-select` | Grid-in-a-dropdown single-select that picks a row across multiple columns. |
136
- | [Country input](https://svgrid.com/docs/help/ui-components/sv-country-input/) | `country-input` | Searchable country picker with flag, dial code, and ISO alpha-2 output. |
137
-
138
- ### Range & meters
139
-
140
- Add the whole family: `npx @svgrid/ui add range` &nbsp;·&nbsp; see them all: `npx @svgrid/ui try range`
141
-
142
- | Component | id | What it is |
143
- | --- | --- | --- |
144
- | [Slider](https://svgrid.com/docs/help/ui-components/sv-slider/) | `slider` | Single or dual-thumb range slider with steps, ticks, scale labels, and keyboard control. |
145
- | [Gauge](https://svgrid.com/docs/help/ui-components/sv-gauge/) | `gauge` | Radial arc gauge for a single KPI with optional colored threshold bands. |
146
- | [Progress](https://svgrid.com/docs/help/ui-components/sv-progress/) | `progress` | Linear determinate or indeterminate progress bar with intents, sizes, and label. |
147
- | [Circular progress](https://svgrid.com/docs/help/ui-components/sv-circular-progress/) | `circular-progress` | Ring progress indicator, determinate or spinning, with center label or content. |
148
- | [Sparkline](https://svgrid.com/docs/help/ui-components/sv-sparkline/) | `sparkline` | Tiny inline line, area, bar, or win/loss chart from a plain number array. |
149
- | [Stat](https://svgrid.com/docs/help/ui-components/sv-stat/) | `stat` | KPI metric card with a big value and auto-colored up/down delta trend. |
150
-
151
- ### Overlays & menus
152
-
153
- Add the whole family: `npx @svgrid/ui add overlays` &nbsp;·&nbsp; see them all: `npx @svgrid/ui try overlays`
154
-
155
- | Component | id | What it is |
156
- | --- | --- | --- |
157
- | [Popover](https://svgrid.com/docs/help/ui-components/sv-popover/) | `popover` | A floating panel anchored to a trigger, portalled to escape overflow-hidden ancestors. |
158
- | [Tooltip](https://svgrid.com/docs/help/ui-components/sv-tooltip/) | `tooltip` | A small hover and focus tooltip anchored to its child, wired via aria-describedby. |
159
- | [Modal](https://svgrid.com/docs/help/ui-components/sv-modal/) | `modal` | An accessible modal dialog with backdrop, focus trap, and Escape/backdrop close. |
160
- | [Drawer](https://svgrid.com/docs/help/ui-components/sv-drawer/) | `drawer` | An edge-anchored side sheet (right/left/top/bottom) with the full dialog a11y contract. |
161
- | [Toaster](https://svgrid.com/docs/help/ui-components/sv-toaster/) | `toaster` | The host that renders the shared toast queue; call toast() from anywhere. |
162
- | [Context menu](https://svgrid.com/docs/help/ui-components/sv-context-menu/) | `context-menu` | Wraps a region and opens a menu at the pointer on right-click or long-press. |
163
- | [Menu](https://svgrid.com/docs/help/ui-components/sv-menu/) | `menu` | A trigger-opened dropdown menu with submenus, icons, shortcuts, and keyboard support. |
164
-
165
- ### Layout & composite
166
-
167
- Add the whole family: `npx @svgrid/ui add layout` &nbsp;·&nbsp; see them all: `npx @svgrid/ui try layout`
168
-
169
- | Component | id | What it is |
170
- | --- | --- | --- |
171
- | [Tabs](https://svgrid.com/docs/help/ui-components/sv-tabs/) | `tabs` | WAI-ARIA tab strip with roving arrow-key navigation, four positions, and optional closable tabs. |
172
- | [Accordion](https://svgrid.com/docs/help/ui-components/sv-accordion/) | `accordion` | WAI-ARIA accordion of collapsible sections with single- or multiple-expand and roving header focus. |
173
- | [Splitter](https://svgrid.com/docs/help/ui-components/sv-splitter/) | `splitter` | Two resizable panes split by a draggable WAI-ARIA separator, with pointer drag and arrow-key resize. |
174
- | [Dock layout](https://svgrid.com/docs/help/ui-components/sv-dock-layout/) | `dock-layout` | Basic docking layout with nested resizable split groups, tabbed leaves, and drag-to-dock. |
175
- | [Dock manager](https://svgrid.com/docs/help/ui-components/sv-dock-manager/) | `dock-manager` | Full docking manager with floating windows, tab reordering, and pinning / auto-hide. |
176
- | [Card](https://svgrid.com/docs/help/ui-components/sv-card/) | `card` | Themed surface container with an optional header, body, and footer. |
177
- | [Divider](https://svgrid.com/docs/help/ui-components/sv-divider/) | `divider` | Theme-driven separator line, horizontal or vertical, solid or dashed, with an optional label. |
178
- | [Scroll area](https://svgrid.com/docs/help/ui-components/sv-scroll-area/) | `scroll-area` | Scroll container with the kit's themed custom scrollbars and contained overscroll. |
179
- | [Grid chart](https://svgrid.com/docs/help/ui-components/sv-grid-chart/) | `grid-chart` | Inline-SVG chart that renders a ChartSpec with no external charting dependency, bound to grid data. |
180
- | [Form](https://svgrid.com/docs/help/ui-components/sv-form/) | `form` | Schema-driven form that renders the UI-kit controls from a FormField[] with validation and submit. |
181
- | [Field](https://svgrid.com/docs/help/ui-components/sv-field/) | `field` | Shared label / hint / error chrome that makes any control behave consistently. |
182
- | [File upload](https://svgrid.com/docs/help/ui-components/sv-file-upload/) | `file-upload` | Drag-and-drop file field with click-to-browse, accept / size / count validation, and a file list. |
183
-
184
- ### Feedback & display
185
-
186
- Add the whole family: `npx @svgrid/ui add feedback` &nbsp;·&nbsp; see them all: `npx @svgrid/ui try feedback`
187
-
188
- | Component | id | What it is |
189
- | --- | --- | --- |
190
- | [Badge](https://svgrid.com/docs/help/ui-components/sv-badge/) | `badge` | Small status pill or count label tinted from the grid's semantic tokens. |
191
- | [Skeleton](https://svgrid.com/docs/help/ui-components/sv-skeleton/) | `skeleton` | Shimmering loading placeholder that reserves layout space while data loads. |
192
- | [Alert](https://svgrid.com/docs/help/ui-components/sv-alert/) | `alert` | Inline contextual message with icon, title, dismiss, and trailing actions. |
193
- | [Empty state](https://svgrid.com/docs/help/ui-components/sv-empty-state/) | `empty-state` | Centered placeholder for empty lists and no-results screens with an action slot. |
194
- | [Chip](https://svgrid.com/docs/help/ui-components/sv-chip/) | `chip` | Compact interactive pill for tags, filter tokens, and entities with remove. |
195
- | [Timeline](https://svgrid.com/docs/help/ui-components/sv-timeline/) | `timeline` | Vertical activity or history feed with a connecting rail and colored markers. |
196
- | [Avatar](https://svgrid.com/docs/help/ui-components/sv-avatar/) | `avatar` | User avatar with automatic initials-and-color fallback and presence status dot. |
197
- | [Avatar group](https://svgrid.com/docs/help/ui-components/sv-avatar-group/) | `avatar-group` | Overlapping stacked avatars with a +N overflow pill for members and assignees. |
198
- | [Carousel](https://svgrid.com/docs/help/ui-components/sv-carousel/) | `carousel` | Sliding slideshow with arrows, dots, autoplay that pauses on hover, and swipe. |
199
-
200
- ### Navigation & rich
201
-
202
- Add the whole family: `npx @svgrid/ui add navigation` &nbsp;·&nbsp; see them all: `npx @svgrid/ui try navigation`
203
-
204
- | Component | id | What it is |
205
- | --- | --- | --- |
206
- | [Breadcrumb](https://svgrid.com/docs/help/ui-components/sv-breadcrumb/) | `breadcrumb` | A navigation trail that shows where the current page sits in your app's hierarchy. |
207
- | [Pagination](https://svgrid.com/docs/help/ui-components/sv-pagination/) | `pagination` | A standalone pager: page numbers with ellipsis, prev/next, and optional first/last. |
208
- | [Stepper](https://svgrid.com/docs/help/ui-components/sv-stepper/) | `stepper` | A progress stepper for wizards and multi-step forms, horizontal or vertical. |
209
- | [Nav pane](https://svgrid.com/docs/help/ui-components/sv-nav-pane/) | `nav-pane` | An Outlook-style app-shell sidebar with collapsible sections, badges, and modules. |
210
- | [Tree](https://svgrid.com/docs/help/ui-components/sv-tree/) | `tree` | A WAI-ARIA tree view with expand/select, tri-state checkboxes, virtualization, and lazy load. |
211
- | [Command](https://svgrid.com/docs/help/ui-components/sv-command/) | `command` | A Cmd+K command palette: fuzzy-searchable actions in a focus-trapped dialog. |
212
- | [Tour](https://svgrid.com/docs/help/ui-components/sv-tour/) | `tour` | A guided product tour that spotlights targets and walks users through each step. |
213
- | [Rich text](https://svgrid.com/docs/help/ui-components/sv-rich-text/) | `rich-text` | A lightweight WYSIWYG editor with a formatting toolbar that emits HTML. |
214
-
215
- Run `npx @svgrid/ui list` for the same catalogue in your terminal. Every component is also a plain import from `@svgrid/grid` - the CLI is a convenience, never the only way in.
216
-
217
-
218
- MIT © jQWidgets Ltd
1
+ <p align="center">
2
+ <img src="https://svgrid.com/brand/svgrid-logo-icon-1200.png" alt="SvGrid" width="100" height="100" />
3
+ </p>
4
+
5
+ <h1 align="center">@svgrid/ui</h1>
6
+
7
+ <p align="center"><strong>Svelte 5 UI components, added to your app one command at a time.</strong></p>
8
+
9
+ <p align="center">
10
+ <a href="https://www.npmjs.com/package/@svgrid/ui"><img src="https://img.shields.io/npm/v/%40svgrid%2Fui.svg?label=%40svgrid%2Fui" alt="npm version" /></a>
11
+ <a href="https://www.npmjs.com/package/@svgrid/ui"><img src="https://img.shields.io/npm/dm/%40svgrid%2Fui.svg" alt="npm downloads" /></a>
12
+ <a href="./LICENSE"><img src="https://img.shields.io/badge/license-MIT-brightgreen.svg" alt="MIT License" /></a>
13
+ </p>
14
+
15
+ <p align="center">
16
+ <a href="https://svgrid.com">Website</a> ·
17
+ <a href="https://svgrid.com/docs/help/ui-components/index/">Docs</a> ·
18
+ <a href="https://svgrid.com/demos/">Demos</a>
19
+ </p>
20
+
21
+ ---
22
+
23
+ Add [SvGrid UI](https://svgrid.com/docs/help/ui-components/index/) components to your
24
+ app - and see them - in one command:
25
+
26
+ ```sh
27
+ npx @svgrid/ui try calendar # open it in a throwaway sandbox, no project needed
28
+ npx @svgrid/ui add calendar # write the recipe into your app + install the dep
29
+ ```
30
+
31
+ ## How it works
32
+
33
+ `@svgrid/ui` is a **recipe scaffolder**, not a component library. `add` writes a
34
+ minimal, ready-to-edit `.svelte` starter into your project that imports from
35
+ [`@svgrid/grid`](https://www.npmjs.com/package/@svgrid/grid), and installs the
36
+ package for you. The components themselves live in `@svgrid/grid` - you get bug
37
+ fixes and new features by bumping the package, while the file `add` drops in is
38
+ yours to style and wire however you like. Each recipe is a self-contained demo, so
39
+ `try` and `--preview` can render it immediately.
40
+
41
+ ## See it immediately
42
+
43
+ ```sh
44
+ # zero setup: spins up a sandbox and opens the component in your browser
45
+ npx @svgrid/ui try button
46
+
47
+ # try several at once (or a whole family) - they share one sandbox
48
+ npx @svgrid/ui try button calendar slider
49
+ npx @svgrid/ui try inputs
50
+
51
+ # in your own SvelteKit app: also writes a /preview/button route
52
+ npx @svgrid/ui add button --preview
53
+ # -> start your dev server, open http://localhost:5173/preview/button
54
+ ```
55
+
56
+ `try` needs no project - it caches a tiny Vite + Svelte sandbox under your temp
57
+ dir (so repeat runs are instant) and opens the browser, with a **theme picker
58
+ (all 19 presets) and a light/dark toggle** so you can see the component in your
59
+ target theme. Pass **several component ids** (or a group id) to render them
60
+ together in the same sandbox. `--preview` drops a `src/routes/preview/<id>` page
61
+ (plus a `/preview` index) into an existing SvelteKit app so it renders in your
62
+ running dev server.
63
+
64
+ ## Usage
65
+
66
+ ```sh
67
+ # add one component (installs @svgrid/grid)
68
+ npx @svgrid/ui add calendar
69
+
70
+ # add several, into a custom folder
71
+ npx @svgrid/ui add calendar time-picker --dir src/lib/ui
72
+
73
+ # add a whole family
74
+ npx @svgrid/ui add date-time
75
+
76
+ # just write files, don't run the package manager
77
+ npx @svgrid/ui add calendar --no-install
78
+
79
+ # see what you can add
80
+ npx @svgrid/ui list
81
+ ```
82
+
83
+ ### Options
84
+
85
+ | Flag | Description |
86
+ | ---------------- | ------------------------------------------------------------------------ |
87
+ | `--preview`, `-p`| (with `add`) Also write a `src/routes/preview/<id>` route so you can see it in your dev server. SvelteKit apps only. |
88
+ | `--dir <path>` | Where to write files. Default: `src/lib/components/ui` (or `componentsDir` in a project `svgrid.json`). |
89
+ | `--force` | Overwrite files that already exist. |
90
+ | `--no-install` | Skip installing the dependency; just print the install command. |
91
+
92
+ ## Components
93
+
94
+ <p align="center">
95
+ <img src="https://svgrid.com/docs-media/svgrid-ui-map.svg" alt="The SvGrid UI suite: nine families of components, each usable standalone and as a grid cell editor." width="820" />
96
+ </p>
97
+
98
+ All 72 components ship in [`@svgrid/grid`](https://www.npmjs.com/package/@svgrid/grid) and work standalone **or** as grid cell editors. Add any one with `npx @svgrid/ui add <id>`, a whole family with its group id, or see it instantly with `npx @svgrid/ui try <id>`. Click a component to see it live in the docs.
99
+
100
+ ### Date & time family
101
+
102
+ Add the whole family: `npx @svgrid/ui add date-time` &nbsp;·&nbsp; see them all: `npx @svgrid/ui try date-time`
103
+
104
+ | Component | id | What it is |
105
+ | --- | --- | --- |
106
+ | [Calendar](https://svgrid.com/docs/help/ui-components/sv-calendar/) | `calendar` | Themeable month / year / decade calendar with every selection mode. |
107
+ | [Time picker](https://svgrid.com/docs/help/ui-components/sv-time-picker/) | `time-picker` | Analog clock-dial time picker (12/24-hour, minute snapping). |
108
+ | [Date-time picker](https://svgrid.com/docs/help/ui-components/sv-date-time-picker/) | `date-time-picker` | Masked text field with DATE / TIME dropdown tabs. |
109
+ | [Date-range input](https://svgrid.com/docs/help/ui-components/sv-date-range-input/) | `date-range-input` | Compact start-to-end range field with preset shortcuts. |
110
+
111
+ ### Buttons & toggles
112
+
113
+ Add the whole family: `npx @svgrid/ui add buttons` &nbsp;·&nbsp; see them all: `npx @svgrid/ui try buttons`
114
+
115
+ | Component | id | What it is |
116
+ | --- | --- | --- |
117
+ | [Button](https://svgrid.com/docs/help/ui-components/sv-button/) | `button` | Themeable press primitive with variants, sizes, loading state, icon slot, and auto anchor rendering. |
118
+ | [Button group](https://svgrid.com/docs/help/ui-components/sv-button-group/) | `button-group` | Segmented button bar - single-select switcher, multi-select toggle set, or plain action row. |
119
+ | [Repeat button](https://svgrid.com/docs/help/ui-components/sv-repeat-button/) | `repeat-button` | A button that keeps firing while held - after an initial delay, then at a steady interval. |
120
+ | [Toggle button](https://svgrid.com/docs/help/ui-components/sv-toggle-button/) | `toggle-button` | A button with a sticky pressed on/off state, exposed via aria-pressed. |
121
+ | [Switch button](https://svgrid.com/docs/help/ui-components/sv-switch-button/) | `switch-button` | An on/off sliding switch with the ARIA switch role for settings that apply immediately. |
122
+ | [Checkbox](https://svgrid.com/docs/help/ui-components/sv-check-box/) | `check-box` | A themed checkbox with a true indeterminate state and an optional inline label. |
123
+ | [Radio group](https://svgrid.com/docs/help/ui-components/sv-radio-group/) | `radio-group` | Accessible single-select radio group with roving tabindex and arrow-key navigation. |
124
+ | [Rating](https://svgrid.com/docs/help/ui-components/sv-rating/) | `rating` | Star rating control on the ARIA slider pattern with hover preview, keyboard, and half steps. |
125
+
126
+ ### Inputs
127
+
128
+ Add the whole family: `npx @svgrid/ui add inputs` &nbsp;·&nbsp; see them all: `npx @svgrid/ui try inputs`
129
+
130
+ | Component | id | What it is |
131
+ | --- | --- | --- |
132
+ | [Text input](https://svgrid.com/docs/help/ui-components/sv-text-input/) | `text-input` | Single-line text field for text, email, url, tel and search, with clear button and validation chrome. |
133
+ | [Text area](https://svgrid.com/docs/help/ui-components/sv-text-area/) | `text-area` | Multi-line text field with optional auto-grow and a character counter. |
134
+ | [Number input](https://svgrid.com/docs/help/ui-components/sv-number-input/) | `number-input` | Numeric field with min/max/step, spinner buttons, thousands grouping, precision and prefix/suffix. |
135
+ | [Password input](https://svgrid.com/docs/help/ui-components/sv-password-input/) | `password-input` | Password field with a reveal toggle and an optional 4-level strength meter. |
136
+ | [Masked input](https://svgrid.com/docs/help/ui-components/sv-masked-input/) | `masked-input` | Pattern-masked text input that formats as you type and reports masked and raw values. |
137
+ | [Phone input](https://svgrid.com/docs/help/ui-components/sv-phone-input/) | `phone-input` | Country dial-code selector plus a national number field that emits an E.164-style string. |
138
+ | [Color input](https://svgrid.com/docs/help/ui-components/sv-color-input/) | `color-input` | Color swatch that opens a popover with a hex field, native picker and preset palette. |
139
+ | [OTP input](https://svgrid.com/docs/help/ui-components/sv-otp-input/) | `otp-input` | Segmented one-time-code / PIN entry with auto-advance and paste distribution. |
140
+ | [Duration input](https://svgrid.com/docs/help/ui-components/sv-duration-input/) | `duration-input` | Duration editor whose value is minutes but which accepts 1h 30m, 1:30 or 90. |
141
+ | [Tags input](https://svgrid.com/docs/help/ui-components/sv-tags-input/) | `tags-input` | Editable token / chips input over a string array with de-dupe and a max cap. |
142
+
143
+ ### Selection
144
+
145
+ Add the whole family: `npx @svgrid/ui add selection` &nbsp;·&nbsp; see them all: `npx @svgrid/ui try selection`
146
+
147
+ | Component | id | What it is |
148
+ | --- | --- | --- |
149
+ | [List box](https://svgrid.com/docs/help/ui-components/sv-list-box/) | `list-box` | Inline single/multi-select list, a WAI-ARIA listbox with type-ahead and optional windowing. |
150
+ | [Drop-down list](https://svgrid.com/docs/help/ui-components/sv-drop-down-list/) | `drop-down-list` | Single-select dropdown with a portalled, auto-flipping option list and no typing. |
151
+ | [Combo box](https://svgrid.com/docs/help/ui-components/sv-combo-box/) | `combo-box` | Searchable single-select where the value must come from the list; local or remote filtering. |
152
+ | [Auto complete](https://svgrid.com/docs/help/ui-components/sv-auto-complete/) | `auto-complete` | Free-text input with a live-filtered suggestion list; any value allowed. |
153
+ | [Multi select](https://svgrid.com/docs/help/ui-components/sv-multi-select/) | `multi-select` | Multi-select dropdown with a chip trigger, search box, and remote options. |
154
+ | [Tree select](https://svgrid.com/docs/help/ui-components/sv-tree-select/) | `tree-select` | Single-select dropdown over an indented, collapsible tree (cascader pattern). |
155
+ | [Grid select](https://svgrid.com/docs/help/ui-components/sv-grid-select/) | `grid-select` | Grid-in-a-dropdown single-select that picks a row across multiple columns. |
156
+ | [Country input](https://svgrid.com/docs/help/ui-components/sv-country-input/) | `country-input` | Searchable country picker with flag, dial code, and ISO alpha-2 output. |
157
+
158
+ ### Range & meters
159
+
160
+ Add the whole family: `npx @svgrid/ui add range` &nbsp;·&nbsp; see them all: `npx @svgrid/ui try range`
161
+
162
+ | Component | id | What it is |
163
+ | --- | --- | --- |
164
+ | [Slider](https://svgrid.com/docs/help/ui-components/sv-slider/) | `slider` | Single or dual-thumb range slider with steps, ticks, scale labels, and keyboard control. |
165
+ | [Gauge](https://svgrid.com/docs/help/ui-components/sv-gauge/) | `gauge` | Radial arc gauge for a single KPI with optional colored threshold bands. |
166
+ | [Progress](https://svgrid.com/docs/help/ui-components/sv-progress/) | `progress` | Linear determinate or indeterminate progress bar with intents, sizes, and label. |
167
+ | [Circular progress](https://svgrid.com/docs/help/ui-components/sv-circular-progress/) | `circular-progress` | Ring progress indicator, determinate or spinning, with center label or content. |
168
+ | [Sparkline](https://svgrid.com/docs/help/ui-components/sv-sparkline/) | `sparkline` | Tiny inline line, area, bar, or win/loss chart from a plain number array. |
169
+ | [Stat](https://svgrid.com/docs/help/ui-components/sv-stat/) | `stat` | KPI metric card with a big value and auto-colored up/down delta trend. |
170
+
171
+ ### Overlays & menus
172
+
173
+ Add the whole family: `npx @svgrid/ui add overlays` &nbsp;·&nbsp; see them all: `npx @svgrid/ui try overlays`
174
+
175
+ | Component | id | What it is |
176
+ | --- | --- | --- |
177
+ | [Popover](https://svgrid.com/docs/help/ui-components/sv-popover/) | `popover` | A floating panel anchored to a trigger, portalled to escape overflow-hidden ancestors. |
178
+ | [Tooltip](https://svgrid.com/docs/help/ui-components/sv-tooltip/) | `tooltip` | A small hover and focus tooltip anchored to its child, wired via aria-describedby. |
179
+ | [Modal](https://svgrid.com/docs/help/ui-components/sv-modal/) | `modal` | An accessible modal dialog with backdrop, focus trap, and Escape/backdrop close. |
180
+ | [Drawer](https://svgrid.com/docs/help/ui-components/sv-drawer/) | `drawer` | An edge-anchored side sheet (right/left/top/bottom) with the full dialog a11y contract. |
181
+ | [Toaster](https://svgrid.com/docs/help/ui-components/sv-toaster/) | `toaster` | The host that renders the shared toast queue; call toast() from anywhere. |
182
+ | [Context menu](https://svgrid.com/docs/help/ui-components/sv-context-menu/) | `context-menu` | Wraps a region and opens a menu at the pointer on right-click or long-press. |
183
+ | [Menu](https://svgrid.com/docs/help/ui-components/sv-menu/) | `menu` | A trigger-opened dropdown menu with submenus, icons, shortcuts, and keyboard support. |
184
+
185
+ ### Layout & composite
186
+
187
+ Add the whole family: `npx @svgrid/ui add layout` &nbsp;·&nbsp; see them all: `npx @svgrid/ui try layout`
188
+
189
+ | Component | id | What it is |
190
+ | --- | --- | --- |
191
+ | [Tabs](https://svgrid.com/docs/help/ui-components/sv-tabs/) | `tabs` | WAI-ARIA tab strip with roving arrow-key navigation, four positions, and optional closable tabs. |
192
+ | [Accordion](https://svgrid.com/docs/help/ui-components/sv-accordion/) | `accordion` | WAI-ARIA accordion of collapsible sections with single- or multiple-expand and roving header focus. |
193
+ | [Splitter](https://svgrid.com/docs/help/ui-components/sv-splitter/) | `splitter` | Two resizable panes split by a draggable WAI-ARIA separator, with pointer drag and arrow-key resize. |
194
+ | [Dock layout](https://svgrid.com/docs/help/ui-components/sv-dock-layout/) | `dock-layout` | Basic docking layout with nested resizable split groups, tabbed leaves, and drag-to-dock. |
195
+ | [Dock manager](https://svgrid.com/docs/help/ui-components/sv-dock-manager/) | `dock-manager` | Full docking manager with floating windows, tab reordering, and pinning / auto-hide. |
196
+ | [Card](https://svgrid.com/docs/help/ui-components/sv-card/) | `card` | Themed surface container with an optional header, body, and footer. |
197
+ | [Divider](https://svgrid.com/docs/help/ui-components/sv-divider/) | `divider` | Theme-driven separator line, horizontal or vertical, solid or dashed, with an optional label. |
198
+ | [Scroll area](https://svgrid.com/docs/help/ui-components/sv-scroll-area/) | `scroll-area` | Scroll container with the kit's themed custom scrollbars and contained overscroll. |
199
+ | [Grid chart](https://svgrid.com/docs/help/ui-components/sv-grid-chart/) | `grid-chart` | Inline-SVG chart that renders a ChartSpec with no external charting dependency, bound to grid data. |
200
+ | [Form](https://svgrid.com/docs/help/ui-components/sv-form/) | `form` | Schema-driven form that renders the UI-kit controls from a FormField[] with validation and submit. |
201
+ | [Field](https://svgrid.com/docs/help/ui-components/sv-field/) | `field` | Shared label / hint / error chrome that makes any control behave consistently. |
202
+ | [File upload](https://svgrid.com/docs/help/ui-components/sv-file-upload/) | `file-upload` | Drag-and-drop file field with click-to-browse, accept / size / count validation, and a file list. |
203
+
204
+ ### Feedback & display
205
+
206
+ Add the whole family: `npx @svgrid/ui add feedback` &nbsp;·&nbsp; see them all: `npx @svgrid/ui try feedback`
207
+
208
+ | Component | id | What it is |
209
+ | --- | --- | --- |
210
+ | [Badge](https://svgrid.com/docs/help/ui-components/sv-badge/) | `badge` | Small status pill or count label tinted from the grid's semantic tokens. |
211
+ | [Skeleton](https://svgrid.com/docs/help/ui-components/sv-skeleton/) | `skeleton` | Shimmering loading placeholder that reserves layout space while data loads. |
212
+ | [Alert](https://svgrid.com/docs/help/ui-components/sv-alert/) | `alert` | Inline contextual message with icon, title, dismiss, and trailing actions. |
213
+ | [Empty state](https://svgrid.com/docs/help/ui-components/sv-empty-state/) | `empty-state` | Centered placeholder for empty lists and no-results screens with an action slot. |
214
+ | [Chip](https://svgrid.com/docs/help/ui-components/sv-chip/) | `chip` | Compact interactive pill for tags, filter tokens, and entities with remove. |
215
+ | [Timeline](https://svgrid.com/docs/help/ui-components/sv-timeline/) | `timeline` | Vertical activity or history feed with a connecting rail and colored markers. |
216
+ | [Avatar](https://svgrid.com/docs/help/ui-components/sv-avatar/) | `avatar` | User avatar with automatic initials-and-color fallback and presence status dot. |
217
+ | [Avatar group](https://svgrid.com/docs/help/ui-components/sv-avatar-group/) | `avatar-group` | Overlapping stacked avatars with a +N overflow pill for members and assignees. |
218
+ | [Carousel](https://svgrid.com/docs/help/ui-components/sv-carousel/) | `carousel` | Sliding slideshow with arrows, dots, autoplay that pauses on hover, and swipe. |
219
+
220
+ ### Navigation & rich
221
+
222
+ Add the whole family: `npx @svgrid/ui add navigation` &nbsp;·&nbsp; see them all: `npx @svgrid/ui try navigation`
223
+
224
+ | Component | id | What it is |
225
+ | --- | --- | --- |
226
+ | [Breadcrumb](https://svgrid.com/docs/help/ui-components/sv-breadcrumb/) | `breadcrumb` | A navigation trail that shows where the current page sits in your app's hierarchy. |
227
+ | [Pagination](https://svgrid.com/docs/help/ui-components/sv-pagination/) | `pagination` | A standalone pager: page numbers with ellipsis, prev/next, and optional first/last. |
228
+ | [Stepper](https://svgrid.com/docs/help/ui-components/sv-stepper/) | `stepper` | A progress stepper for wizards and multi-step forms, horizontal or vertical. |
229
+ | [Nav pane](https://svgrid.com/docs/help/ui-components/sv-nav-pane/) | `nav-pane` | An Outlook-style app-shell sidebar with collapsible sections, badges, and modules. |
230
+ | [Tree](https://svgrid.com/docs/help/ui-components/sv-tree/) | `tree` | A WAI-ARIA tree view with expand/select, tri-state checkboxes, virtualization, and lazy load. |
231
+ | [Command](https://svgrid.com/docs/help/ui-components/sv-command/) | `command` | A Cmd+K command palette: fuzzy-searchable actions in a focus-trapped dialog. |
232
+ | [Tour](https://svgrid.com/docs/help/ui-components/sv-tour/) | `tour` | A guided product tour that spotlights targets and walks users through each step. |
233
+ | [Rich text](https://svgrid.com/docs/help/ui-components/sv-rich-text/) | `rich-text` | A lightweight WYSIWYG editor with a formatting toolbar that emits HTML. |
234
+
235
+ Run `npx @svgrid/ui list` for the same catalogue in your terminal. Every component is also a plain import from `@svgrid/grid` - the CLI is a convenience, never the only way in.
236
+
237
+
238
+ MIT © jQWidgets Ltd