@ngrok/mantle 0.93.7 → 0.94.1
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.md +11 -2
- package/dist/accordion.d.ts +73 -21
- package/dist/accordion.js +1 -1
- package/dist/agent.json +1234 -84
- package/dist/alert-BkJHDx9X.js +1 -0
- package/dist/{alert-BcSBNR3S.d.ts → alert-D0zRRUHV.d.ts} +35 -25
- package/dist/alert-center.d.ts +67 -55
- package/dist/alert-center.js +1 -1
- package/dist/alert-dialog.d.ts +35 -10
- package/dist/alert-dialog.js +1 -1
- package/dist/alert.d.ts +6 -1
- package/dist/alert.js +1 -1
- package/dist/anchor-Dc6IgvXV.js +1 -0
- package/dist/anchor.d.ts +17 -5
- package/dist/anchor.js +1 -1
- package/dist/app-layout.d.ts +33 -18
- package/dist/app-layout.js +1 -1
- package/dist/area-chart.d.ts +153 -97
- package/dist/area-chart.js +1 -1
- package/dist/avatar.d.ts +36 -24
- package/dist/avatar.js +1 -1
- package/dist/badge.d.ts +19 -7
- package/dist/badge.js +1 -1
- package/dist/bar-chart.d.ts +155 -100
- package/dist/bar-chart.js +1 -1
- package/dist/breadcrumb.d.ts +47 -36
- package/dist/breadcrumb.js +1 -1
- package/dist/browser-only-CZfkNw5A.js +1 -0
- package/dist/browser-only-ymFoM3Ya.js +1 -0
- package/dist/browser-only.d.ts +8 -0
- package/dist/browser-only.js +1 -1
- package/dist/{button-BX-4lYUn.d.ts → button-5Pc7Mby_.d.ts} +4 -4
- package/dist/button-B9bChDgl.js +1 -0
- package/dist/button-D8jixIbH.js +1 -0
- package/dist/button-DNLTJ32M.js +1 -0
- package/dist/{button-CPsKGDK0.d.ts → button-Ddj6yr10.d.ts} +34 -27
- package/dist/{button-Yxyu1XMd.d.ts → button-DnYv7IOT.d.ts} +29 -22
- package/dist/button.d.ts +9 -3
- package/dist/button.js +1 -1
- package/dist/calendar.d.ts +8 -1
- package/dist/calendar.js +1 -1
- package/dist/card.d.ts +7 -2
- package/dist/card.js +1 -1
- package/dist/centered-layout.d.ts +34 -23
- package/dist/centered-layout.js +1 -1
- package/dist/chart-BLCqzt56.js +1 -0
- package/dist/chart-CChZiCrt.js +1 -0
- package/dist/chart-CUmSu9d7.js +1 -0
- package/dist/{chart-BpfbtOUN.d.ts → chart-Dl8gFo_D.d.ts} +117 -121
- package/dist/chart-DtgZBAas.js +2 -0
- package/dist/checkbox-Cu5cgZmk.js +1 -0
- package/dist/checkbox.d.ts +15 -2
- package/dist/checkbox.js +1 -1
- package/dist/choice-CCVG2hb9.js +1 -0
- package/dist/{choice-BLR0_MeB.d.ts → choice-CNiOSzqV.d.ts} +26 -20
- package/dist/choice.d.ts +6 -1
- package/dist/choice.js +1 -1
- package/dist/code-BPKNY1_w.js +1 -0
- package/dist/{code-block-BGdV4Yty.d.ts → code-block-BDw6MEwH.d.ts} +9 -9
- package/dist/{code-block-W3kWPxCJ.js → code-block-CKzsAMzj.js} +3 -3
- package/dist/code-block.d.ts +28 -19
- package/dist/code-block.js +1 -1
- package/dist/code-block_highlight-utils.d.ts +6 -1
- package/dist/code-block_highlight-utils.js +1 -1
- package/dist/code.d.ts +16 -3
- package/dist/code.js +1 -1
- package/dist/color-CHZbU1Ww.js +1 -0
- package/dist/color.js +1 -1
- package/dist/combobox.d.ts +42 -28
- package/dist/combobox.js +1 -1
- package/dist/command.d.ts +59 -47
- package/dist/command.js +1 -1
- package/dist/compose-refs-BdRUneoc.js +1 -0
- package/dist/{copy-to-clipboard-DInu78k_.js → copy-to-clipboard-Dd83caRw.js} +1 -1
- package/dist/cx.d.ts +4 -4
- package/dist/cx.js +1 -1
- package/dist/{data-slot-B-LqAcBB.d.ts → data-slot-BW8KQ9Xo.d.ts} +2 -2
- package/dist/data-table.d.ts +83 -52
- package/dist/data-table.js +1 -1
- package/dist/description-list.d.ts +13 -2
- package/dist/description-list.js +1 -1
- package/dist/{dialog-2fRO4ca4.d.ts → dialog-CIEuwNys.d.ts} +32 -8
- package/dist/dialog-CbEEA0fl.d.ts +32 -0
- package/dist/dialog-DmzoDfY3.js +1 -0
- package/dist/dialog.d.ts +7 -2
- package/dist/dialog.js +1 -1
- package/dist/{dropdown-menu-CpjRwMWe.d.ts → dropdown-menu-CeY498yk.d.ts} +41 -33
- package/dist/dropdown-menu-uheL0prz.js +1 -0
- package/dist/dropdown-menu.d.ts +6 -1
- package/dist/dropdown-menu.js +1 -1
- package/dist/empty.d.ts +7 -2
- package/dist/empty.js +1 -1
- package/dist/field-Bpvn4tQp.js +1 -0
- package/dist/{field-V_gnkcmN.d.ts → field-BshcNVe_.d.ts} +1 -1
- package/dist/field-Cai_4c1l.js +1 -0
- package/dist/field.d.ts +53 -42
- package/dist/field.js +1 -1
- package/dist/flag.d.ts +11 -3
- package/dist/flag.js +1 -1
- package/dist/hooks.d.ts +35 -10
- package/dist/hooks.js +1 -1
- package/dist/hover-card.d.ts +25 -14
- package/dist/hover-card.js +1 -1
- package/dist/{icon-CgNqu-fl.d.ts → icon--purqHRo.d.ts} +1 -1
- package/dist/{icon-ByLVhdYq.d.ts → icon-DuIYoyft.d.ts} +8 -2
- package/dist/{icon-DXDyhy2N.d.ts → icon-QCm1ui29.d.ts} +2 -2
- package/dist/icon-xb7d9M7X.js +1 -0
- package/dist/icon.d.ts +8 -3
- package/dist/icon.js +1 -1
- package/dist/icons-DEDCLZ8B.js +1 -0
- package/dist/icons-DXadFwpo.js +1 -0
- package/dist/icons-DcesO4Ng.js +1 -0
- package/dist/icons.d.ts +13 -1
- package/dist/icons.js +1 -1
- package/dist/{in-view-B3nMAzfE.d.ts → in-view-C_daNafg.d.ts} +4 -23
- package/dist/{index-BhfgyurF.d.ts → index-KJ06KK6t.d.ts} +3 -3
- package/dist/input-BjCDSOPA.js +1 -0
- package/dist/{input-Dx5owTCc.d.ts → input-DC4nW0Sr.d.ts} +12 -2
- package/dist/input-fW8QSZEO.js +1 -0
- package/dist/input.d.ts +37 -5
- package/dist/input.js +1 -1
- package/dist/kbd-P1nQshWo.js +1 -0
- package/dist/kbd.d.ts +17 -5
- package/dist/kbd.js +1 -1
- package/dist/label-DO1RlMKl.js +1 -0
- package/dist/{label-Dn5CPJUj.d.ts → label-epgtywRz.d.ts} +14 -8
- package/dist/label.d.ts +6 -1
- package/dist/label.js +1 -1
- package/dist/layer-container-DL4yclOu.js +1 -0
- package/dist/layer-container.d.ts +2 -2
- package/dist/layer-container.js +1 -1
- package/dist/line-chart.d.ts +147 -90
- package/dist/line-chart.js +1 -1
- package/dist/list-cQZPSjfz.js +1 -0
- package/dist/list.d.ts +34 -16
- package/dist/list.js +1 -1
- package/dist/live-region-Dhapu8a5.js +1 -0
- package/dist/live-region.d.ts +15 -2
- package/dist/live-region.js +1 -1
- package/dist/llms.txt +82 -79
- package/dist/main-CHyWYDak.js +1 -0
- package/dist/main.d.ts +13 -1
- package/dist/main.js +1 -1
- package/dist/mantle.css +133 -88
- package/dist/media-object.d.ts +16 -4
- package/dist/media-object.js +1 -1
- package/dist/migrations/0014-chart-named-colors.yml +1389 -0
- package/dist/migrations/0015-segmented-control.yml +788 -0
- package/dist/multi-select.d.ts +42 -29
- package/dist/multi-select.js +1 -1
- package/dist/otp-input.d.ts +20 -8
- package/dist/otp-input.js +1 -1
- package/dist/pagination.d.ts +93 -4
- package/dist/pagination.js +1 -1
- package/dist/{popover-BfB2I9G0.d.ts → popover-Bei0jyfH.d.ts} +87 -12
- package/dist/popover-DhgunktK.js +1 -0
- package/dist/popover-T2EyaqGK.d.ts +1 -0
- package/dist/popover.d.ts +7 -2
- package/dist/popover.js +1 -1
- package/dist/primitive-D8CzV_Ft.js +1 -0
- package/dist/progress.d.ts +28 -11
- package/dist/progress.js +1 -1
- package/dist/qr-code.d.ts +11 -3
- package/dist/qr-code.js +1 -1
- package/dist/query-filter.d.ts +6 -6
- package/dist/query.d.ts +9 -4
- package/dist/query.js +1 -1
- package/dist/radio-group-BJQ6EOqh.d.ts +27 -0
- package/dist/radio-group-BliblUqe.js +1 -0
- package/dist/radio-group-ggEkCi0V.js +1 -0
- package/dist/radio-group.d.ts +21 -100
- package/dist/radio-group.js +1 -1
- package/dist/sandbar.d.ts +43 -30
- package/dist/sandbar.js +1 -1
- package/dist/sandboxed-on-click-D4PL5_GR.js +1 -0
- package/dist/sandboxed-on-click.d.ts +8 -0
- package/dist/sandboxed-on-click.js +1 -1
- package/dist/scatter-plot.d.ts +137 -76
- package/dist/scatter-plot.js +1 -1
- package/dist/segmented-control.d.ts +136 -0
- package/dist/segmented-control.js +1 -0
- package/dist/select-1xuUx_os.js +1 -0
- package/dist/{select-BkhBxtOT.d.ts → select-BpaXHxJm.d.ts} +33 -25
- package/dist/select.d.ts +6 -1
- package/dist/select.js +1 -1
- package/dist/selectable-list.d.ts +29 -18
- package/dist/selectable-list.js +1 -1
- package/dist/{separator-D9AWEkcJ.d.ts → separator-Ck4sPrdN.d.ts} +4 -2
- package/dist/separator-DnvhwY2J.js +1 -0
- package/dist/separator.d.ts +6 -1
- package/dist/separator.js +1 -1
- package/dist/{shake-DL6WhMXM.js → shake-CAUpKBHe.js} +1 -1
- package/dist/sheet-DHy_vlme.js +1 -0
- package/dist/sheet.d.ts +36 -7
- package/dist/sheet.js +1 -1
- package/dist/sidebar.d.ts +53 -37
- package/dist/sidebar.js +1 -1
- package/dist/skeleton-DHfyjuQi.js +1 -0
- package/dist/skeleton.d.ts +15 -4
- package/dist/skeleton.js +1 -1
- package/dist/skip-to-main-link.d.ts +12 -1
- package/dist/skip-to-main-link.js +1 -1
- package/dist/slider.d.ts +11 -1
- package/dist/slider.js +1 -1
- package/dist/slot-B7rwscwd.js +1 -0
- package/dist/{slot-C0OCJjdJ.d.ts → slot-BEMQMbk3.d.ts} +6 -4
- package/dist/slot.d.ts +6 -1
- package/dist/slot.js +1 -1
- package/dist/source-all.css +5 -1
- package/dist/split-button.d.ts +20 -9
- package/dist/split-button.js +1 -1
- package/dist/strata.d.ts +35 -22
- package/dist/strata.js +1 -1
- package/dist/{suggestions-NkqYTT49.d.ts → suggestions-BJeGvwDa.d.ts} +7 -7
- package/dist/switch.d.ts +14 -2
- package/dist/switch.js +1 -1
- package/dist/table-BnLdXUai.js +1 -0
- package/dist/{table-vT6Okwfa.d.ts → table-Ii9hHUWN.d.ts} +84 -5
- package/dist/table.d.ts +6 -1
- package/dist/table.js +1 -1
- package/dist/tabs.d.ts +24 -12
- package/dist/tabs.js +1 -1
- package/dist/text-area.d.ts +12 -2
- package/dist/text-area.js +1 -1
- package/dist/theme-BNdZl352.js +1 -0
- package/dist/theme-switcher.d.ts +18 -4
- package/dist/theme-switcher.js +1 -1
- package/dist/theme.d.ts +25 -11
- package/dist/theme.js +1 -1
- package/dist/toast.d.ts +15 -2
- package/dist/toast.js +1 -1
- package/dist/tokens.dark.json +3261 -0
- package/dist/tokens.json +4933 -0
- package/dist/tokens.resolver.json +37 -0
- package/dist/{tooltip-NcLIeBy5.d.ts → tooltip-CstGDKwy.d.ts} +18 -11
- package/dist/tooltip-DQO40Mrq.js +1 -0
- package/dist/tooltip.d.ts +6 -1
- package/dist/tooltip.js +1 -1
- package/dist/truncated-text.d.ts +28 -14
- package/dist/truncated-text.js +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/types.js +1 -1
- package/dist/use-breakpoint-B4Kh0xE6.js +1 -0
- package/dist/use-callback-ref-DiOXFQzM.js +1 -0
- package/dist/use-composed-refs-DPYmLDSe.js +1 -0
- package/dist/use-copy-to-clipboard-hBL6_65i.js +1 -0
- package/dist/use-inert-siblings-C4RHXrZc.js +1 -0
- package/dist/use-is-apple-platform-Bq6_KbVX.js +1 -0
- package/dist/use-is-hydrated-BeLOGKwE.js +1 -0
- package/dist/use-is-hydrated-after-paint-CrHt3OHw.js +1 -0
- package/dist/use-isomorphic-layout-effect-CL6iq0Bj.js +1 -0
- package/dist/use-matches-media-query-FfvtNKQe.js +1 -0
- package/dist/use-prefers-reduced-motion-Ck6dnOM9.js +1 -0
- package/dist/use-swipe-to-dismiss-BYdlca8r.js +1 -0
- package/dist/utils.d.ts +1 -1
- package/dist/utils.js +1 -1
- package/dist/visually-hidden.d.ts +14 -1
- package/dist/visually-hidden.js +1 -1
- package/dist/well.d.ts +7 -2
- package/dist/well.js +1 -1
- package/package.json +21 -7
- package/src/components/chart/d3-license.md +25 -0
- package/dist/alert-P9lwn25X.js +0 -1
- package/dist/anchor-CgcbWEUs.js +0 -1
- package/dist/browser-only-BTSrYWLj.js +0 -1
- package/dist/button-69InNC_m.js +0 -1
- package/dist/button-B8k98Pby.js +0 -1
- package/dist/button-Dge0D5bl.js +0 -1
- package/dist/chart-BpWfQAwf.js +0 -2
- package/dist/checkbox-DmSQXs26.js +0 -1
- package/dist/choice-2Lrv8_nl.js +0 -1
- package/dist/code-DUJzSl4K.js +0 -1
- package/dist/compose-refs-sFdxsL7k.js +0 -1
- package/dist/dialog-7TUgiSzX.js +0 -1
- package/dist/dialog-Dp0QGWwo.d.ts +0 -28
- package/dist/dropdown-menu-BHBzCDSZ.js +0 -1
- package/dist/field-Bihblt8U.js +0 -1
- package/dist/field-CPvjazWN.js +0 -1
- package/dist/icon-kK0c-POG.js +0 -1
- package/dist/icons-CDLz5lpI.js +0 -1
- package/dist/icons-CSwTVV2m.js +0 -1
- package/dist/icons-DP3lQw5O.js +0 -1
- package/dist/input-CpQ6jlpI.js +0 -1
- package/dist/kbd-CLHsJ99p.js +0 -1
- package/dist/label-nHqqYS7e.js +0 -1
- package/dist/layer-container-kEQiE4zV.js +0 -1
- package/dist/list-RFRIQxU2.js +0 -1
- package/dist/live-region-DQ1QLv3L.js +0 -1
- package/dist/main-CC1L9IsH.js +0 -1
- package/dist/popover-C96V8SXi.d.ts +0 -1
- package/dist/popover-DxOqLKxy.js +0 -1
- package/dist/primitive-Dz9Al-us.js +0 -1
- package/dist/radio-group-HDVxTNPi.js +0 -1
- package/dist/sandboxed-on-click-C7pPu-2M.js +0 -1
- package/dist/select-CAAYk4Yj.js +0 -1
- package/dist/separator-DfzxVutO.js +0 -1
- package/dist/sheet-CSJc_sB4.js +0 -1
- package/dist/skeleton-DBpI-ko5.js +0 -1
- package/dist/slot-DdYN1L1C.js +0 -1
- package/dist/table-CFHiDBW8.js +0 -1
- package/dist/theme-C-glc5Q-.js +0 -1
- package/dist/tooltip-b6oiTaWq.js +0 -1
- package/dist/use-breakpoint--mo7kr9d.js +0 -1
- package/dist/use-callback-ref-BvVyI5K1.js +0 -1
- package/dist/use-copy-to-clipboard-Dy_0Qzb7.js +0 -1
- package/dist/use-is-apple-platform-D4nifHMx.js +0 -1
- package/dist/use-is-hydrated-after-paint-r9Cl2mGp.js +0 -1
- package/dist/use-isomorphic-layout-effect-CLSmHzo4.js +0 -1
- package/dist/use-matches-media-query-m860lols.js +0 -1
- package/dist/use-prefers-reduced-motion-CU6mWmOe.js +0 -1
- package/dist/use-swipe-to-dismiss-DceYk1Id.js +0 -1
package/dist/agent.json
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ngrok/mantle",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.94.1",
|
|
4
4
|
"origin": "https://mantle.ngrok.com",
|
|
5
5
|
"endpoints": {
|
|
6
6
|
"docs": "https://mantle.ngrok.com/",
|
|
7
7
|
"forAiAgents": "https://mantle.ngrok.com/for-ai-agents",
|
|
8
|
+
"mcp": "https://mantle.ngrok.com/mcp",
|
|
8
9
|
"llmsTxt": "https://mantle.ngrok.com/llms.txt",
|
|
9
10
|
"llmsFullTxt": "https://mantle.ngrok.com/llms-full.txt",
|
|
10
11
|
"components": "https://mantle.ngrok.com/api/components.json",
|
|
@@ -72,6 +73,7 @@
|
|
|
72
73
|
"@ngrok/mantle/sandbar",
|
|
73
74
|
"@ngrok/mantle/sandboxed-on-click",
|
|
74
75
|
"@ngrok/mantle/scatter-plot",
|
|
76
|
+
"@ngrok/mantle/segmented-control",
|
|
75
77
|
"@ngrok/mantle/select",
|
|
76
78
|
"@ngrok/mantle/selectable-list",
|
|
77
79
|
"@ngrok/mantle/separator",
|
|
@@ -111,7 +113,24 @@
|
|
|
111
113
|
"jsdoc": "A vertically stacked set of disclosure sections styled after the shadcn / ngrok.com accordion.",
|
|
112
114
|
"examples": [
|
|
113
115
|
"Composition:\n```\nAccordion.Root\n└── Accordion.Item\n ├── Accordion.Trigger\n │ └── Accordion.TriggerIcon\n └── Accordion.Content\n └── Accordion.Body\n```",
|
|
114
|
-
"<Accordion.Root type=\"single\" defaultValue=\"item-1\">\n <Accordion.Item value=\"item-1\">\n <Accordion.Trigger>\n Is it accessible?\n <Accordion.TriggerIcon />\n </Accordion.Trigger>\n <Accordion.Content>\n <Accordion.Body>Yes. It adheres to the WAI-ARIA disclosure pattern.</Accordion.Body>\n </Accordion.Content>\n </Accordion.Item>\n</Accordion.Root
|
|
116
|
+
"```tsx\n<Accordion.Root type=\"single\" defaultValue=\"item-1\">\n <Accordion.Item value=\"item-1\">\n <Accordion.Trigger>\n Is it accessible?\n <Accordion.TriggerIcon />\n </Accordion.Trigger>\n <Accordion.Content>\n <Accordion.Body>Yes. It adheres to the WAI-ARIA disclosure pattern.</Accordion.Body>\n </Accordion.Content>\n </Accordion.Item>\n</Accordion.Root>\n```"
|
|
117
|
+
],
|
|
118
|
+
"siblings": [
|
|
119
|
+
{
|
|
120
|
+
"name": "Tabs",
|
|
121
|
+
"boundary": "one section shows at a time, and a row of tabs switches between them."
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"name": "Strata",
|
|
125
|
+
"boundary": "every section stays open, with its title and explanation beside its content."
|
|
126
|
+
}
|
|
127
|
+
],
|
|
128
|
+
"useWhen": "Stack titled sections that each expand and collapse in place, such as questions and answers or a group of advanced settings.",
|
|
129
|
+
"aliases": [
|
|
130
|
+
"collapsible",
|
|
131
|
+
"collapse",
|
|
132
|
+
"disclosure",
|
|
133
|
+
"expansion panel"
|
|
115
134
|
]
|
|
116
135
|
},
|
|
117
136
|
{
|
|
@@ -126,8 +145,32 @@
|
|
|
126
145
|
"summary": "Displays a callout for user attention.",
|
|
127
146
|
"jsdoc": "Displays a callout for user attention.",
|
|
128
147
|
"examples": [
|
|
129
|
-
"Composition:\n```\nAlert.Root\n├── Alert.Icon\n├── Alert.Content\n ├── Alert.Title\n ├── Alert.Description\n ├── Alert.
|
|
130
|
-
"```tsx\n<Alert.Root intent=\"info\">\n <Alert.Icon />\n <Alert.Content>\n <Alert.Title>Alert Title</Alert.Title>\n <Alert.Description>\n Alert description text.\n </Alert.Description>\n <Alert.
|
|
148
|
+
"Composition:\n```\nAlert.Root\n├── Alert.Icon\n├── Alert.Content\n ├── Alert.Title\n ├── Alert.Description\n ├── Alert.ExpandButton\n └── Alert.DismissIconButton\n```",
|
|
149
|
+
"```tsx\n<Alert.Root intent=\"info\">\n <Alert.Icon />\n <Alert.Content>\n <Alert.Title>Alert Title</Alert.Title>\n <Alert.Description>\n Alert description text.\n </Alert.Description>\n <Alert.ExpandButton count={2} expanded={false} />\n <Alert.DismissIconButton />\n </Alert.Content>\n</Alert.Root>\n```"
|
|
150
|
+
],
|
|
151
|
+
"siblings": [
|
|
152
|
+
{
|
|
153
|
+
"name": "Toast",
|
|
154
|
+
"boundary": "the message is brief and goes away on its own."
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
"name": "AlertDialog",
|
|
158
|
+
"boundary": "the user must respond before they continue."
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
"name": "AlertCenter",
|
|
162
|
+
"boundary": "several account-level alerts share one bar at the top of the app."
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
"name": "Empty",
|
|
166
|
+
"boundary": "a region has no data, no results, or no access to show."
|
|
167
|
+
}
|
|
168
|
+
],
|
|
169
|
+
"useWhen": "Show a persistent message in the page, such as a warning, an error, or a success note, beside the content it describes.",
|
|
170
|
+
"aliases": [
|
|
171
|
+
"callout",
|
|
172
|
+
"notice",
|
|
173
|
+
"admonition"
|
|
131
174
|
]
|
|
132
175
|
},
|
|
133
176
|
{
|
|
@@ -140,10 +183,26 @@
|
|
|
140
183
|
"docsUrl": "https://mantle.ngrok.com/components/feedback/alert-center",
|
|
141
184
|
"markdownUrl": "https://mantle.ngrok.com/components/feedback/alert-center.md",
|
|
142
185
|
"summary": "A single top-level bar that surfaces one-to-many account alerts and their upgrade CTAs, expanding additional alerts inline.",
|
|
143
|
-
"jsdoc": "A single, top-level entry point for one-to-many account alerts and their upgrade CTAs
|
|
186
|
+
"jsdoc": "A single, top-level entry point for one-to-many account alerts and their upgrade CTAs: the aggregation layer that replaces a stack of independent window banners.",
|
|
144
187
|
"examples": [
|
|
145
188
|
"Composition (items render no DOM in place; their children portal into a\nstable host the bar or a row adopts):\n```\nAlertCenter.Root\n├── AlertCenter.Bar ← the top-ranked item's children, in Alert chrome\n├── AlertCenter.Content ← every other item's children, as ranked rows\n└── AlertCenter.Item (0..n, renderless)\n └── Alert.Icon / Alert.Content / Alert.Title / Alert.Description /\n AlertCenter.DismissIconButton\n```",
|
|
146
|
-
"```tsx\n<AppLayout.Root className=\"fixed inset-0\">\n <AppLayout.Notice>\n {showPreviewNotice && <PreviewNotice />}\n <AlertCenter.Root>\n <AlertCenter.Bar />\n <AlertCenter.Content />\n <AlertCenter.Item id=\"payment-failed\" intent=\"danger\">\n <Alert.Icon />\n <Alert.Content>\n <Alert.Title>\n Payment failed
|
|
189
|
+
"```tsx\n<AppLayout.Root className=\"fixed inset-0\">\n <AppLayout.Notice>\n {showPreviewNotice && <PreviewNotice />}\n <AlertCenter.Root>\n <AlertCenter.Bar />\n <AlertCenter.Content />\n <AlertCenter.Item id=\"payment-failed\" intent=\"danger\">\n <Alert.Icon />\n <Alert.Content>\n <Alert.Title>\n Payment failed: we couldn't charge your card.{\" \"}\n <a href=\"/billing\">Update payment method</a>\n </Alert.Title>\n <Alert.Description>\n Update your payment method to avoid a service interruption.\n </Alert.Description>\n </Alert.Content>\n </AlertCenter.Item>\n {!dismissed.has(\"transfer-limit\") && (\n <AlertCenter.Item id=\"transfer-limit\" intent=\"warning\">\n <Alert.Icon />\n <Alert.Content>\n <Alert.Title>\n You've used 92% of your monthly transfer.{\" \"}\n <a href=\"/billing/choose-a-plan\">Upgrade</a>\n </Alert.Title>\n <AlertCenter.DismissIconButton onClick={() => dismiss(\"transfer-limit\")} />\n </Alert.Content>\n </AlertCenter.Item>\n )}\n </AlertCenter.Root>\n </AppLayout.Notice>\n <AppLayout.Workspace>…</AppLayout.Workspace>\n</AppLayout.Root>\n```"
|
|
190
|
+
],
|
|
191
|
+
"siblings": [
|
|
192
|
+
{
|
|
193
|
+
"name": "Alert",
|
|
194
|
+
"boundary": "one message sits inline, and you place and control it yourself."
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
"name": "Toast",
|
|
198
|
+
"boundary": "the message is brief and goes away on its own."
|
|
199
|
+
}
|
|
200
|
+
],
|
|
201
|
+
"useWhen": "Show persistent account-level alerts, such as usage limits with upgrade actions, in one ranked bar at the top of the app.",
|
|
202
|
+
"aliases": [
|
|
203
|
+
"banner",
|
|
204
|
+
"announcement bar",
|
|
205
|
+
"global banner"
|
|
147
206
|
]
|
|
148
207
|
},
|
|
149
208
|
{
|
|
@@ -160,6 +219,26 @@
|
|
|
160
219
|
"examples": [
|
|
161
220
|
"Composition:\n```\nAlertDialog.Root\n├── AlertDialog.Trigger\n└── AlertDialog.Content\n ├── AlertDialog.Icon\n └── AlertDialog.Body\n ├── AlertDialog.Header\n │ ├── AlertDialog.Title\n │ └── AlertDialog.Description\n └── AlertDialog.Footer\n ├── AlertDialog.Cancel\n └── AlertDialog.Action\n```",
|
|
162
221
|
"```tsx\n<AlertDialog.Root intent=\"danger\">\n <AlertDialog.Trigger asChild>\n <Button type=\"button\" appearance=\"outlined\" intent=\"neutral\">\n Show Danger Alert Dialog\n </Button>\n </AlertDialog.Trigger>\n <AlertDialog.Content>\n <AlertDialog.Icon />\n <AlertDialog.Body>\n <AlertDialog.Header>\n <AlertDialog.Title>\n Are you absolutely sure?\n </AlertDialog.Title>\n <AlertDialog.Description>\n Proident quis nisi tempor irure sunt ut minim occaecat mollit sunt.\n </AlertDialog.Description>\n </AlertDialog.Header>\n <AlertDialog.Footer>\n <AlertDialog.Cancel type=\"button\">Cancel</AlertDialog.Cancel>\n <AlertDialog.Action type=\"button\">\n Continue\n </AlertDialog.Action>\n </AlertDialog.Footer>\n </AlertDialog.Body>\n </AlertDialog.Content>\n</AlertDialog.Root>\n```"
|
|
222
|
+
],
|
|
223
|
+
"siblings": [
|
|
224
|
+
{
|
|
225
|
+
"name": "Dialog",
|
|
226
|
+
"boundary": "a modal window gathers input or confirms a choice that is not destructive."
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
"name": "Sheet",
|
|
230
|
+
"boundary": "the content slides in from the edge of the screen, such as a filter panel or a detail view."
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
"name": "Sandbar",
|
|
234
|
+
"boundary": "the page holds unsaved changes, and a bar waits for the user to save or discard them."
|
|
235
|
+
}
|
|
236
|
+
],
|
|
237
|
+
"useWhen": "The user must confirm a destructive or irreversible action, such as a delete or a sign-out, before it runs.",
|
|
238
|
+
"aliases": [
|
|
239
|
+
"confirm",
|
|
240
|
+
"confirmation",
|
|
241
|
+
"confirm dialog"
|
|
163
242
|
]
|
|
164
243
|
},
|
|
165
244
|
{
|
|
@@ -171,10 +250,25 @@
|
|
|
171
250
|
"importPath": "@ngrok/mantle/anchor",
|
|
172
251
|
"docsUrl": "https://mantle.ngrok.com/components/navigation/anchor",
|
|
173
252
|
"markdownUrl": "https://mantle.ngrok.com/components/navigation/anchor.md",
|
|
174
|
-
"summary": "
|
|
175
|
-
"jsdoc": "A styled hyperlink
|
|
253
|
+
"summary": "A fundamental component for rendering links to external addresses.",
|
|
254
|
+
"jsdoc": "A styled hyperlink: a native `<a>` with mantle's link styling, focus treatment, optional leading/trailing icon, and a safer default for the `rel` attribute.",
|
|
176
255
|
"examples": [
|
|
177
256
|
"```tsx\nimport { Anchor } from \"@ngrok/mantle/anchor\";\nimport { BookIcon } from \"@phosphor-icons/react/Book\";\nimport { Link } from \"react-router\";\n\n// Basic external link.\n<Anchor href=\"https://ngrok.com/\">ngrok.com</Anchor>\n\n// External link in a new tab with a leading icon. `rel` defaults to\n// \"noopener noreferrer\" when `target=\"_blank\"`.\n<Anchor href=\"https://ngrok.com/docs\" target=\"_blank\" icon={<BookIcon />}>\n ngrok docs\n</Anchor>\n\n// Compose Anchor styling onto a react-router Link for internal navigation.\n<Anchor asChild>\n <Link to=\"/dashboard\">Open dashboard</Link>\n</Anchor>\n```"
|
|
257
|
+
],
|
|
258
|
+
"siblings": [
|
|
259
|
+
{
|
|
260
|
+
"name": "Button",
|
|
261
|
+
"boundary": "the control runs an action and does not navigate."
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
"name": "Breadcrumb",
|
|
265
|
+
"boundary": "the links show the path from a root page to the current page."
|
|
266
|
+
}
|
|
267
|
+
],
|
|
268
|
+
"useWhen": "Link to an address outside the app, such as an external site, a file, or a `mailto:` address.",
|
|
269
|
+
"aliases": [
|
|
270
|
+
"link",
|
|
271
|
+
"hyperlink"
|
|
178
272
|
]
|
|
179
273
|
},
|
|
180
274
|
{
|
|
@@ -190,6 +284,18 @@
|
|
|
190
284
|
"examples": [
|
|
191
285
|
"Composition:\n```\nAppLayout.Root\n├── AppLayout.Notice\n└── AppLayout.SidePanelRoot\n └── AppLayout.Workspace\n ├── AppLayout.Content\n │ ├── AppLayout.Header\n │ │ ├── AppLayout.HeaderStart\n │ │ ├── AppLayout.HeaderContent\n │ │ └── AppLayout.HeaderActions\n │ │ └── AppLayout.SidePanelTrigger\n │ └── AppLayout.Body\n └── AppLayout.SidePanel\n ├── AppLayout.SidePanelHeader\n ├── AppLayout.SidePanelBody\n └── AppLayout.SidePanelFooter\n```",
|
|
192
286
|
"```tsx\n<Sidebar.Root>\n <AppLayout.Root className=\"fixed inset-0\">\n <SkipToMainLink />\n <AppLayout.Notice>{isUnderMaintenance && <MaintenanceBanner />}</AppLayout.Notice>\n <AppLayout.SidePanelRoot>\n <AppLayout.Workspace>\n <Sidebar.Nav aria-label=\"Main\">…</Sidebar.Nav>\n <AppLayout.Content>\n <AppLayout.Header>\n <AppLayout.HeaderStart>\n <Sidebar.Trigger />\n </AppLayout.HeaderStart>\n <AppLayout.HeaderContent>\n <Breadcrumbs />\n </AppLayout.HeaderContent>\n <AppLayout.HeaderActions>\n <AppLayout.SidePanelTrigger icon={<SparkleIcon />} label=\"Toggle the assistant\" />\n </AppLayout.HeaderActions>\n </AppLayout.Header>\n <AppLayout.Body>\n <Outlet />\n </AppLayout.Body>\n </AppLayout.Content>\n <AppLayout.SidePanel aria-label=\"Assistant\">\n <AppLayout.SidePanelHeader>\n <p className=\"text-strong min-w-0 flex-1 truncate text-sm font-medium\">Assistant</p>\n <AppLayout.SidePanelTrigger icon={<XIcon />} label=\"Close the assistant\" />\n </AppLayout.SidePanelHeader>\n <AppLayout.SidePanelBody>\n <AssistantConversation />\n </AppLayout.SidePanelBody>\n <AppLayout.SidePanelFooter>\n <AssistantComposer />\n </AppLayout.SidePanelFooter>\n </AppLayout.SidePanel>\n </AppLayout.Workspace>\n </AppLayout.SidePanelRoot>\n </AppLayout.Root>\n</Sidebar.Root>\n```"
|
|
287
|
+
],
|
|
288
|
+
"siblings": [
|
|
289
|
+
{
|
|
290
|
+
"name": "CenteredLayout",
|
|
291
|
+
"boundary": "the page is one focused flow with no sidebar, such as sign-in, onboarding, or a 404 page."
|
|
292
|
+
}
|
|
293
|
+
],
|
|
294
|
+
"useWhen": "Frame a signed-in app with navigation that persists across routes: a sidebar, a header toolbar, and one scrolling content card.",
|
|
295
|
+
"aliases": [
|
|
296
|
+
"app shell",
|
|
297
|
+
"application shell",
|
|
298
|
+
"dashboard shell"
|
|
193
299
|
]
|
|
194
300
|
},
|
|
195
301
|
{
|
|
@@ -201,11 +307,26 @@
|
|
|
201
307
|
"importPath": "@ngrok/mantle/area-chart",
|
|
202
308
|
"docsUrl": "https://mantle.ngrok.com/components/charts/area-chart",
|
|
203
309
|
"markdownUrl": "https://mantle.ngrok.com/components/charts/area-chart.md",
|
|
204
|
-
"summary": "
|
|
205
|
-
"jsdoc": "
|
|
310
|
+
"summary": "An area chart for showing how values (and, when stacked, a total and its parts) change over a continuous x axis.",
|
|
311
|
+
"jsdoc": "An area chart for showing how values (and, when stacked, a total and its parts) change over a continuous x axis.",
|
|
206
312
|
"examples": [
|
|
207
|
-
"Composition:\n```\nAreaChart.Root\n├── AreaChart.Grid\n├── AreaChart.XAxis\n├── AreaChart.YAxis\n├── AreaChart.Area (one per series)\n├── AreaChart.ReferenceLine\n├── AreaChart.Tooltip\n├── AreaChart.Legend\n└── AreaChart.CopyButton\n```",
|
|
208
|
-
"```tsx\nconst data = [\n { date: new Date(\"2026-07-15\"), http: 4200, tcp: 1400 },\n { date: new Date(\"2026-07-16\"), http: 5100, tcp: 1650 },\n { date: new Date(\"2026-07-17\"), http: 4700, tcp: 1500 },\n];\n\n<AreaChart.Root data={data} xKey=\"date\" stacked aria-label=\"Traffic by protocol\">\n <AreaChart.Grid />\n <AreaChart.XAxis />\n <AreaChart.YAxis />\n <AreaChart.Area dataKey=\"http\" label=\"HTTP\" />\n <AreaChart.Area dataKey=\"tcp\" label=\"TCP\" />\n <AreaChart.Tooltip />\n <AreaChart.Legend />\n</AreaChart.Root>\n```"
|
|
313
|
+
"Composition:\n```\nAreaChart.Root\n├── AreaChart.Grid\n├── AreaChart.XAxis\n├── AreaChart.YAxis\n├── AreaChart.Area (one per series)\n├── AreaChart.ReferenceLine\n├── AreaChart.Tooltip\n├── AreaChart.Legend\n└── AreaChart.CopyButton\n```\n\nA List groups Roots:\n```\nAreaChart.List\n└── AreaChart.Root (one per chart)\n```",
|
|
314
|
+
"```tsx\nconst data = [\n { date: new Date(\"2026-07-15\"), http: 4200, tcp: 1400 },\n { date: new Date(\"2026-07-16\"), http: 5100, tcp: 1650 },\n { date: new Date(\"2026-07-17\"), http: 4700, tcp: 1500 },\n];\n\n<AreaChart.Root data={data} xKey=\"date\" stacked aria-label=\"Traffic by protocol\">\n <AreaChart.Grid />\n <AreaChart.XAxis />\n <AreaChart.YAxis />\n <AreaChart.Area dataKey=\"http\" label=\"HTTP\" color=\"blue\" />\n <AreaChart.Area dataKey=\"tcp\" label=\"TCP\" color=\"emerald\" />\n <AreaChart.Tooltip />\n <AreaChart.Legend />\n</AreaChart.Root>\n```"
|
|
315
|
+
],
|
|
316
|
+
"siblings": [
|
|
317
|
+
{
|
|
318
|
+
"name": "LineChart",
|
|
319
|
+
"boundary": "the series are trends to compare, and filled areas would hide where they cross."
|
|
320
|
+
},
|
|
321
|
+
{
|
|
322
|
+
"name": "BarChart",
|
|
323
|
+
"boundary": "the reader compares values across categories by bar length from zero."
|
|
324
|
+
}
|
|
325
|
+
],
|
|
326
|
+
"useWhen": "Show how a volume, or a total and its parts, changes across an ordered x axis, such as time.",
|
|
327
|
+
"aliases": [
|
|
328
|
+
"sparkline",
|
|
329
|
+
"area graph"
|
|
209
330
|
]
|
|
210
331
|
},
|
|
211
332
|
{
|
|
@@ -218,10 +339,25 @@
|
|
|
218
339
|
"docsUrl": "https://mantle.ngrok.com/components/data-display/avatar",
|
|
219
340
|
"markdownUrl": "https://mantle.ngrok.com/components/data-display/avatar.md",
|
|
220
341
|
"summary": "A small image representing a person or an account, with a text or icon fallback.",
|
|
221
|
-
"jsdoc": "A small image representing a person or an account, with a text or icon fallback for when there is no picture
|
|
342
|
+
"jsdoc": "A small image representing a person or an account, with a text or icon fallback for when there is no picture, or before one loads.",
|
|
222
343
|
"examples": [
|
|
223
344
|
"Composition:\n```\nAvatar.Root\n├── Avatar.Image\n└── Avatar.Fallback\n```",
|
|
224
345
|
"```tsx\n<Avatar.Root appearance=\"square\" colorSeed=\"acc_123\">\n <Avatar.Image src=\"https://example.com/acme.png\" alt=\"\" />\n <Avatar.Fallback name=\"Acme Corp\" />\n</Avatar.Root>\n```"
|
|
346
|
+
],
|
|
347
|
+
"siblings": [
|
|
348
|
+
{
|
|
349
|
+
"name": "MediaObject",
|
|
350
|
+
"boundary": "the picture sits beside a title and a description."
|
|
351
|
+
},
|
|
352
|
+
{
|
|
353
|
+
"name": "Icon",
|
|
354
|
+
"boundary": "the image is a generic symbol, not a person or an account."
|
|
355
|
+
}
|
|
356
|
+
],
|
|
357
|
+
"useWhen": "Show a small picture of a person or an account, with initials or an icon when there is no picture.",
|
|
358
|
+
"aliases": [
|
|
359
|
+
"profile picture",
|
|
360
|
+
"profile photo"
|
|
225
361
|
]
|
|
226
362
|
},
|
|
227
363
|
{
|
|
@@ -233,10 +369,31 @@
|
|
|
233
369
|
"importPath": "@ngrok/mantle/badge",
|
|
234
370
|
"docsUrl": "https://mantle.ngrok.com/components/data-display/badge",
|
|
235
371
|
"markdownUrl": "https://mantle.ngrok.com/components/data-display/badge.md",
|
|
236
|
-
"summary": "A non-interactive label used to highlight short, scannable information
|
|
237
|
-
"jsdoc": "A non-interactive label used to highlight short, scannable information
|
|
372
|
+
"summary": "A non-interactive label used to highlight short, scannable information (a status, a category tag, or a count) in the smallest possible footprint.",
|
|
373
|
+
"jsdoc": "A non-interactive label used to highlight short, scannable information (a status, a category tag, or a count) in the smallest possible footprint.",
|
|
238
374
|
"examples": [
|
|
239
|
-
"```tsx\nimport { Badge } from \"@ngrok/mantle/badge\";\nimport { CheckCircleIcon } from \"@phosphor-icons/react/CheckCircle\";\n\n<Badge appearance=\"muted\" color=\"success\" icon={<CheckCircleIcon />}>\n Succeeded\n</Badge>\n\n// Polymorphic
|
|
375
|
+
"```tsx\nimport { Badge } from \"@ngrok/mantle/badge\";\nimport { CheckCircleIcon } from \"@phosphor-icons/react/CheckCircle\";\n\n<Badge appearance=\"muted\" color=\"success\" icon={<CheckCircleIcon />}>\n Succeeded\n</Badge>\n\n// Polymorphic: render the badge as a link, preserving its styling.\n<Badge appearance=\"muted\" color=\"info\" asChild>\n <a href=\"/status\">Operational</a>\n</Badge>\n```"
|
|
376
|
+
],
|
|
377
|
+
"siblings": [
|
|
378
|
+
{
|
|
379
|
+
"name": "Button",
|
|
380
|
+
"boundary": "the label must respond to a click."
|
|
381
|
+
},
|
|
382
|
+
{
|
|
383
|
+
"name": "Kbd",
|
|
384
|
+
"boundary": "the label is a keyboard key or a shortcut."
|
|
385
|
+
},
|
|
386
|
+
{
|
|
387
|
+
"name": "MultiSelect",
|
|
388
|
+
"boundary": "the tags are values that the user picks and removes."
|
|
389
|
+
}
|
|
390
|
+
],
|
|
391
|
+
"useWhen": "Label an item with a short status, a category tag, or a count.",
|
|
392
|
+
"aliases": [
|
|
393
|
+
"tag",
|
|
394
|
+
"chip",
|
|
395
|
+
"pill",
|
|
396
|
+
"lozenge"
|
|
240
397
|
]
|
|
241
398
|
},
|
|
242
399
|
{
|
|
@@ -248,11 +405,28 @@
|
|
|
248
405
|
"importPath": "@ngrok/mantle/bar-chart",
|
|
249
406
|
"docsUrl": "https://mantle.ngrok.com/components/charts/bar-chart",
|
|
250
407
|
"markdownUrl": "https://mantle.ngrok.com/components/charts/bar-chart.md",
|
|
251
|
-
"summary": "A
|
|
252
|
-
"jsdoc": "A
|
|
408
|
+
"summary": "A bar chart for comparing values across categories, with grouped and stacked variants.",
|
|
409
|
+
"jsdoc": "A bar chart for comparing values across categories, with grouped and stacked variants.",
|
|
253
410
|
"examples": [
|
|
254
|
-
"Composition:\n```\nBarChart.Root\n├── BarChart.Grid\n├── BarChart.XAxis\n├── BarChart.YAxis\n├── BarChart.Bar (one per series)\n├── BarChart.ReferenceLine\n├── BarChart.Tooltip\n├── BarChart.Legend\n└── BarChart.CopyButton\n```",
|
|
255
|
-
"```tsx\nconst data = [\n { month: \"January\", desktop: 186, mobile: 80 },\n { month: \"February\", desktop: 305, mobile: 200 },\n { month: \"March\", desktop: 237, mobile: 120 },\n];\n\n<BarChart.Root data={data} xKey=\"month\" aria-label=\"Visitors by month\">\n <BarChart.Grid />\n <BarChart.XAxis />\n <BarChart.YAxis />\n <BarChart.Bar dataKey=\"desktop\" label=\"Desktop\" />\n <BarChart.Bar dataKey=\"mobile\" label=\"Mobile\" />\n <BarChart.Tooltip />\n <BarChart.Legend />\n</BarChart.Root>\n```"
|
|
411
|
+
"Composition:\n```\nBarChart.Root\n├── BarChart.Grid\n├── BarChart.XAxis\n├── BarChart.YAxis\n├── BarChart.Bar (one per series)\n├── BarChart.ReferenceLine\n├── BarChart.Tooltip\n├── BarChart.Legend\n└── BarChart.CopyButton\n```\n\nA List groups Roots:\n```\nBarChart.List\n└── BarChart.Root (one per chart)\n```",
|
|
412
|
+
"```tsx\nconst data = [\n { month: \"January\", desktop: 186, mobile: 80 },\n { month: \"February\", desktop: 305, mobile: 200 },\n { month: \"March\", desktop: 237, mobile: 120 },\n];\n\n<BarChart.Root data={data} xKey=\"month\" aria-label=\"Visitors by month\">\n <BarChart.Grid />\n <BarChart.XAxis />\n <BarChart.YAxis />\n <BarChart.Bar dataKey=\"desktop\" label=\"Desktop\" color=\"blue\" />\n <BarChart.Bar dataKey=\"mobile\" label=\"Mobile\" color=\"emerald\" />\n <BarChart.Tooltip />\n <BarChart.Legend />\n</BarChart.Root>\n```"
|
|
413
|
+
],
|
|
414
|
+
"siblings": [
|
|
415
|
+
{
|
|
416
|
+
"name": "LineChart",
|
|
417
|
+
"boundary": "the chart shows a trend across an ordered x axis, such as time."
|
|
418
|
+
},
|
|
419
|
+
{
|
|
420
|
+
"name": "AreaChart",
|
|
421
|
+
"boundary": "a total and its parts change across an ordered x axis, such as time."
|
|
422
|
+
}
|
|
423
|
+
],
|
|
424
|
+
"useWhen": "Compare values across categories, with grouped or stacked bars.",
|
|
425
|
+
"aliases": [
|
|
426
|
+
"sparkline",
|
|
427
|
+
"bar graph",
|
|
428
|
+
"column chart",
|
|
429
|
+
"histogram"
|
|
256
430
|
]
|
|
257
431
|
},
|
|
258
432
|
{
|
|
@@ -265,10 +439,25 @@
|
|
|
265
439
|
"docsUrl": "https://mantle.ngrok.com/components/navigation/breadcrumb",
|
|
266
440
|
"markdownUrl": "https://mantle.ngrok.com/components/navigation/breadcrumb.md",
|
|
267
441
|
"summary": "Hierarchy-path navigation, an ordered list of links from a root to the current page, in a labeled nav landmark.",
|
|
268
|
-
"jsdoc": "Compound component for WAI-ARIA breadcrumb navigation
|
|
442
|
+
"jsdoc": "Compound component for WAI-ARIA breadcrumb navigation: the path from a root to the current page as an ordered list of links inside a labeled `<nav>` landmark.",
|
|
269
443
|
"examples": [
|
|
270
444
|
"Composition:\n```\nBreadcrumb.Root\n└── Breadcrumb.List\n ├── Breadcrumb.Item\n │ └── Breadcrumb.Link\n ├── Breadcrumb.Separator\n ├── Breadcrumb.Item\n │ └── Breadcrumb.Label\n ├── Breadcrumb.Separator\n ├── Breadcrumb.Item\n │ └── Breadcrumb.Page\n └── Breadcrumb.Skeleton\n```",
|
|
271
445
|
"```tsx\n<Breadcrumb.Root>\n\t<Breadcrumb.List>\n\t\t<Breadcrumb.Item>\n\t\t\t<Breadcrumb.Link href=\"/\">Home</Breadcrumb.Link>\n\t\t</Breadcrumb.Item>\n\t\t<Breadcrumb.Separator />\n\t\t<Breadcrumb.Item>\n\t\t\t<Breadcrumb.Link href=\"/endpoints\">Endpoints</Breadcrumb.Link>\n\t\t</Breadcrumb.Item>\n\t\t<Breadcrumb.Separator />\n\t\t<Breadcrumb.Item>\n\t\t\t<Breadcrumb.Page>ep_2h8…</Breadcrumb.Page>\n\t\t</Breadcrumb.Item>\n\t</Breadcrumb.List>\n</Breadcrumb.Root>\n```"
|
|
446
|
+
],
|
|
447
|
+
"siblings": [
|
|
448
|
+
{
|
|
449
|
+
"name": "Tabs",
|
|
450
|
+
"boundary": "the user switches between peer views of one page."
|
|
451
|
+
},
|
|
452
|
+
{
|
|
453
|
+
"name": "Sidebar",
|
|
454
|
+
"boundary": "the app needs persistent navigation to its top-level pages."
|
|
455
|
+
}
|
|
456
|
+
],
|
|
457
|
+
"useWhen": "Show where the current page sits in a hierarchy, as a trail of links from a root page.",
|
|
458
|
+
"aliases": [
|
|
459
|
+
"breadcrumbs",
|
|
460
|
+
"crumbs"
|
|
272
461
|
]
|
|
273
462
|
},
|
|
274
463
|
{
|
|
@@ -284,6 +473,11 @@
|
|
|
284
473
|
"jsdoc": "A wrapper component that renders its children in the browser only, after hydration completes.",
|
|
285
474
|
"examples": [
|
|
286
475
|
"```tsx\n<BrowserOnly fallback={<div style={{ height: 200 }} />} >\n {() => <ExpensiveChart />}\n</BrowserOnly>\n```"
|
|
476
|
+
],
|
|
477
|
+
"useWhen": "Render children in the browser only, after hydration, when they read browser state such as `window` or `localStorage`.",
|
|
478
|
+
"aliases": [
|
|
479
|
+
"client only",
|
|
480
|
+
"no ssr"
|
|
287
481
|
]
|
|
288
482
|
},
|
|
289
483
|
{
|
|
@@ -298,12 +492,31 @@
|
|
|
298
492
|
"summary": "Initiates an action, such as completing a task or submitting information.",
|
|
299
493
|
"jsdoc": "Renders a button or a component that looks like a button, an interactive element activated by a user with a mouse, keyboard, finger, voice command, or other assistive technology.",
|
|
300
494
|
"examples": [
|
|
301
|
-
"The default primary action
|
|
302
|
-
"Submit a form
|
|
495
|
+
"The default primary action (filled + neutral):\n```tsx\n<Button appearance=\"filled\" intent=\"neutral\" onClick={handleClick}>\n Click me\n</Button>\n```",
|
|
496
|
+
"Submit a form. Opt in with `type=\"submit\"` (the default `\"button\"` does not submit):\n```tsx\n<Button type=\"submit\" appearance=\"filled\" intent=\"neutral\">\n Save\n</Button>\n```",
|
|
303
497
|
"Pass the icon through `icon`, never as a child:\n```tsx\n// ❌ <Button appearance=\"filled\" intent=\"neutral\"><PlusIcon />Create endpoint</Button>\n<Button appearance=\"filled\" intent=\"neutral\" icon={<PlusIcon />}>\n Create endpoint\n</Button>\n```",
|
|
304
498
|
"Gate the button on readiness and on a pending action. An explicit `disabled`\nwins over `isLoading`, so `disabled` must cover both:\n```tsx\n<Button\n type=\"submit\"\n appearance=\"filled\"\n intent=\"neutral\"\n isLoading={isPending}\n disabled={!isReady || isPending}\n>\n Save\n</Button>\n```",
|
|
305
499
|
"A button-styled link wraps a plain `<a>`, not `Anchor`:\n```tsx\n<Button asChild appearance=\"outlined\" intent=\"neutral\" icon={<ArrowSquareOutIcon />} iconPlacement=\"end\">\n <a href=\"https://ngrok.com/docs\" target=\"_blank\" rel=\"noreferrer\">\n Read the docs\n </a>\n</Button>\n```",
|
|
306
|
-
"Icon-only buttons are not `Button`s
|
|
500
|
+
"Icon-only buttons are not `Button`s. Use `IconButton` instead (an icon-only\n`Button` has no accessible name and keeps its text-box padding):\n```tsx\n// ❌ <Button appearance=\"outlined\" intent=\"neutral\" icon={<CopyIcon />} onClick={copyPage} />\n<IconButton appearance=\"outlined\" intent=\"neutral\" icon={<CopyIcon />} label=\"Copy page\" onClick={copyPage} />\n```"
|
|
501
|
+
],
|
|
502
|
+
"siblings": [
|
|
503
|
+
{
|
|
504
|
+
"name": "IconButton",
|
|
505
|
+
"boundary": "the button shows one icon and no text."
|
|
506
|
+
},
|
|
507
|
+
{
|
|
508
|
+
"name": "SplitButton",
|
|
509
|
+
"boundary": "a default action sits beside a menu of related actions."
|
|
510
|
+
},
|
|
511
|
+
{
|
|
512
|
+
"name": "Anchor",
|
|
513
|
+
"boundary": "the control goes to another address and runs no action."
|
|
514
|
+
}
|
|
515
|
+
],
|
|
516
|
+
"useWhen": "Run an action on a click: submit a form, save a change, or open a dialog.",
|
|
517
|
+
"aliases": [
|
|
518
|
+
"cta",
|
|
519
|
+
"call to action"
|
|
307
520
|
]
|
|
308
521
|
},
|
|
309
522
|
{
|
|
@@ -319,6 +532,12 @@
|
|
|
319
532
|
"jsdoc": "A calendar component that allows users to select a date or a range of dates.",
|
|
320
533
|
"examples": [
|
|
321
534
|
"```tsx\n<Calendar\n mode=\"single\"\n selected={selectedDate}\n onSelect={setSelectedDate}\n/>\n\n<Calendar\n mode=\"range\"\n selected={dateRange}\n onSelect={setDateRange}\n/>\n```"
|
|
535
|
+
],
|
|
536
|
+
"useWhen": "Pick one date or a range of dates from a month grid.",
|
|
537
|
+
"aliases": [
|
|
538
|
+
"date picker",
|
|
539
|
+
"datepicker",
|
|
540
|
+
"date range picker"
|
|
322
541
|
]
|
|
323
542
|
},
|
|
324
543
|
{
|
|
@@ -350,7 +569,12 @@
|
|
|
350
569
|
"boundary": "an icon or a figure sits beside a block of text, with no border."
|
|
351
570
|
}
|
|
352
571
|
],
|
|
353
|
-
"useWhen": "Group related content in a raised box, with an optional header and footer."
|
|
572
|
+
"useWhen": "Group related content in a raised box, with an optional header and footer.",
|
|
573
|
+
"aliases": [
|
|
574
|
+
"panel",
|
|
575
|
+
"tile",
|
|
576
|
+
"paper"
|
|
577
|
+
]
|
|
354
578
|
},
|
|
355
579
|
{
|
|
356
580
|
"name": "Centered Layout",
|
|
@@ -365,6 +589,18 @@
|
|
|
365
589
|
"examples": [
|
|
366
590
|
"Composition:\n```\nCenteredLayout.Root\n├── CenteredLayout.Notice\n├── CenteredLayout.Header\n├── CenteredLayout.Body\n└── CenteredLayout.Footer\n```",
|
|
367
591
|
"```tsx\n<CenteredLayout.Root>\n <SkipToMainLink />\n <CenteredLayout.Body>\n <a href=\"https://ngrok.com\">\n <NgrokWordmarkIcon className=\"h-auto w-24\" />\n </a>\n <Main>\n <SignInCard />\n </Main>\n </CenteredLayout.Body>\n <CenteredLayout.Footer>\n <ThemeSwitcher />\n </CenteredLayout.Footer>\n</CenteredLayout.Root>\n```"
|
|
592
|
+
],
|
|
593
|
+
"siblings": [
|
|
594
|
+
{
|
|
595
|
+
"name": "AppLayout",
|
|
596
|
+
"boundary": "the page sits in a signed-in app, with a sidebar and a header that persist across routes."
|
|
597
|
+
}
|
|
598
|
+
],
|
|
599
|
+
"useWhen": "Center one focused full-page flow, such as sign-in, sign-up, onboarding, checkout, or a 404 page.",
|
|
600
|
+
"aliases": [
|
|
601
|
+
"auth page",
|
|
602
|
+
"login page",
|
|
603
|
+
"sign in page"
|
|
368
604
|
]
|
|
369
605
|
},
|
|
370
606
|
{
|
|
@@ -376,10 +612,29 @@
|
|
|
376
612
|
"importPath": "@ngrok/mantle/checkbox",
|
|
377
613
|
"docsUrl": "https://mantle.ngrok.com/components/forms/checkbox",
|
|
378
614
|
"markdownUrl": "https://mantle.ngrok.com/components/forms/checkbox.md",
|
|
379
|
-
"summary": "A form control that
|
|
615
|
+
"summary": "A form control that toggles between checked and not checked, with an indeterminate state.",
|
|
380
616
|
"jsdoc": "A form control that allows the user to toggle between checked and not checked.",
|
|
381
617
|
"examples": [
|
|
382
618
|
"```tsx\n<form>\n <Label htmlFor=\"terms\" className=\"flex items-center gap-2\">\n <Checkbox name=\"terms\" id=\"terms\" />\n Accept terms and conditions\n </Label>\n</form>\n```"
|
|
619
|
+
],
|
|
620
|
+
"siblings": [
|
|
621
|
+
{
|
|
622
|
+
"name": "Switch",
|
|
623
|
+
"boundary": "one setting turns on or off and needs no indeterminate state."
|
|
624
|
+
},
|
|
625
|
+
{
|
|
626
|
+
"name": "RadioGroup",
|
|
627
|
+
"boundary": "the user picks exactly one option from a set."
|
|
628
|
+
},
|
|
629
|
+
{
|
|
630
|
+
"name": "Choice",
|
|
631
|
+
"boundary": "the checkbox needs a title and a description beside it."
|
|
632
|
+
}
|
|
633
|
+
],
|
|
634
|
+
"useWhen": "Turn one or more independent options on or off in a form, with an indeterminate state for a partial selection.",
|
|
635
|
+
"aliases": [
|
|
636
|
+
"check box",
|
|
637
|
+
"tickbox"
|
|
383
638
|
]
|
|
384
639
|
},
|
|
385
640
|
{
|
|
@@ -394,8 +649,24 @@
|
|
|
394
649
|
"summary": "A reusable indicator-left / content-right layout for a single choice (a control beside a titled, multi-line label).",
|
|
395
650
|
"jsdoc": "A reusable indicator-left / content-right layout for a single choice: a control (checkbox, radio, switch) beside an emphasized title and an optional de-emphasized description.",
|
|
396
651
|
"examples": [
|
|
397
|
-
"Composition:\n```\nChoice.Root\n├── Choice.Indicator\n└── Choice.Content\n ├── Choice.Label (or Choice.Title
|
|
652
|
+
"Composition:\n```\nChoice.Root\n├── Choice.Indicator\n└── Choice.Content\n ├── Choice.Label (or Choice.Title, pick one)\n └── Choice.Description\n```",
|
|
398
653
|
"```tsx\n<Choice.Root name=\"notify\">\n <Choice.Indicator>\n <Checkbox />\n </Choice.Indicator>\n <Choice.Content>\n <Choice.Label>Email</Choice.Label>\n <Choice.Description>Get notified by email.</Choice.Description>\n </Choice.Content>\n</Choice.Root>\n```"
|
|
654
|
+
],
|
|
655
|
+
"siblings": [
|
|
656
|
+
{
|
|
657
|
+
"name": "Label",
|
|
658
|
+
"boundary": "the control needs only a one-line caption."
|
|
659
|
+
},
|
|
660
|
+
{
|
|
661
|
+
"name": "MediaObject",
|
|
662
|
+
"boundary": "the thing beside the text is an image or an icon, not a control."
|
|
663
|
+
}
|
|
664
|
+
],
|
|
665
|
+
"useWhen": "Put a checkbox, a radio, or a switch beside a title and an optional description.",
|
|
666
|
+
"aliases": [
|
|
667
|
+
"checkbox with description",
|
|
668
|
+
"radio with description",
|
|
669
|
+
"switch with description"
|
|
399
670
|
]
|
|
400
671
|
},
|
|
401
672
|
{
|
|
@@ -407,10 +678,29 @@
|
|
|
407
678
|
"importPath": "@ngrok/mantle/code",
|
|
408
679
|
"docsUrl": "https://mantle.ngrok.com/components/data-display/code",
|
|
409
680
|
"markdownUrl": "https://mantle.ngrok.com/components/data-display/code.md",
|
|
410
|
-
"summary": "Marks a short fragment of inline computer code
|
|
411
|
-
"jsdoc": "Marks a short fragment of inline computer code
|
|
681
|
+
"summary": "Marks a short fragment of inline computer code, such as a function name, a variable, a CLI flag, or a key.",
|
|
682
|
+
"jsdoc": "Marks a short fragment of inline computer code: a function name, a variable, a CLI flag, a key.",
|
|
412
683
|
"examples": [
|
|
413
684
|
"```tsx\nimport { Code } from \"@ngrok/mantle/code\";\n\n<p>\n Use the <Code>console.log()</Code> function to debug your code.\n</p>\n\n// As a link, preserving Code styling.\n<Code asChild>\n <a href=\"/api\">/api/components.json</a>\n</Code>\n```"
|
|
685
|
+
],
|
|
686
|
+
"siblings": [
|
|
687
|
+
{
|
|
688
|
+
"name": "CodeBlock",
|
|
689
|
+
"boundary": "the code spans several lines or needs syntax highlighting."
|
|
690
|
+
},
|
|
691
|
+
{
|
|
692
|
+
"name": "Kbd",
|
|
693
|
+
"boundary": "the text is a keyboard key or a shortcut."
|
|
694
|
+
},
|
|
695
|
+
{
|
|
696
|
+
"name": "TruncatedText",
|
|
697
|
+
"boundary": "the value is long and opaque, such as a URL or an ID, and can overflow its row."
|
|
698
|
+
}
|
|
699
|
+
],
|
|
700
|
+
"useWhen": "Mark a short fragment of code inside a sentence, such as a function name, a file path, or a key.",
|
|
701
|
+
"aliases": [
|
|
702
|
+
"inline code",
|
|
703
|
+
"monospace"
|
|
414
704
|
]
|
|
415
705
|
},
|
|
416
706
|
{
|
|
@@ -427,6 +717,22 @@
|
|
|
427
717
|
"examples": [
|
|
428
718
|
"Composition:\n```\n# Standard\nCodeBlock.Root\n├── CodeBlock.Header\n│ ├── CodeBlock.Icon\n│ └── CodeBlock.Title\n├── CodeBlock.Body\n│ ├── CodeBlock.CopyButton\n│ └── CodeBlock.Code\n└── CodeBlock.ExpanderButton\n\n# Tabbed\nCodeBlock.Root\n├── CodeBlock.Header\n│ └── CodeBlock.TabList\n│ └── CodeBlock.TabTrigger\n├── CodeBlock.Body\n│ ├── CodeBlock.CopyButton\n│ └── CodeBlock.TabContent\n│ └── CodeBlock.Code\n└── CodeBlock.ExpanderButton\n```",
|
|
429
719
|
"```tsx\n<CodeBlock.Root>\n <CodeBlock.Header>\n <CodeBlock.Icon preset=\"file\" />\n <CodeBlock.Title>example.ts</CodeBlock.Title>\n </CodeBlock.Header>\n <CodeBlock.Body>\n <CodeBlock.CopyButton />\n <CodeBlock.Code value={mantleCode(\"typescript\")`const x = \"hello\";`} />\n </CodeBlock.Body>\n <CodeBlock.ExpanderButton />\n</CodeBlock.Root>\n\n// Server-highlighted HTML fetched via an action route + React Query mutation\nconst highlightMutation = useMutation({\n mutationFn: async () => {\n const response = await fetch(\"/api/shiki-highlight\", {\n method: \"POST\",\n headers: { \"Content-Type\": \"application/json\" },\n body: JSON.stringify({ code: source, language: \"typescript\" }),\n });\n return response.json();\n },\n});\n\nconst serverValue = createMantleCodeBlockValue({\n language: \"typescript\",\n code: source,\n preHtml: highlightMutation.data?.html,\n});\n```"
|
|
720
|
+
],
|
|
721
|
+
"siblings": [
|
|
722
|
+
{
|
|
723
|
+
"name": "Code",
|
|
724
|
+
"boundary": "the code is a short fragment inside a sentence."
|
|
725
|
+
},
|
|
726
|
+
{
|
|
727
|
+
"name": "TruncatedText",
|
|
728
|
+
"boundary": "one long opaque value must stay on one line."
|
|
729
|
+
}
|
|
730
|
+
],
|
|
731
|
+
"useWhen": "Show a block of code with syntax highlighting and a copy button.",
|
|
732
|
+
"aliases": [
|
|
733
|
+
"syntax highlighter",
|
|
734
|
+
"code snippet",
|
|
735
|
+
"code sample"
|
|
430
736
|
]
|
|
431
737
|
},
|
|
432
738
|
{
|
|
@@ -438,15 +744,36 @@
|
|
|
438
744
|
"importPath": "@ngrok/mantle/combobox",
|
|
439
745
|
"docsUrl": "https://mantle.ngrok.com/components/forms/combobox",
|
|
440
746
|
"markdownUrl": "https://mantle.ngrok.com/components/forms/combobox.md",
|
|
441
|
-
"summary": "
|
|
747
|
+
"summary": "A text input with autocomplete: the user types to filter a list of suggested values and picks one, with full keyboard support.",
|
|
442
748
|
"jsdoc": "Fill in a React input field with autocomplete & autosuggest functionalities.",
|
|
443
749
|
"examples": [
|
|
444
750
|
"Composition:\n```\nCombobox.Root\n├── Combobox.Input\n└── Combobox.Content\n ├── Combobox.Group\n │ ├── Combobox.GroupLabel\n │ └── Combobox.Item\n │ └── Combobox.ItemValue\n └── Combobox.Separator\n```",
|
|
445
751
|
"```tsx\n<Combobox.Root>\n <Combobox.Input />\n <Combobox.Content>\n <Combobox.Item value=\"Apple\" />\n <Combobox.Item value=\"Banana\" />\n </Combobox.Content>\n</Combobox.Root>\n```"
|
|
446
752
|
],
|
|
753
|
+
"siblings": [
|
|
754
|
+
{
|
|
755
|
+
"name": "Select",
|
|
756
|
+
"boundary": "the list is short and needs no filter."
|
|
757
|
+
},
|
|
758
|
+
{
|
|
759
|
+
"name": "MultiSelect",
|
|
760
|
+
"boundary": "the user picks several values, shown as tags."
|
|
761
|
+
},
|
|
762
|
+
{
|
|
763
|
+
"name": "Command",
|
|
764
|
+
"boundary": "the list runs actions or goes to pages, in a palette."
|
|
765
|
+
},
|
|
766
|
+
{
|
|
767
|
+
"name": "Query",
|
|
768
|
+
"boundary": "the field filters a list with free text and `key:value` qualifiers."
|
|
769
|
+
}
|
|
770
|
+
],
|
|
771
|
+
"useWhen": "Pick one value from a long list of options, with a text field that filters the options as the user types.",
|
|
447
772
|
"aliases": [
|
|
448
773
|
"autocomplete",
|
|
449
|
-
"typeahead"
|
|
774
|
+
"typeahead",
|
|
775
|
+
"searchable select",
|
|
776
|
+
"autosuggest"
|
|
450
777
|
]
|
|
451
778
|
},
|
|
452
779
|
{
|
|
@@ -458,11 +785,28 @@
|
|
|
458
785
|
"importPath": "@ngrok/mantle/command",
|
|
459
786
|
"docsUrl": "https://mantle.ngrok.com/components/navigation/command",
|
|
460
787
|
"markdownUrl": "https://mantle.ngrok.com/components/navigation/command.md",
|
|
461
|
-
"summary": "A command palette that allows users to search and execute commands.",
|
|
788
|
+
"summary": "A command palette that allows users to search and execute commands, built on top of cmdk.",
|
|
462
789
|
"jsdoc": "A command palette: a modal search field over a filtered, keyboard-navigable list of items. `Command.SearchTrigger` is the field-shaped button that opens it, `Command.DialogRoot` owns the open state, the query, and the `⌘K` shortcut, and `Command.DialogTrigger` is the escape hatch for a trigger of your own.",
|
|
463
790
|
"examples": [
|
|
464
791
|
"Composition:\n```\nCommand.DialogRoot\n├── Command.SearchTrigger\n├── Command.DialogTrigger\n└── Command.DialogContent\n ├── Command.Input\n └── Command.List\n ├── Command.Empty\n ├── Command.Group\n │ └── Command.Item\n │ └── Command.Shortcut\n └── Command.Separator\n```",
|
|
465
792
|
"```tsx\n<Command.DialogRoot>\n <Command.SearchTrigger>\n <button type=\"button\">Search…</button>\n </Command.SearchTrigger>\n <Command.DialogContent>\n <Command.Input placeholder=\"Type a command or search...\" />\n <Command.List>\n <Command.Empty>No results found.</Command.Empty>\n <Command.Group heading=\"Suggestions\">\n <Command.Item>\n <span>Calendar</span>\n </Command.Item>\n </Command.Group>\n <Command.Separator />\n <Command.Group heading=\"Settings\">\n <Command.Item>\n <span>Profile</span>\n <Command.Shortcut>⌘,</Command.Shortcut>\n </Command.Item>\n </Command.Group>\n </Command.List>\n </Command.DialogContent>\n</Command.DialogRoot>\n```"
|
|
793
|
+
],
|
|
794
|
+
"siblings": [
|
|
795
|
+
{
|
|
796
|
+
"name": "Combobox",
|
|
797
|
+
"boundary": "the text field filters options in place and sets a form value."
|
|
798
|
+
},
|
|
799
|
+
{
|
|
800
|
+
"name": "DropdownMenu",
|
|
801
|
+
"boundary": "a short list of actions opens from one button."
|
|
802
|
+
}
|
|
803
|
+
],
|
|
804
|
+
"useWhen": "Search for an action or a page and run it from a keyboard-first palette, such as a `⌘K` menu.",
|
|
805
|
+
"aliases": [
|
|
806
|
+
"command palette",
|
|
807
|
+
"command menu",
|
|
808
|
+
"cmdk",
|
|
809
|
+
"spotlight"
|
|
466
810
|
]
|
|
467
811
|
},
|
|
468
812
|
{
|
|
@@ -475,13 +819,30 @@
|
|
|
475
819
|
"docsUrl": "https://mantle.ngrok.com/components/data-display/data-table",
|
|
476
820
|
"markdownUrl": "https://mantle.ngrok.com/components/data-display/data-table.md",
|
|
477
821
|
"summary": "Tables purposefully designed for dynamic, application data with features like sorting, filtering, and pagination.",
|
|
478
|
-
"jsdoc": "Use `DataTable` for INTERACTIVE tabular data
|
|
822
|
+
"jsdoc": "Use `DataTable` for INTERACTIVE tabular data: sorting, filtering, pagination, row selection, and server-side or client-side data.",
|
|
479
823
|
"examples": [
|
|
480
824
|
"Composition:\n```\nDataTable.Root\n├── DataTable.Head\n│ └── DataTable.Row\n│ ├── DataTable.ExpandHeader\n│ ├── DataTable.Header\n│ │ └── DataTable.HeaderSortButton\n│ └── DataTable.ActionHeader\n└── DataTable.Body\n ├── DataTable.Row\n │ ├── DataTable.ControlCell\n │ │ └── DataTable.RowExpandButton\n │ ├── DataTable.Cell\n │ └── DataTable.ActionCell\n ├── DataTable.ExpandedRow\n └── DataTable.EmptyRow\n```",
|
|
481
|
-
"
|
|
482
|
-
"Sortable, filterable, paginated, with both empty states
|
|
483
|
-
"Row action column
|
|
825
|
+
"A minimal, read-only table with a single sortable column:\n```tsx\nimport {\n DataTable,\n createColumnHelper,\n createSortedRowModel,\n rowSortingFeature,\n sortFn_alphanumeric,\n sortFn_datetime,\n sortFn_text,\n tableFeatures,\n useTable,\n} from \"@ngrok/mantle/data-table\";\n\ntype Row = { id: string; name: string };\n\n// Register only the features the table uses. Auto-sort resolves the\n// `alphanumeric`, `text`, and `datetime` comparators by name, so register those three.\nconst features = tableFeatures({\n rowSortingFeature,\n sortedRowModel: createSortedRowModel(),\n sortFns: {\n alphanumeric: sortFn_alphanumeric,\n datetime: sortFn_datetime,\n text: sortFn_text,\n },\n});\n\nconst columnHelper = createColumnHelper<typeof features, Row>();\nconst columns = columnHelper.columns([\n columnHelper.accessor(\"name\", {\n id: \"name\",\n header: (props) => (\n <DataTable.Header column={props.column}>\n <DataTable.HeaderSortButton column={props.column} sortingMode=\"alphanumeric\">\n Name\n </DataTable.HeaderSortButton>\n </DataTable.Header>\n ),\n cell: (props) => <DataTable.Cell>{props.getValue()}</DataTable.Cell>,\n }),\n]);\n\nfunction MyTable({ data }: { data: Row[] }) {\n const table = useTable({ features, data, columns });\n const rows = table.getRowModel().rows;\n\n return (\n <DataTable.Root table={table}>\n <DataTable.Head />\n <DataTable.Body>\n {rows.length > 0\n ? rows.map((row) => <DataTable.Row key={row.id} row={row} />)\n : <DataTable.EmptyRow>No results.</DataTable.EmptyRow>}\n </DataTable.Body>\n </DataTable.Root>\n );\n}\n```",
|
|
826
|
+
"Sortable, filterable, paginated, with both empty states: a global text\nfilter, the no-data vs. no-results-for-filter empty states (an `Empty`\ndropped into `DataTable.EmptyRow`), and `CursorPagination` with a page-size\ndropdown:\n```tsx\nimport {\n DataTable,\n columnFilteringFeature,\n createColumnHelper,\n createFilteredRowModel,\n createPaginatedRowModel,\n createSortedRowModel,\n globalFilteringFeature,\n rowPaginationFeature,\n rowSortingFeature,\n sortFn_alphanumeric,\n sortFn_datetime,\n sortFn_text,\n tableFeatures,\n useTable,\n} from \"@ngrok/mantle/data-table\";\nimport { Button } from \"@ngrok/mantle/button\";\nimport { CursorPagination, PaginationRange } from \"@ngrok/mantle/pagination\";\nimport { Empty } from \"@ngrok/mantle/empty\";\nimport { Input } from \"@ngrok/mantle/input\";\nimport { MagnifyingGlassIcon } from \"@phosphor-icons/react/MagnifyingGlass\";\nimport { TrayIcon } from \"@phosphor-icons/react/Tray\";\nimport { useState } from \"react\";\n\ntype Payment = { id: string; amount: number; status: \"pending\" | \"succeeded\" | \"failed\"; email: string };\n\n// The table's initial page size. It must be one of PageSizeSelect's pageSizes\n// (default 5 | 10 | 20 | 50 | 100).\nconst DEFAULT_PAGE_SIZE = 10;\n\n// `globalFilteringFeature` builds on `columnFilteringFeature`, so register both.\nconst features = tableFeatures({\n columnFilteringFeature,\n globalFilteringFeature,\n rowPaginationFeature,\n rowSortingFeature,\n filteredRowModel: createFilteredRowModel(),\n paginatedRowModel: createPaginatedRowModel(),\n sortedRowModel: createSortedRowModel(),\n sortFns: {\n alphanumeric: sortFn_alphanumeric,\n datetime: sortFn_datetime,\n text: sortFn_text,\n },\n});\n\nconst columnHelper = createColumnHelper<typeof features, Payment>();\nconst columns = columnHelper.columns([\n columnHelper.accessor(\"status\", {\n id: \"status\",\n header: (props) => (\n <DataTable.Header column={props.column}>\n <DataTable.HeaderSortButton column={props.column} sortingMode=\"alphanumeric\">\n Status\n </DataTable.HeaderSortButton>\n </DataTable.Header>\n ),\n cell: (props) => <DataTable.Cell>{props.getValue()}</DataTable.Cell>,\n }),\n columnHelper.accessor(\"email\", {\n id: \"email\",\n header: (props) => (\n <DataTable.Header column={props.column}>\n <DataTable.HeaderSortButton column={props.column} sortingMode=\"alphanumeric\">\n Email\n </DataTable.HeaderSortButton>\n </DataTable.Header>\n ),\n cell: (props) => <DataTable.Cell>{props.getValue()}</DataTable.Cell>,\n }),\n columnHelper.accessor(\"amount\", {\n id: \"amount\",\n header: (props) => (\n <DataTable.Header className=\"text-right\">\n <DataTable.HeaderSortButton\n column={props.column}\n sortingMode=\"alphanumeric\"\n className=\"justify-end\"\n iconPlacement=\"start\"\n >\n Amount\n </DataTable.HeaderSortButton>\n </DataTable.Header>\n ),\n cell: (props) => (\n <DataTable.Cell className=\"text-right tabular-nums\">\n {new Intl.NumberFormat(\"en-US\", { style: \"currency\", currency: \"USD\" }).format(props.getValue())}\n </DataTable.Cell>\n ),\n }),\n]);\n\nfunction PaymentsTable({ data }: { data: Payment[] }) {\n const [globalFilter, setGlobalFilter] = useState(\"\");\n\n const table = useTable({\n features,\n data,\n columns,\n state: { globalFilter },\n onGlobalFilterChange: setGlobalFilter,\n initialState: { pagination: { pageIndex: 0, pageSize: DEFAULT_PAGE_SIZE } },\n });\n const rows = table.getRowModel().rows;\n const isFiltered = globalFilter.trim() !== \"\";\n\n return (\n <div className=\"space-y-4\">\n <Input\n placeholder=\"Filter payments…\"\n value={globalFilter}\n onChange={(event) => setGlobalFilter(event.target.value)}\n />\n <DataTable.Root table={table}>\n <DataTable.Head />\n <DataTable.Body>\n {rows.length > 0 ? (\n rows.map((row) => <DataTable.Row key={row.id} row={row} />)\n ) : isFiltered ? (\n // No results for the active filter: give the user a way out.\n <DataTable.EmptyRow>\n <Empty.Root>\n <Empty.Icon svg={<MagnifyingGlassIcon />} />\n <Empty.Title>No payments match your filter</Empty.Title>\n <Empty.Description>\n <p>Try a different search, or clear the filter to see everything.</p>\n </Empty.Description>\n <Empty.Actions>\n <Button\n type=\"button\"\n appearance=\"outlined\"\n intent=\"neutral\"\n onClick={() => setGlobalFilter(\"\")}\n >\n Clear filters\n </Button>\n </Empty.Actions>\n </Empty.Root>\n </DataTable.EmptyRow>\n ) : (\n // No data yet: informational, optionally a primary \"create\" action.\n <DataTable.EmptyRow>\n <Empty.Root>\n <Empty.Icon svg={<TrayIcon />} />\n <Empty.Title>No payments yet</Empty.Title>\n <Empty.Description>\n <p>Payments you receive will appear here.</p>\n </Empty.Description>\n </Empty.Root>\n </DataTable.EmptyRow>\n )}\n </DataTable.Body>\n </DataTable.Root>\n <CursorPagination.Root\n className=\"flex flex-wrap justify-between\"\n pageSize={table.state.pagination.pageSize}\n onChangePageSize={(size) => {\n table.setPageSize(size);\n table.setPageIndex(0); // reset to the first page when the size changes\n }}\n >\n <PaginationRange\n offset={table.state.pagination.pageIndex * table.state.pagination.pageSize}\n pageSize={table.state.pagination.pageSize}\n total={table.getRowCount()}\n noun={{ singular: \"payment\", plural: \"payments\" }}\n />\n <div className=\"flex items-center gap-2\">\n <CursorPagination.PageSizeSelect />\n <CursorPagination.Buttons\n hasPreviousPage={table.getCanPreviousPage()}\n hasNextPage={table.getCanNextPage()}\n onPreviousPage={() => table.previousPage()}\n onNextPage={() => table.nextPage()}\n />\n </div>\n </CursorPagination.Root>\n </div>\n );\n}\n```",
|
|
827
|
+
"Row action column: a sticky right-edge cell with a dropdown menu of actions.\nThe cell stops its own clicks, so the menu opens without a clickable row\nnavigating:\n```tsx\nimport { DataTable, createColumnHelper } from \"@ngrok/mantle/data-table\";\nimport { DropdownMenu } from \"@ngrok/mantle/dropdown-menu\";\nimport { IconButton } from \"@ngrok/mantle/button\";\nimport { DotsThreeVerticalIcon } from \"@phosphor-icons/react/DotsThreeVertical\";\n\nconst columnHelper = createColumnHelper<typeof features, Payment>();\n\nconst columns = columnHelper.columns([\n // …other columns…\n columnHelper.display({\n id: \"actions\",\n header: () => <DataTable.ActionHeader />,\n cell: (props) => (\n <DataTable.ActionCell>\n <DropdownMenu.Root>\n <DropdownMenu.Trigger asChild>\n <IconButton type=\"button\" appearance=\"outlined\" intent=\"neutral\" label=\"Actions\" icon={<DotsThreeVerticalIcon />} />\n </DropdownMenu.Trigger>\n <DropdownMenu.Content align=\"end\">\n <DropdownMenu.Item onSelect={() => copy(props.row.original.id)}>\n Copy ID\n </DropdownMenu.Item>\n <DropdownMenu.Item onSelect={() => refund(props.row.original.id)}>\n Refund\n </DropdownMenu.Item>\n </DropdownMenu.Content>\n </DropdownMenu.Root>\n </DataTable.ActionCell>\n ),\n }),\n]);\n```",
|
|
484
828
|
"Clickable row navigating to a detail page. A `<tr>` is not focusable, so the\nprimary cell also renders a `<Link>` as the keyboard and screen-reader path.\n`SandboxedOnClick` keeps the link's click from also running the row handler:\n```tsx\nimport { DataTable, useTable } from \"@ngrok/mantle/data-table\";\nimport { SandboxedOnClick } from \"@ngrok/mantle/sandboxed-on-click\";\nimport { Link, href, useNavigate } from \"react-router\";\n\nfunction PaymentsTable({ data }: { data: Payment[] }) {\n const navigate = useNavigate();\n const table = useTable({ features, data, columns });\n const rows = table.getRowModel().rows;\n\n return (\n <DataTable.Root table={table}>\n <DataTable.Head />\n <DataTable.Body>\n {rows.map((row) => (\n <DataTable.Row\n key={row.id}\n row={row}\n onClick={() => navigate(href(\"/payments/:id\", { id: row.original.id }))}\n />\n ))}\n </DataTable.Body>\n </DataTable.Root>\n );\n}\n\n// The primary column's cell renders a <Link> for keyboard / a11y reachability.\ncolumnHelper.accessor(\"email\", {\n id: \"email\",\n header: (props) => <DataTable.Header>Email</DataTable.Header>,\n cell: (props) => (\n <DataTable.Cell>\n <SandboxedOnClick asChild allowClickEventDefault>\n <Link to={href(\"/payments/:id\", { id: props.row.original.id })}>\n {props.getValue()}\n </Link>\n </SandboxedOnClick>\n </DataTable.Cell>\n ),\n});\n```"
|
|
829
|
+
],
|
|
830
|
+
"siblings": [
|
|
831
|
+
{
|
|
832
|
+
"name": "Table",
|
|
833
|
+
"boundary": "the data is static, with no sorting, filtering, pagination, or selection."
|
|
834
|
+
},
|
|
835
|
+
{
|
|
836
|
+
"name": "DescriptionList",
|
|
837
|
+
"boundary": "one record shows as label and value pairs."
|
|
838
|
+
}
|
|
839
|
+
],
|
|
840
|
+
"useWhen": "Show rows of application data that the user sorts, filters, pages through, or selects.",
|
|
841
|
+
"aliases": [
|
|
842
|
+
"data grid",
|
|
843
|
+
"datagrid",
|
|
844
|
+
"grid",
|
|
845
|
+
"sortable table"
|
|
485
846
|
]
|
|
486
847
|
},
|
|
487
848
|
{
|
|
@@ -498,6 +859,22 @@
|
|
|
498
859
|
"examples": [
|
|
499
860
|
"Composition:\n```\nDescriptionList.Root\n└── DescriptionList.Item\n ├── DescriptionList.Label\n └── DescriptionList.Value\n```",
|
|
500
861
|
"```tsx\n<DescriptionList.Root>\n <DescriptionList.Item>\n <DescriptionList.Label>Name</DescriptionList.Label>\n <DescriptionList.Value>my-api-key</DescriptionList.Value>\n </DescriptionList.Item>\n <DescriptionList.Item>\n <DescriptionList.Label>ID</DescriptionList.Label>\n <DescriptionList.Value>\n aigk_2fKm9x8Hn3QpYT7zKlR0vW5\n </DescriptionList.Value>\n </DescriptionList.Item>\n</DescriptionList.Root>\n```"
|
|
862
|
+
],
|
|
863
|
+
"siblings": [
|
|
864
|
+
{
|
|
865
|
+
"name": "Table",
|
|
866
|
+
"boundary": "several records share the same columns."
|
|
867
|
+
},
|
|
868
|
+
{
|
|
869
|
+
"name": "Strata",
|
|
870
|
+
"boundary": "the pairs are headed sections of controls, not read-only data."
|
|
871
|
+
}
|
|
872
|
+
],
|
|
873
|
+
"useWhen": "Show the label and value pairs of one resource, such as the metadata on a detail page.",
|
|
874
|
+
"aliases": [
|
|
875
|
+
"key value list",
|
|
876
|
+
"definition list",
|
|
877
|
+
"property list"
|
|
501
878
|
]
|
|
502
879
|
},
|
|
503
880
|
{
|
|
@@ -515,8 +892,24 @@
|
|
|
515
892
|
"Composition:\n```\nDialog.Root\n├── Dialog.Trigger\n└── Dialog.Content\n ├── Dialog.Header\n │ ├── Dialog.Title\n │ ├── Dialog.Description\n │ └── Dialog.CloseIconButton\n ├── Dialog.Body\n └── Dialog.Footer\n └── Dialog.Close\n```",
|
|
516
893
|
"```tsx\n<Dialog.Root>\n <Dialog.Trigger asChild>\n <Button type=\"button\" appearance=\"filled\" intent=\"neutral\">Open Dialog</Button>\n </Dialog.Trigger>\n <Dialog.Content>\n <Dialog.Header>\n <Dialog.Title>Dialog Title</Dialog.Title>\n <Dialog.Description>This is an optional description.</Dialog.Description>\n <Dialog.CloseIconButton />\n </Dialog.Header>\n <Dialog.Body>\n <p>This is the dialog content.</p>\n </Dialog.Body>\n <Dialog.Footer>\n <Dialog.Close asChild>\n <Button type=\"button\" appearance=\"outlined\" intent=\"neutral\">Cancel</Button>\n </Dialog.Close>\n <Button type=\"button\" appearance=\"filled\" intent=\"neutral\">Save</Button>\n </Dialog.Footer>\n </Dialog.Content>\n</Dialog.Root>\n```"
|
|
517
894
|
],
|
|
895
|
+
"siblings": [
|
|
896
|
+
{
|
|
897
|
+
"name": "AlertDialog",
|
|
898
|
+
"boundary": "the user must confirm a destructive or irreversible action, such as a delete."
|
|
899
|
+
},
|
|
900
|
+
{
|
|
901
|
+
"name": "Sheet",
|
|
902
|
+
"boundary": "the content slides in from the edge of the screen, such as a filter panel or a detail view."
|
|
903
|
+
},
|
|
904
|
+
{
|
|
905
|
+
"name": "Popover",
|
|
906
|
+
"boundary": "the content is small and opens next to its trigger, with no modal backdrop."
|
|
907
|
+
}
|
|
908
|
+
],
|
|
909
|
+
"useWhen": "Gather input or confirm a choice that is not destructive, in a modal window that blocks the page.",
|
|
518
910
|
"aliases": [
|
|
519
|
-
"modal"
|
|
911
|
+
"modal",
|
|
912
|
+
"modal dialog"
|
|
520
913
|
]
|
|
521
914
|
},
|
|
522
915
|
{
|
|
@@ -533,6 +926,32 @@
|
|
|
533
926
|
"examples": [
|
|
534
927
|
"Composition:\n```\nDropdownMenu.Root\n├── DropdownMenu.Trigger\n└── DropdownMenu.Content\n ├── DropdownMenu.Group\n │ ├── DropdownMenu.Label\n │ ├── DropdownMenu.Item\n │ │ └── DropdownMenu.Shortcut\n │ ├── DropdownMenu.CheckboxItem\n │ └── DropdownMenu.RadioGroup\n │ └── DropdownMenu.RadioItem\n ├── DropdownMenu.Separator\n └── DropdownMenu.Sub\n ├── DropdownMenu.SubTrigger\n └── DropdownMenu.SubContent\n```",
|
|
535
928
|
"```tsx\n<DropdownMenu.Root>\n <DropdownMenu.Trigger asChild>\n <Button type=\"button\" appearance=\"outlined\" intent=\"neutral\">\n Open Menu\n </Button>\n </DropdownMenu.Trigger>\n <DropdownMenu.Content>\n <DropdownMenu.Item>Item 1</DropdownMenu.Item>\n <DropdownMenu.Item>Item 2</DropdownMenu.Item>\n </DropdownMenu.Content>\n</DropdownMenu.Root>\n```"
|
|
929
|
+
],
|
|
930
|
+
"siblings": [
|
|
931
|
+
{
|
|
932
|
+
"name": "Select",
|
|
933
|
+
"boundary": "the user picks one value for a form field."
|
|
934
|
+
},
|
|
935
|
+
{
|
|
936
|
+
"name": "SplitButton",
|
|
937
|
+
"boundary": "a default action runs on one click, and the menu holds its alternatives."
|
|
938
|
+
},
|
|
939
|
+
{
|
|
940
|
+
"name": "Command",
|
|
941
|
+
"boundary": "the user searches many actions or pages from the keyboard."
|
|
942
|
+
},
|
|
943
|
+
{
|
|
944
|
+
"name": "Popover",
|
|
945
|
+
"boundary": "the floating content is a small form or other content, not a menu."
|
|
946
|
+
}
|
|
947
|
+
],
|
|
948
|
+
"useWhen": "Show a menu of actions or options when the user clicks a button.",
|
|
949
|
+
"aliases": [
|
|
950
|
+
"menu",
|
|
951
|
+
"action menu",
|
|
952
|
+
"overflow menu",
|
|
953
|
+
"kebab menu",
|
|
954
|
+
"menu button"
|
|
536
955
|
]
|
|
537
956
|
},
|
|
538
957
|
{
|
|
@@ -567,7 +986,10 @@
|
|
|
567
986
|
"useWhen": "A region has no data, no results, or no access to show.",
|
|
568
987
|
"aliases": [
|
|
569
988
|
"empty state",
|
|
570
|
-
"zero state"
|
|
989
|
+
"zero state",
|
|
990
|
+
"blank slate",
|
|
991
|
+
"no data",
|
|
992
|
+
"no results"
|
|
571
993
|
]
|
|
572
994
|
},
|
|
573
995
|
{
|
|
@@ -584,6 +1006,22 @@
|
|
|
584
1006
|
"examples": [
|
|
585
1007
|
"Composition:\n```\nField.Group\n└── Field.Item\n ├── Field.LabelRow\n │ ├── Field.Label (or Field.LabelText for control-less rows)\n │ │ └── Field.Optional\n │ └── Field.Help\n │ ├── Field.HelpTrigger\n │ └── Field.HelpContent\n ├── Field.Control\n │ └── (control)\n ├── Field.Errors (or)\n ├── Field.ErrorList\n │ └── Field.ErrorItem\n └── Field.Description\n```",
|
|
586
1008
|
"```tsx\n<Field.Group>\n <Field.Item name=\"apiKey\">\n <Field.LabelRow>\n <Field.Label>\n API key <Field.Optional />\n </Field.Label>\n <Field.Help>\n <Field.HelpTrigger label=\"What is an API key?\" />\n <Field.HelpContent>Copy this from the dashboard.</Field.HelpContent>\n </Field.Help>\n </Field.LabelRow>\n <Field.Control>\n <Input />\n </Field.Control>\n <Field.Errors messages={[\"API key is required.\"]} />\n <Field.Description>You can find this in the ngrok dashboard.</Field.Description>\n </Field.Item>\n</Field.Group>\n```"
|
|
1009
|
+
],
|
|
1010
|
+
"siblings": [
|
|
1011
|
+
{
|
|
1012
|
+
"name": "Label",
|
|
1013
|
+
"boundary": "the control needs only a caption, with no description or errors."
|
|
1014
|
+
},
|
|
1015
|
+
{
|
|
1016
|
+
"name": "Choice",
|
|
1017
|
+
"boundary": "a checkbox, a radio, or a switch sits beside a title and a description."
|
|
1018
|
+
}
|
|
1019
|
+
],
|
|
1020
|
+
"useWhen": "Group one form control with its label, its description, and its validation errors.",
|
|
1021
|
+
"aliases": [
|
|
1022
|
+
"form field",
|
|
1023
|
+
"form group",
|
|
1024
|
+
"form item"
|
|
587
1025
|
]
|
|
588
1026
|
},
|
|
589
1027
|
{
|
|
@@ -599,6 +1037,10 @@
|
|
|
599
1037
|
"jsdoc": "Renders a country flag from an [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code, served as an SVG from ngrok's CDN.",
|
|
600
1038
|
"examples": [
|
|
601
1039
|
"```tsx\nimport { Flag } from \"@ngrok/mantle/flag\";\n\n<Flag code=\"US\" />\n<Flag code=\"JP\" size=\"m\" loading=\"eager\" />\n<Flag code=\"CA\" size=\"s\" />\n\n// Inline next to a country label.\n<span className=\"inline-flex items-center gap-2\">\n <Flag code=\"GB\" size=\"s\" aria-hidden />\n <span>United Kingdom</span>\n</span>\n```"
|
|
1040
|
+
],
|
|
1041
|
+
"useWhen": "Show the country of a region, an IP address, or a billing address as a flag, from its two-letter country code.",
|
|
1042
|
+
"aliases": [
|
|
1043
|
+
"country flag"
|
|
602
1044
|
]
|
|
603
1045
|
},
|
|
604
1046
|
{
|
|
@@ -615,6 +1057,22 @@
|
|
|
615
1057
|
"examples": [
|
|
616
1058
|
"Composition:\n```\nHoverCard.Root\n├── HoverCard.Trigger\n└── HoverCard.Content\n └── HoverCard.Arrow\n```",
|
|
617
1059
|
"```tsx\n<HoverCard.Root>\n <HoverCard.Trigger asChild>\n <Button type=\"button\" appearance=\"outlined\" intent=\"neutral\">\n Hover me\n </Button>\n </HoverCard.Trigger>\n <HoverCard.Content>\n <p>This is the hover card content.</p>\n </HoverCard.Content>\n</HoverCard.Root>\n```"
|
|
1060
|
+
],
|
|
1061
|
+
"siblings": [
|
|
1062
|
+
{
|
|
1063
|
+
"name": "Tooltip",
|
|
1064
|
+
"boundary": "the content is a short label or hint with no interactive content."
|
|
1065
|
+
},
|
|
1066
|
+
{
|
|
1067
|
+
"name": "Popover",
|
|
1068
|
+
"boundary": "the user opens interactive content on purpose, with a click or a key."
|
|
1069
|
+
}
|
|
1070
|
+
],
|
|
1071
|
+
"useWhen": "Preview the content behind a link on hover, such as a user card or a repository preview.",
|
|
1072
|
+
"aliases": [
|
|
1073
|
+
"hovercard",
|
|
1074
|
+
"link preview",
|
|
1075
|
+
"preview card"
|
|
618
1076
|
]
|
|
619
1077
|
},
|
|
620
1078
|
{
|
|
@@ -630,6 +1088,20 @@
|
|
|
630
1088
|
"jsdoc": "Decorates an svg icon with automatic sizing styles and a `shrink-0` class.",
|
|
631
1089
|
"examples": [
|
|
632
1090
|
"```tsx\nimport { ShrimpIcon } from \"@phosphor-icons/react/Shrimp\";\n\n// Decorative: renders aria-hidden=\"true\".\n<Icon svg={<ShrimpIcon />} />\n\n// Meaningful: the name keeps it exposed.\n<Icon svg={<ShrimpIcon />} role=\"img\" aria-label=\"Shrimp\" />\n```"
|
|
1091
|
+
],
|
|
1092
|
+
"siblings": [
|
|
1093
|
+
{
|
|
1094
|
+
"name": "IconButton",
|
|
1095
|
+
"boundary": "the icon is the only content of a button."
|
|
1096
|
+
},
|
|
1097
|
+
{
|
|
1098
|
+
"name": "Avatar",
|
|
1099
|
+
"boundary": "the image represents a person or an account."
|
|
1100
|
+
}
|
|
1101
|
+
],
|
|
1102
|
+
"useWhen": "Show an SVG icon, such as a Phosphor icon, beside text or inside a control.",
|
|
1103
|
+
"aliases": [
|
|
1104
|
+
"svg icon"
|
|
633
1105
|
]
|
|
634
1106
|
},
|
|
635
1107
|
{
|
|
@@ -645,7 +1117,18 @@
|
|
|
645
1117
|
"jsdoc": "A button that renders one icon and nothing else.",
|
|
646
1118
|
"examples": [
|
|
647
1119
|
"```tsx\n<IconButton\n icon={<TrashIcon />}\n label=\"Delete item\"\n appearance=\"ghost\"\n intent=\"neutral\"\n size=\"sm\"\n onClick={handleDelete}\n/>\n```",
|
|
648
|
-
"Submit a form
|
|
1120
|
+
"Submit a form. Opt in with `type=\"submit\"` (the default `\"button\"` does not submit):\n```tsx\n<IconButton\n type=\"submit\"\n appearance=\"outlined\"\n intent=\"neutral\"\n icon={<MagnifyingGlassIcon />}\n label=\"Search\"\n/>\n```"
|
|
1121
|
+
],
|
|
1122
|
+
"siblings": [
|
|
1123
|
+
{
|
|
1124
|
+
"name": "Button",
|
|
1125
|
+
"boundary": "the button shows a text label."
|
|
1126
|
+
}
|
|
1127
|
+
],
|
|
1128
|
+
"useWhen": "Run an action from a compact button that shows one icon and no text, such as a close or a copy button.",
|
|
1129
|
+
"aliases": [
|
|
1130
|
+
"icon only button",
|
|
1131
|
+
"action icon"
|
|
649
1132
|
]
|
|
650
1133
|
},
|
|
651
1134
|
{
|
|
@@ -658,7 +1141,18 @@
|
|
|
658
1141
|
"docsUrl": "https://mantle.ngrok.com/components/data-display/icons",
|
|
659
1142
|
"markdownUrl": "https://mantle.ngrok.com/components/data-display/icons.md",
|
|
660
1143
|
"summary": "Custom icons used throughout ngrok UI.",
|
|
661
|
-
"jsdoc": "Re-exports for the Icons component
|
|
1144
|
+
"jsdoc": "Re-exports for the Icons component: the ngrok-specific icons that `@phosphor-icons/react` does not ship.",
|
|
1145
|
+
"siblings": [
|
|
1146
|
+
{
|
|
1147
|
+
"name": "Icon",
|
|
1148
|
+
"boundary": "the glyph comes from `@phosphor-icons/react`."
|
|
1149
|
+
}
|
|
1150
|
+
],
|
|
1151
|
+
"useWhen": "Show an ngrok glyph that `@phosphor-icons/react` does not ship, such as the ngrok wordmark or the icon for a traffic policy file.",
|
|
1152
|
+
"aliases": [
|
|
1153
|
+
"icon set",
|
|
1154
|
+
"icon library"
|
|
1155
|
+
]
|
|
662
1156
|
},
|
|
663
1157
|
{
|
|
664
1158
|
"name": "Input",
|
|
@@ -673,6 +1167,35 @@
|
|
|
673
1167
|
"jsdoc": "An interactive form control that accepts data from the user.",
|
|
674
1168
|
"examples": [
|
|
675
1169
|
"```tsx\n<Input\n type=\"email\"\n placeholder=\"Enter your email\"\n validation=\"success\"\n/>\n```"
|
|
1170
|
+
],
|
|
1171
|
+
"siblings": [
|
|
1172
|
+
{
|
|
1173
|
+
"name": "TextArea",
|
|
1174
|
+
"boundary": "the text spans several lines."
|
|
1175
|
+
},
|
|
1176
|
+
{
|
|
1177
|
+
"name": "PasswordInput",
|
|
1178
|
+
"boundary": "the value is a password or another secret."
|
|
1179
|
+
},
|
|
1180
|
+
{
|
|
1181
|
+
"name": "OtpInput",
|
|
1182
|
+
"boundary": "the value is a one-time passcode."
|
|
1183
|
+
},
|
|
1184
|
+
{
|
|
1185
|
+
"name": "Combobox",
|
|
1186
|
+
"boundary": "the user picks the value from a list of suggestions."
|
|
1187
|
+
},
|
|
1188
|
+
{
|
|
1189
|
+
"name": "Query",
|
|
1190
|
+
"boundary": "the field filters a list with free text and `key:value` qualifiers."
|
|
1191
|
+
}
|
|
1192
|
+
],
|
|
1193
|
+
"useWhen": "Accept one line of text from the user, such as a name, an email address, a URL, or a search term.",
|
|
1194
|
+
"aliases": [
|
|
1195
|
+
"text input",
|
|
1196
|
+
"text field",
|
|
1197
|
+
"textfield",
|
|
1198
|
+
"textbox"
|
|
676
1199
|
]
|
|
677
1200
|
},
|
|
678
1201
|
{
|
|
@@ -684,10 +1207,27 @@
|
|
|
684
1207
|
"importPath": "@ngrok/mantle/kbd",
|
|
685
1208
|
"docsUrl": "https://mantle.ngrok.com/components/data-display/kbd",
|
|
686
1209
|
"markdownUrl": "https://mantle.ngrok.com/components/data-display/kbd.md",
|
|
687
|
-
"summary": "A square, centered keyboard \"key\" chip for rendering keyboard shortcut hints.",
|
|
688
|
-
"jsdoc": "A square, centered keyboard \"key\" chip for rendering shortcut hints
|
|
1210
|
+
"summary": "A square, centered keyboard \"key\" chip for rendering keyboard shortcut hints, such as K, ⌘, ⌃, or Enter.",
|
|
1211
|
+
"jsdoc": "A square, centered keyboard \"key\" chip for rendering shortcut hints: \"K\", \"⌘\", \"⌃\", \"Enter\".",
|
|
689
1212
|
"examples": [
|
|
690
|
-
"```tsx\nimport { Kbd } from \"@ngrok/mantle/kbd\";\n\n// Letter key.\n<Kbd>K</Kbd>\n\n// Symbol: a visually hidden label names the key, and the glyph is hidden.\n<Kbd>\n <span className=\"sr-only\">Enter</span>\n <span aria-hidden>↵</span>\n</Kbd>\n\n// Chord
|
|
1213
|
+
"```tsx\nimport { Kbd } from \"@ngrok/mantle/kbd\";\n\n// Letter key.\n<Kbd>K</Kbd>\n\n// Symbol: a visually hidden label names the key, and the glyph is hidden.\n<Kbd>\n <span className=\"sr-only\">Enter</span>\n <span aria-hidden>↵</span>\n</Kbd>\n\n// Chord: render each key separately.\n<span className=\"inline-flex items-center gap-1\">\n <Kbd>\n <span className=\"sr-only\">Command</span>\n <span aria-hidden>⌘</span>\n </Kbd>\n <span>+</span>\n <Kbd>K</Kbd>\n</span>\n```"
|
|
1214
|
+
],
|
|
1215
|
+
"siblings": [
|
|
1216
|
+
{
|
|
1217
|
+
"name": "Code",
|
|
1218
|
+
"boundary": "the text is a fragment of code, not a key."
|
|
1219
|
+
},
|
|
1220
|
+
{
|
|
1221
|
+
"name": "Badge",
|
|
1222
|
+
"boundary": "the label is a status, a category, or a count."
|
|
1223
|
+
}
|
|
1224
|
+
],
|
|
1225
|
+
"useWhen": "Show a keyboard key or a shortcut hint, such as `⌘` and `K`, in prose, a tooltip, or a menu item.",
|
|
1226
|
+
"aliases": [
|
|
1227
|
+
"keyboard shortcut",
|
|
1228
|
+
"hotkey",
|
|
1229
|
+
"keycap",
|
|
1230
|
+
"keyboard key"
|
|
691
1231
|
]
|
|
692
1232
|
},
|
|
693
1233
|
{
|
|
@@ -699,10 +1239,24 @@
|
|
|
699
1239
|
"importPath": "@ngrok/mantle/label",
|
|
700
1240
|
"docsUrl": "https://mantle.ngrok.com/components/forms/label",
|
|
701
1241
|
"markdownUrl": "https://mantle.ngrok.com/components/forms/label.md",
|
|
702
|
-
"summary": "A
|
|
703
|
-
"jsdoc": "A caption for a form control
|
|
1242
|
+
"summary": "A caption for a form control, such as an input, a checkbox, a radio, a switch, or a select.",
|
|
1243
|
+
"jsdoc": "A caption for a form control: input, checkbox, radio, switch, select.",
|
|
704
1244
|
"examples": [
|
|
705
|
-
"```tsx\nimport { Label } from \"@ngrok/mantle/label\";\nimport { Input } from \"@ngrok/mantle/input\";\n\n// Implicit
|
|
1245
|
+
"```tsx\nimport { Label } from \"@ngrok/mantle/label\";\nimport { Input } from \"@ngrok/mantle/input\";\n\n// Implicit: control nested inside the label.\n<Label className=\"grid gap-1\">\n <span>Email</span>\n <Input type=\"email\" name=\"email\" />\n</Label>\n\n// Explicit: htmlFor matches the control's id.\n<div className=\"grid gap-1\">\n <Label htmlFor=\"api-key\">API key</Label>\n <Input id=\"api-key\" name=\"apiKey\" />\n</div>\n\n// Inline label for a checkbox.\n<Label className=\"flex items-center gap-2\">\n <Checkbox name=\"terms\" />\n <span>I agree to the terms</span>\n</Label>\n```"
|
|
1246
|
+
],
|
|
1247
|
+
"siblings": [
|
|
1248
|
+
{
|
|
1249
|
+
"name": "Field",
|
|
1250
|
+
"boundary": "the control also needs a description or validation errors."
|
|
1251
|
+
},
|
|
1252
|
+
{
|
|
1253
|
+
"name": "Choice",
|
|
1254
|
+
"boundary": "the control needs a title and a description beside it."
|
|
1255
|
+
}
|
|
1256
|
+
],
|
|
1257
|
+
"useWhen": "Give a form control a visible caption that names it and focuses it on a click.",
|
|
1258
|
+
"aliases": [
|
|
1259
|
+
"form label"
|
|
706
1260
|
]
|
|
707
1261
|
},
|
|
708
1262
|
{
|
|
@@ -714,11 +1268,31 @@
|
|
|
714
1268
|
"importPath": "@ngrok/mantle/line-chart",
|
|
715
1269
|
"docsUrl": "https://mantle.ngrok.com/components/charts/line-chart",
|
|
716
1270
|
"markdownUrl": "https://mantle.ngrok.com/components/charts/line-chart.md",
|
|
717
|
-
"summary": "A
|
|
718
|
-
"jsdoc": "A
|
|
1271
|
+
"summary": "A line chart for trends over a continuous x axis, time above all.",
|
|
1272
|
+
"jsdoc": "A line chart for trends over a continuous x, time above all.",
|
|
719
1273
|
"examples": [
|
|
720
|
-
"Composition:\n```\nLineChart.Root\n├── LineChart.Grid\n├── LineChart.XAxis\n├── LineChart.YAxis\n├── LineChart.Line (one per series)\n├── LineChart.ReferenceLine\n├── LineChart.Tooltip\n├── LineChart.Legend\n└── LineChart.CopyButton\n```",
|
|
721
|
-
"```tsx\nconst data = [\n { time: new Date(\"2026-07-18T10:00:00Z\"), p50: 120, p99: 480 },\n { time: new Date(\"2026-07-18T10:01:00Z\"), p50: 132, p99: 510 },\n { time: new Date(\"2026-07-18T10:02:00Z\"), p50: 101, p99: 460 },\n];\n\n<LineChart.Root data={data} xKey=\"time\" aria-label=\"Request latency\">\n <LineChart.Grid />\n <LineChart.XAxis />\n <LineChart.YAxis />\n <LineChart.Line dataKey=\"p50\" label=\"p50\" />\n <LineChart.Line dataKey=\"p99\" label=\"p99\" curve=\"monotone\" />\n <LineChart.Tooltip />\n <LineChart.Legend />\n</LineChart.Root>\n```"
|
|
1274
|
+
"Composition:\n```\nLineChart.Root\n├── LineChart.Grid\n├── LineChart.XAxis\n├── LineChart.YAxis\n├── LineChart.Line (one per series)\n├── LineChart.ReferenceLine\n├── LineChart.Tooltip\n├── LineChart.Legend\n└── LineChart.CopyButton\n```\n\nA List groups Roots:\n```\nLineChart.List\n└── LineChart.Root (one per chart)\n```",
|
|
1275
|
+
"```tsx\nconst data = [\n { time: new Date(\"2026-07-18T10:00:00Z\"), p50: 120, p99: 480 },\n { time: new Date(\"2026-07-18T10:01:00Z\"), p50: 132, p99: 510 },\n { time: new Date(\"2026-07-18T10:02:00Z\"), p50: 101, p99: 460 },\n];\n\n<LineChart.Root data={data} xKey=\"time\" aria-label=\"Request latency\">\n <LineChart.Grid />\n <LineChart.XAxis />\n <LineChart.YAxis />\n <LineChart.Line dataKey=\"p50\" label=\"p50\" color=\"blue\" />\n <LineChart.Line dataKey=\"p99\" label=\"p99\" curve=\"monotone\" color=\"emerald\" />\n <LineChart.Tooltip />\n <LineChart.Legend />\n</LineChart.Root>\n```"
|
|
1276
|
+
],
|
|
1277
|
+
"siblings": [
|
|
1278
|
+
{
|
|
1279
|
+
"name": "AreaChart",
|
|
1280
|
+
"boundary": "the chart shows a volume, or a total and its parts, as filled areas."
|
|
1281
|
+
},
|
|
1282
|
+
{
|
|
1283
|
+
"name": "BarChart",
|
|
1284
|
+
"boundary": "the reader compares values across categories by bar length from zero."
|
|
1285
|
+
},
|
|
1286
|
+
{
|
|
1287
|
+
"name": "ScatterPlot",
|
|
1288
|
+
"boundary": "the points show how two measures correlate, and their order does not matter."
|
|
1289
|
+
}
|
|
1290
|
+
],
|
|
1291
|
+
"useWhen": "Show how one or more values trend across an ordered x axis, such as time, including long series with many points.",
|
|
1292
|
+
"aliases": [
|
|
1293
|
+
"sparkline",
|
|
1294
|
+
"line graph",
|
|
1295
|
+
"time series chart"
|
|
722
1296
|
]
|
|
723
1297
|
},
|
|
724
1298
|
{
|
|
@@ -731,10 +1305,25 @@
|
|
|
731
1305
|
"docsUrl": "https://mantle.ngrok.com/components/data-display/list",
|
|
732
1306
|
"markdownUrl": "https://mantle.ngrok.com/components/data-display/list.md",
|
|
733
1307
|
"summary": "A scrollable, optionally-virtualized list of clickable items.",
|
|
734
|
-
"jsdoc": "A scrollable, optionally-virtualized list of clickable items
|
|
1308
|
+
"jsdoc": "A scrollable, optionally-virtualized list of clickable items: the action / navigation counterpart to `SelectableList` (e.g. an account switcher or SSO provider picker).",
|
|
735
1309
|
"examples": [
|
|
736
1310
|
"Composition:\n```\nList.Root (or .VirtualRoot)\n└── List.Item\n ├── List.ItemTitle\n └── List.ItemDescription\n```",
|
|
737
1311
|
"```tsx\n<List.Root aria-label=\"Your accounts\" className=\"max-h-80\">\n {accounts.map((account) => (\n <List.Item key={account.id} onClick={() => switchTo(account.id)}>\n <List.ItemTitle>{account.name}</List.ItemTitle>\n <List.ItemDescription>\n {account.plan} · {account.memberCount} members\n </List.ItemDescription>\n </List.Item>\n ))}\n</List.Root>\n```"
|
|
1312
|
+
],
|
|
1313
|
+
"siblings": [
|
|
1314
|
+
{
|
|
1315
|
+
"name": "SelectableList",
|
|
1316
|
+
"boundary": "the user selects rows with checkboxes."
|
|
1317
|
+
},
|
|
1318
|
+
{
|
|
1319
|
+
"name": "DropdownMenu",
|
|
1320
|
+
"boundary": "the actions open in a menu from a button."
|
|
1321
|
+
}
|
|
1322
|
+
],
|
|
1323
|
+
"useWhen": "Show a scrollable list of items that each run an action or navigate, such as an account switcher.",
|
|
1324
|
+
"aliases": [
|
|
1325
|
+
"virtual list",
|
|
1326
|
+
"virtualized list"
|
|
738
1327
|
]
|
|
739
1328
|
},
|
|
740
1329
|
{
|
|
@@ -750,6 +1339,25 @@
|
|
|
750
1339
|
"jsdoc": "Announces its text to screen readers when the text changes.",
|
|
751
1340
|
"examples": [
|
|
752
1341
|
"```tsx\nimport { LiveRegion } from \"@ngrok/mantle/live-region\";\n\n// Mount the region before the first message, then swap the message.\nfunction SearchResults({ results }: { results: string[] }) {\n return (\n <>\n <LiveRegion>{`${results.length} results found`}</LiveRegion>\n <ul>\n {results.map((result) => (\n <li key={result}>{result}</li>\n ))}\n </ul>\n </>\n );\n}\n```"
|
|
1342
|
+
],
|
|
1343
|
+
"siblings": [
|
|
1344
|
+
{
|
|
1345
|
+
"name": "Toast",
|
|
1346
|
+
"boundary": "sighted users also need to see the message."
|
|
1347
|
+
},
|
|
1348
|
+
{
|
|
1349
|
+
"name": "Alert",
|
|
1350
|
+
"boundary": "the message stays visible in the page. It announces only when you pass it a `role`."
|
|
1351
|
+
},
|
|
1352
|
+
{
|
|
1353
|
+
"name": "VisuallyHidden",
|
|
1354
|
+
"boundary": "the hidden text is static and needs no announcement."
|
|
1355
|
+
}
|
|
1356
|
+
],
|
|
1357
|
+
"useWhen": "Announce a change to screen readers with no visible message, such as a save result or a count of search results.",
|
|
1358
|
+
"aliases": [
|
|
1359
|
+
"aria live",
|
|
1360
|
+
"announcer"
|
|
753
1361
|
]
|
|
754
1362
|
},
|
|
755
1363
|
{
|
|
@@ -761,11 +1369,25 @@
|
|
|
761
1369
|
"importPath": "@ngrok/mantle/main",
|
|
762
1370
|
"docsUrl": "https://mantle.ngrok.com/components/primitives/main",
|
|
763
1371
|
"markdownUrl": "https://mantle.ngrok.com/components/primitives/main.md",
|
|
764
|
-
"summary": "A focusable `<main>` landmark for the page's primary content
|
|
1372
|
+
"summary": "A focusable `<main>` landmark for the page's primary content.",
|
|
765
1373
|
"jsdoc": "A focusable `<main>` landmark for the page's primary content.",
|
|
766
1374
|
"examples": [
|
|
767
1375
|
"```tsx\n<SkipToMainLink />\n<Header />\n<Main>\n <h1>Page title</h1>\n</Main>\n```",
|
|
768
1376
|
"In an app shell, `AppLayout.Body` renders it:\n```tsx\n<Sidebar.Root>\n <AppLayout.Root className=\"fixed inset-0\">\n <SkipToMainLink />\n <AppLayout.Notice>{isUnderMaintenance && <MaintenanceBanner />}</AppLayout.Notice>\n <AppLayout.Workspace>\n <Sidebar.Nav aria-label=\"Main\">…</Sidebar.Nav>\n <AppLayout.Content>\n <AppLayout.Header>\n <Sidebar.Trigger />\n <Breadcrumbs />\n </AppLayout.Header>\n <AppLayout.Body>\n <Outlet />\n </AppLayout.Body>\n </AppLayout.Content>\n </AppLayout.Workspace>\n </AppLayout.Root>\n</Sidebar.Root>\n```"
|
|
1377
|
+
],
|
|
1378
|
+
"siblings": [
|
|
1379
|
+
{
|
|
1380
|
+
"name": "SkipToMainLink",
|
|
1381
|
+
"boundary": "keyboard users need the link that jumps to the landmark."
|
|
1382
|
+
},
|
|
1383
|
+
{
|
|
1384
|
+
"name": "AppLayout",
|
|
1385
|
+
"boundary": "the page sits in the app shell, where `AppLayout.Body` already renders the landmark."
|
|
1386
|
+
}
|
|
1387
|
+
],
|
|
1388
|
+
"useWhen": "Mark the primary content of a page as a focusable `<main>` landmark that a skip link can move focus to.",
|
|
1389
|
+
"aliases": [
|
|
1390
|
+
"main landmark"
|
|
769
1391
|
]
|
|
770
1392
|
},
|
|
771
1393
|
{
|
|
@@ -777,11 +1399,25 @@
|
|
|
777
1399
|
"importPath": "@ngrok/mantle/media-object",
|
|
778
1400
|
"docsUrl": "https://mantle.ngrok.com/components/structure/media-object",
|
|
779
1401
|
"markdownUrl": "https://mantle.ngrok.com/components/structure/media-object.md",
|
|
780
|
-
"summary": "The Media Object is an image
|
|
781
|
-
"jsdoc": "A small, reusable layout primitive for \"image/icon on one side, descriptive content on the other\"
|
|
1402
|
+
"summary": "The Media Object is an image or an icon (media) on the left, with descriptive content (a title and a subtitle or description) on the right.",
|
|
1403
|
+
"jsdoc": "A small, reusable layout primitive for \"image/icon on one side, descriptive content on the other\", the foundational \"media object\" pattern.",
|
|
782
1404
|
"examples": [
|
|
783
1405
|
"Composition:\n```\nMediaObject.Root\n├── MediaObject.Media\n└── MediaObject.Content\n```",
|
|
784
1406
|
"```tsx\nimport { Avatar } from \"@ngrok/mantle/avatar\";\nimport { MediaObject } from \"@ngrok/mantle/media-object\";\n\n<MediaObject.Root>\n <MediaObject.Media>\n <Avatar.Root>\n <Avatar.Image src={user.avatarUrl} alt=\"\" />\n <Avatar.Fallback name={user.name} />\n </Avatar.Root>\n </MediaObject.Media>\n <MediaObject.Content>\n <p className=\"font-medium\">{user.name}</p>\n <p className=\"text-muted text-sm\">{comment}</p>\n </MediaObject.Content>\n</MediaObject.Root>\n```"
|
|
1407
|
+
],
|
|
1408
|
+
"siblings": [
|
|
1409
|
+
{
|
|
1410
|
+
"name": "Card",
|
|
1411
|
+
"boundary": "the content needs a raised box with a border."
|
|
1412
|
+
},
|
|
1413
|
+
{
|
|
1414
|
+
"name": "Choice",
|
|
1415
|
+
"boundary": "the thing beside the text is a checkbox, a radio, or a switch."
|
|
1416
|
+
}
|
|
1417
|
+
],
|
|
1418
|
+
"useWhen": "Put an image, an avatar, or an icon beside a title and a description, such as in a comment or a list row.",
|
|
1419
|
+
"aliases": [
|
|
1420
|
+
"media block"
|
|
785
1421
|
]
|
|
786
1422
|
},
|
|
787
1423
|
{
|
|
@@ -793,11 +1429,32 @@
|
|
|
793
1429
|
"importPath": "@ngrok/mantle/multi-select",
|
|
794
1430
|
"docsUrl": "https://mantle.ngrok.com/components/forms/multi-select",
|
|
795
1431
|
"markdownUrl": "https://mantle.ngrok.com/components/forms/multi-select.md",
|
|
796
|
-
"summary": "A typeahead multi-select combobox
|
|
1432
|
+
"summary": "A typeahead multi-select combobox: the user picks several values with filtering, and the picks show as removable tags.",
|
|
797
1433
|
"jsdoc": "A multi-select combobox that allows users to select multiple values with typeahead filtering.",
|
|
798
1434
|
"examples": [
|
|
799
1435
|
"Composition:\n```\nMultiSelect.Root\n├── MultiSelect.Trigger\n│ ├── MultiSelect.TagValues\n│ └── MultiSelect.Input\n└── MultiSelect.Content\n ├── MultiSelect.Group\n │ ├── MultiSelect.GroupLabel\n │ ├── MultiSelect.GroupDescription\n │ └── MultiSelect.Item\n ├── MultiSelect.Separator\n ├── MultiSelect.Empty\n └── MultiSelect.ContentFooter\n```",
|
|
800
1436
|
"```tsx\n<MultiSelect.Root>\n <MultiSelect.Trigger>\n <MultiSelect.TagValues />\n <MultiSelect.Input placeholder=\"Select items...\" />\n </MultiSelect.Trigger>\n <MultiSelect.Content>\n <MultiSelect.Item value=\"apple\">Apple</MultiSelect.Item>\n <MultiSelect.Item value=\"banana\">Banana</MultiSelect.Item>\n <MultiSelect.Item value=\"cherry\">Cherry</MultiSelect.Item>\n </MultiSelect.Content>\n</MultiSelect.Root>\n```"
|
|
1437
|
+
],
|
|
1438
|
+
"siblings": [
|
|
1439
|
+
{
|
|
1440
|
+
"name": "Combobox",
|
|
1441
|
+
"boundary": "the user picks one value with a filter."
|
|
1442
|
+
},
|
|
1443
|
+
{
|
|
1444
|
+
"name": "Select",
|
|
1445
|
+
"boundary": "the user picks one value from a short list."
|
|
1446
|
+
},
|
|
1447
|
+
{
|
|
1448
|
+
"name": "SelectableList",
|
|
1449
|
+
"boundary": "the options show inline as checkbox rows, with no popover."
|
|
1450
|
+
}
|
|
1451
|
+
],
|
|
1452
|
+
"useWhen": "Pick several values from a list with a typeahead filter, and show the picks as removable tags.",
|
|
1453
|
+
"aliases": [
|
|
1454
|
+
"tag input",
|
|
1455
|
+
"tags input",
|
|
1456
|
+
"multiple select",
|
|
1457
|
+
"chip input"
|
|
801
1458
|
]
|
|
802
1459
|
},
|
|
803
1460
|
{
|
|
@@ -814,6 +1471,23 @@
|
|
|
814
1471
|
"examples": [
|
|
815
1472
|
"Composition:\n```\nOtpInput.Root\n├── OtpInput.Group\n│ └── OtpInput.Slot\n├── OtpInput.Separator\n└── OtpInput.Group\n └── OtpInput.Slot\n```",
|
|
816
1473
|
"```tsx\n<OtpInput.Root maxLength={6}>\n <OtpInput.Group>\n <OtpInput.Slot index={0} />\n <OtpInput.Slot index={1} />\n <OtpInput.Slot index={2} />\n </OtpInput.Group>\n <OtpInput.Separator />\n <OtpInput.Group>\n <OtpInput.Slot index={3} />\n <OtpInput.Slot index={4} />\n <OtpInput.Slot index={5} />\n </OtpInput.Group>\n</OtpInput.Root>\n```"
|
|
1474
|
+
],
|
|
1475
|
+
"siblings": [
|
|
1476
|
+
{
|
|
1477
|
+
"name": "Input",
|
|
1478
|
+
"boundary": "the value is free-form text."
|
|
1479
|
+
},
|
|
1480
|
+
{
|
|
1481
|
+
"name": "PasswordInput",
|
|
1482
|
+
"boundary": "the value is a password or another long-lived secret."
|
|
1483
|
+
}
|
|
1484
|
+
],
|
|
1485
|
+
"useWhen": "Enter a one-time passcode, such as a two-factor code, with one box for each character.",
|
|
1486
|
+
"aliases": [
|
|
1487
|
+
"one time password",
|
|
1488
|
+
"verification code",
|
|
1489
|
+
"pin input",
|
|
1490
|
+
"2fa"
|
|
817
1491
|
]
|
|
818
1492
|
},
|
|
819
1493
|
{
|
|
@@ -826,7 +1500,12 @@
|
|
|
826
1500
|
"docsUrl": "https://mantle.ngrok.com/components/navigation/pagination",
|
|
827
1501
|
"markdownUrl": "https://mantle.ngrok.com/components/navigation/pagination.md",
|
|
828
1502
|
"summary": "Components and hooks for navigating through paged data with cursor-based and offset-based pagination strategies.",
|
|
829
|
-
"jsdoc": "Re-exports for the Pagination component family
|
|
1503
|
+
"jsdoc": "Re-exports for the Pagination component family: `CursorPagination`'s parts for cursor paging, `useOffsetPagination` for offset paging, and `PaginationRange` for the count line of a list whose total is known.",
|
|
1504
|
+
"useWhen": "Move through paged data one page at a time, with a cursor or an offset.",
|
|
1505
|
+
"aliases": [
|
|
1506
|
+
"pager",
|
|
1507
|
+
"paginator"
|
|
1508
|
+
]
|
|
830
1509
|
},
|
|
831
1510
|
{
|
|
832
1511
|
"name": "Password Input",
|
|
@@ -840,7 +1519,21 @@
|
|
|
840
1519
|
"summary": "Fundamental component for password inputs.",
|
|
841
1520
|
"jsdoc": "An input optimized for password and other sensitive-value entry.",
|
|
842
1521
|
"examples": [
|
|
843
|
-
"```tsx\nimport { PasswordInput } from \"@ngrok/mantle/input\";\nimport { Label } from \"@ngrok/mantle/label\";\nimport { useState } from \"react\";\n\n// Basic
|
|
1522
|
+
"```tsx\nimport { PasswordInput } from \"@ngrok/mantle/input\";\nimport { Label } from \"@ngrok/mantle/label\";\nimport { useState } from \"react\";\n\n// Basic: uncontrolled visibility.\n<Label className=\"grid gap-1\">\n <span>Password</span>\n <PasswordInput name=\"password\" autoComplete=\"current-password\" />\n</Label>\n\n// Validation state.\n<PasswordInput validation=\"error\" />\n\n// Controlled visibility: one toggle reveals multiple fields.\nfunction PasswordPair() {\n const [show, setShow] = useState(false);\n return (\n <>\n <PasswordInput showValue={show} onValueVisibilityChange={setShow} />\n <PasswordInput showValue={show} onValueVisibilityChange={setShow} />\n </>\n );\n}\n```"
|
|
1523
|
+
],
|
|
1524
|
+
"siblings": [
|
|
1525
|
+
{
|
|
1526
|
+
"name": "Input",
|
|
1527
|
+
"boundary": "the value is never sensitive."
|
|
1528
|
+
},
|
|
1529
|
+
{
|
|
1530
|
+
"name": "OtpInput",
|
|
1531
|
+
"boundary": "the value is a one-time passcode."
|
|
1532
|
+
}
|
|
1533
|
+
],
|
|
1534
|
+
"useWhen": "Accept a password or another secret value, with a button that shows or hides it.",
|
|
1535
|
+
"aliases": [
|
|
1536
|
+
"password field"
|
|
844
1537
|
]
|
|
845
1538
|
},
|
|
846
1539
|
{
|
|
@@ -858,8 +1551,28 @@
|
|
|
858
1551
|
"Composition:\n```\nPopover.Root\n├── Popover.Trigger\n├── Popover.Anchor\n└── Popover.Content\n ├── Popover.Arrow\n └── Popover.Close\n```",
|
|
859
1552
|
"```tsx\n<Popover.Root>\n <Popover.Trigger asChild>\n <Button type=\"button\" appearance=\"outlined\" intent=\"neutral\">\n Open Popover\n </Button>\n </Popover.Trigger>\n <Popover.Content>\n <p>This is the popover content.</p>\n </Popover.Content>\n</Popover.Root>\n```"
|
|
860
1553
|
],
|
|
1554
|
+
"siblings": [
|
|
1555
|
+
{
|
|
1556
|
+
"name": "Tooltip",
|
|
1557
|
+
"boundary": "the content is a short label or hint that shows on hover or focus."
|
|
1558
|
+
},
|
|
1559
|
+
{
|
|
1560
|
+
"name": "HoverCard",
|
|
1561
|
+
"boundary": "the content is a preview of a link that shows on hover."
|
|
1562
|
+
},
|
|
1563
|
+
{
|
|
1564
|
+
"name": "DropdownMenu",
|
|
1565
|
+
"boundary": "the content is a list of actions."
|
|
1566
|
+
},
|
|
1567
|
+
{
|
|
1568
|
+
"name": "Dialog",
|
|
1569
|
+
"boundary": "the task needs a modal window that blocks the page."
|
|
1570
|
+
}
|
|
1571
|
+
],
|
|
1572
|
+
"useWhen": "Show interactive content, such as a small form, a settings menu, or a color picker, that the user opens from a button.",
|
|
861
1573
|
"aliases": [
|
|
862
|
-
"popup"
|
|
1574
|
+
"popup",
|
|
1575
|
+
"flyout"
|
|
863
1576
|
]
|
|
864
1577
|
},
|
|
865
1578
|
{
|
|
@@ -876,6 +1589,22 @@
|
|
|
876
1589
|
"examples": [
|
|
877
1590
|
"Composition:\n```\nProgressBar.Root\n└── ProgressBar.Indicator\n```",
|
|
878
1591
|
"```tsx\n<ProgressBar.Root aria-label=\"Upload progress\" value={60}>\n <ProgressBar.Indicator />\n</ProgressBar.Root>\n\n<ProgressBar.Root aria-label=\"Upload progress\" value={75} max={100}>\n <ProgressBar.Indicator />\n</ProgressBar.Root>\n\n// Indeterminate progress\n<ProgressBar.Root aria-label=\"Upload progress\" value=\"indeterminate\">\n <ProgressBar.Indicator />\n</ProgressBar.Root>\n```"
|
|
1592
|
+
],
|
|
1593
|
+
"siblings": [
|
|
1594
|
+
{
|
|
1595
|
+
"name": "ProgressDonut",
|
|
1596
|
+
"boundary": "the indicator must be a small circle."
|
|
1597
|
+
},
|
|
1598
|
+
{
|
|
1599
|
+
"name": "Skeleton",
|
|
1600
|
+
"boundary": "the content still loads, and its progress is unknown."
|
|
1601
|
+
}
|
|
1602
|
+
],
|
|
1603
|
+
"useWhen": "Show how much of a task or a quota is complete, as a horizontal bar.",
|
|
1604
|
+
"aliases": [
|
|
1605
|
+
"linear progress",
|
|
1606
|
+
"loading bar",
|
|
1607
|
+
"meter"
|
|
879
1608
|
]
|
|
880
1609
|
},
|
|
881
1610
|
{
|
|
@@ -892,6 +1621,19 @@
|
|
|
892
1621
|
"examples": [
|
|
893
1622
|
"Composition:\n```\nProgressDonut.Root\n└── ProgressDonut.Indicator\n```",
|
|
894
1623
|
"```tsx\n<ProgressDonut.Root aria-label=\"Data transfer out\" value={60}>\n <ProgressDonut.Indicator />\n</ProgressDonut.Root>\n\n<ProgressDonut.Root aria-label=\"Data transfer out\" value={60}>\n <ProgressDonut.Indicator className=\"text-danger-600\" />\n</ProgressDonut.Root>\n```"
|
|
1624
|
+
],
|
|
1625
|
+
"siblings": [
|
|
1626
|
+
{
|
|
1627
|
+
"name": "ProgressBar",
|
|
1628
|
+
"boundary": "the indicator is a horizontal bar."
|
|
1629
|
+
}
|
|
1630
|
+
],
|
|
1631
|
+
"useWhen": "Show how much of a task or a quota is complete, as a small circle.",
|
|
1632
|
+
"aliases": [
|
|
1633
|
+
"circular progress",
|
|
1634
|
+
"progress ring",
|
|
1635
|
+
"progress circle",
|
|
1636
|
+
"radial progress"
|
|
895
1637
|
]
|
|
896
1638
|
},
|
|
897
1639
|
{
|
|
@@ -908,7 +1650,8 @@
|
|
|
908
1650
|
"examples": [
|
|
909
1651
|
"Composition:\n```\nQrCode.Root\n├── QrCode.Frame\n│ └── QrCode.Pattern\n└── QrCode.Overlay\n```",
|
|
910
1652
|
"```tsx\n<QrCode.Root value=\"https://ngrok.com\" ecc=\"H\">\n <QrCode.Frame>\n <QrCode.Pattern />\n </QrCode.Frame>\n <QrCode.Overlay>\n <NgrokLettermarkIcon className=\"size-7\" />\n </QrCode.Overlay>\n</QrCode.Root>\n```"
|
|
911
|
-
]
|
|
1653
|
+
],
|
|
1654
|
+
"useWhen": "Encode a URL or other text as a QR code that a phone camera can scan, with an optional centered logo."
|
|
912
1655
|
},
|
|
913
1656
|
{
|
|
914
1657
|
"name": "Query",
|
|
@@ -943,7 +1686,13 @@
|
|
|
943
1686
|
"boundary": "a palette that runs an action or navigates."
|
|
944
1687
|
}
|
|
945
1688
|
],
|
|
946
|
-
"useWhen": "Filter a list with a typed query of free text and `key:value` qualifiers."
|
|
1689
|
+
"useWhen": "Filter a list with a typed query of free text and `key:value` qualifiers.",
|
|
1690
|
+
"aliases": [
|
|
1691
|
+
"search bar",
|
|
1692
|
+
"search input",
|
|
1693
|
+
"filter bar",
|
|
1694
|
+
"filter syntax"
|
|
1695
|
+
]
|
|
947
1696
|
},
|
|
948
1697
|
{
|
|
949
1698
|
"name": "Radio Group",
|
|
@@ -957,8 +1706,31 @@
|
|
|
957
1706
|
"summary": "A set of checkable buttons (known as radio buttons) where no more than one of the buttons can be checked at a time.",
|
|
958
1707
|
"jsdoc": "A group of radio items.",
|
|
959
1708
|
"examples": [
|
|
960
|
-
"Composition:\n```\n# Default radios\nRadioGroup.Root\n└── RadioGroup.Item\n ├── RadioGroup.Indicator\n └── RadioGroup.ItemContent\n\n# List layout with descriptions\nRadioGroup.List\n└── RadioGroup.ListItem\n ├── RadioGroup.Indicator\n └── RadioGroup.ItemContent\n\n#
|
|
1709
|
+
"Composition:\n```\n# Default radios\nRadioGroup.Root\n└── RadioGroup.Item\n ├── RadioGroup.Indicator\n └── RadioGroup.ItemContent\n\n# List layout with descriptions\nRadioGroup.List\n└── RadioGroup.ListItem\n ├── RadioGroup.Indicator\n └── RadioGroup.ItemContent\n\n# Card-style radios\nRadioGroup.Root\n└── RadioGroup.Card\n └── RadioGroup.Indicator\n\n# Rich option layout (Choice)\nRadioGroup.Root\n└── RadioGroup.Item\n └── Choice.Root\n ├── Choice.Indicator\n │ └── RadioGroup.Indicator\n └── Choice.Content\n ├── Choice.Title\n └── Choice.Description\n```",
|
|
961
1710
|
"```tsx\n<RadioGroup.Root value={value} onChange={setValue}>\n <RadioGroup.Item value=\"option1\">\n <RadioGroup.Indicator />\n <span>Option 1</span>\n </RadioGroup.Item>\n <RadioGroup.Item value=\"option2\">\n <RadioGroup.Indicator />\n <span>Option 2</span>\n </RadioGroup.Item>\n</RadioGroup.Root>\n```"
|
|
1711
|
+
],
|
|
1712
|
+
"siblings": [
|
|
1713
|
+
{
|
|
1714
|
+
"name": "Select",
|
|
1715
|
+
"boundary": "the set is long, or the form has little space."
|
|
1716
|
+
},
|
|
1717
|
+
{
|
|
1718
|
+
"name": "Checkbox",
|
|
1719
|
+
"boundary": "the user picks any number of options."
|
|
1720
|
+
},
|
|
1721
|
+
{
|
|
1722
|
+
"name": "Choice",
|
|
1723
|
+
"boundary": "each radio needs a title and a description beside it."
|
|
1724
|
+
},
|
|
1725
|
+
{
|
|
1726
|
+
"name": "SegmentedControl",
|
|
1727
|
+
"boundary": "a few short options switch a view or a mode in one row."
|
|
1728
|
+
}
|
|
1729
|
+
],
|
|
1730
|
+
"useWhen": "Pick exactly one value from a few fixed options, with every option visible at once.",
|
|
1731
|
+
"aliases": [
|
|
1732
|
+
"radio button",
|
|
1733
|
+
"radio"
|
|
962
1734
|
]
|
|
963
1735
|
},
|
|
964
1736
|
{
|
|
@@ -970,11 +1742,31 @@
|
|
|
970
1742
|
"importPath": "@ngrok/mantle/sandbar",
|
|
971
1743
|
"docsUrl": "https://mantle.ngrok.com/components/feedback/sandbar",
|
|
972
1744
|
"markdownUrl": "https://mantle.ngrok.com/components/feedback/sandbar.md",
|
|
973
|
-
"summary": "A floating save bar for unsaved changes.
|
|
1745
|
+
"summary": "A floating save bar for unsaved changes.",
|
|
974
1746
|
"jsdoc": "A persistent, decision-bearing bar that floats near the bottom edge of the viewport.",
|
|
975
1747
|
"examples": [
|
|
976
1748
|
"Composition:\n```\nSandbar.Root\n├── Sandbar.Message\n└── Sandbar.Actions\n ├── Sandbar.DiscardButton\n └── Sandbar.SaveButton\n```",
|
|
977
1749
|
"```tsx\n<Sandbar.Root open={isDirty} handleRef={sandbarHandle}>\n <Sandbar.Message>You have unsaved changes</Sandbar.Message>\n <Sandbar.Actions>\n <Sandbar.DiscardButton onClick={reset}>Discard</Sandbar.DiscardButton>\n <Sandbar.SaveButton onClick={save} isLoading={isPending}>Save</Sandbar.SaveButton>\n </Sandbar.Actions>\n</Sandbar.Root>\n```"
|
|
1750
|
+
],
|
|
1751
|
+
"siblings": [
|
|
1752
|
+
{
|
|
1753
|
+
"name": "Toast",
|
|
1754
|
+
"boundary": "the message reports something that already happened and goes away on its own."
|
|
1755
|
+
},
|
|
1756
|
+
{
|
|
1757
|
+
"name": "Alert",
|
|
1758
|
+
"boundary": "the message needs no decision and stays in the page."
|
|
1759
|
+
},
|
|
1760
|
+
{
|
|
1761
|
+
"name": "AlertDialog",
|
|
1762
|
+
"boundary": "one destructive action needs a confirmation before it runs."
|
|
1763
|
+
}
|
|
1764
|
+
],
|
|
1765
|
+
"useWhen": "Hold the unsaved changes of a form in a bar at the bottom of the page until the user saves or discards them.",
|
|
1766
|
+
"aliases": [
|
|
1767
|
+
"save bar",
|
|
1768
|
+
"contextual save bar",
|
|
1769
|
+
"unsaved changes"
|
|
978
1770
|
]
|
|
979
1771
|
},
|
|
980
1772
|
{
|
|
@@ -990,6 +1782,10 @@
|
|
|
990
1782
|
"jsdoc": "A container that prevents the click event from bubbling out of it.",
|
|
991
1783
|
"examples": [
|
|
992
1784
|
"```tsx\n<TableRow onClick={() => navigate(\"/somewhere\")}>\n <TableRowCell>\n <SandboxedOnClick allowClickEventDefault>\n <Anchor href=\"https://ngrok.com/docs\">\n See ngrok docs\n </Anchor>\n </SandboxedOnClick>\n </TableRowCell>\n</TableRow>\n```"
|
|
1785
|
+
],
|
|
1786
|
+
"useWhen": "Stop a click inside a region, such as a menu in a clickable table row, from reaching a click handler on an ancestor.",
|
|
1787
|
+
"aliases": [
|
|
1788
|
+
"stop propagation"
|
|
993
1789
|
]
|
|
994
1790
|
},
|
|
995
1791
|
{
|
|
@@ -1002,10 +1798,62 @@
|
|
|
1002
1798
|
"docsUrl": "https://mantle.ngrok.com/components/charts/scatter-plot",
|
|
1003
1799
|
"markdownUrl": "https://mantle.ngrok.com/components/charts/scatter-plot.md",
|
|
1004
1800
|
"summary": "A canvas-rendered scatter plot for correlating two continuous measures (three with the rotatable 3D projection).",
|
|
1005
|
-
"jsdoc": "A canvas-rendered scatter plot for correlating two measures
|
|
1801
|
+
"jsdoc": "A canvas-rendered scatter plot for correlating two measures, or three with the 3D projection (`zKey`), which renders a rotatable, depth-sorted point cloud (drag to orbit).",
|
|
1802
|
+
"examples": [
|
|
1803
|
+
"Composition:\n```\nScatterPlot.Root\n├── ScatterPlot.Grid\n├── ScatterPlot.XAxis\n├── ScatterPlot.YAxis\n├── ScatterPlot.Point (one per series)\n├── ScatterPlot.ReferenceLine\n├── ScatterPlot.Tooltip\n├── ScatterPlot.Legend\n└── ScatterPlot.CopyButton\n```\n\nA List groups Roots:\n```\nScatterPlot.List\n└── ScatterPlot.Root (one per chart)\n```",
|
|
1804
|
+
"```tsx\nconst data = [\n { latency: 12, throughputA: 840, throughputB: 720 },\n { latency: 28, throughputA: 610, throughputB: 590 },\n { latency: 45, throughputA: 340, throughputB: 410 },\n];\n\n<ScatterPlot.Root data={data} xKey=\"latency\" aria-label=\"Latency vs throughput\">\n <ScatterPlot.Grid />\n <ScatterPlot.XAxis />\n <ScatterPlot.YAxis />\n <ScatterPlot.Point dataKey=\"throughputA\" label=\"Region A\" color=\"blue\" />\n <ScatterPlot.Point dataKey=\"throughputB\" label=\"Region B\" color=\"emerald\" />\n <ScatterPlot.Tooltip />\n <ScatterPlot.Legend />\n</ScatterPlot.Root>\n```"
|
|
1805
|
+
],
|
|
1806
|
+
"siblings": [
|
|
1807
|
+
{
|
|
1808
|
+
"name": "LineChart",
|
|
1809
|
+
"boundary": "one measure trends across an ordered x axis, such as time."
|
|
1810
|
+
},
|
|
1811
|
+
{
|
|
1812
|
+
"name": "BarChart",
|
|
1813
|
+
"boundary": "values compare across categories."
|
|
1814
|
+
}
|
|
1815
|
+
],
|
|
1816
|
+
"useWhen": "Show how two measures correlate across many points, or three measures in a rotatable 3D view.",
|
|
1817
|
+
"aliases": [
|
|
1818
|
+
"scatter chart",
|
|
1819
|
+
"scatter graph"
|
|
1820
|
+
]
|
|
1821
|
+
},
|
|
1822
|
+
{
|
|
1823
|
+
"name": "Segmented Control",
|
|
1824
|
+
"slug": "components/forms/segmented-control",
|
|
1825
|
+
"kind": "component",
|
|
1826
|
+
"category": "Forms",
|
|
1827
|
+
"status": "stable",
|
|
1828
|
+
"importPath": "@ngrok/mantle/segmented-control",
|
|
1829
|
+
"docsUrl": "https://mantle.ngrok.com/components/forms/segmented-control",
|
|
1830
|
+
"markdownUrl": "https://mantle.ngrok.com/components/forms/segmented-control.md",
|
|
1831
|
+
"summary": "A row of segments that switches between a few short options, like a view or an environment. A raised thumb slides to the checked segment.",
|
|
1832
|
+
"jsdoc": "A row of segments that switches between a few short options, like a view or an environment.",
|
|
1006
1833
|
"examples": [
|
|
1007
|
-
"Composition:\n```\
|
|
1008
|
-
"```tsx\
|
|
1834
|
+
"Composition:\n```\nSegmentedControl.Root\n└── SegmentedControl.Item\n```",
|
|
1835
|
+
"```tsx\n<SegmentedControl.Root aria-label=\"Environment\" defaultValue=\"production\">\n <SegmentedControl.Item value=\"development\">Dev</SegmentedControl.Item>\n <SegmentedControl.Item value=\"staging\">Staging</SegmentedControl.Item>\n <SegmentedControl.Item value=\"production\">Prod</SegmentedControl.Item>\n</SegmentedControl.Root>\n```"
|
|
1836
|
+
],
|
|
1837
|
+
"siblings": [
|
|
1838
|
+
{
|
|
1839
|
+
"name": "RadioGroup",
|
|
1840
|
+
"boundary": "a form field whose options need a description, or stack in a column."
|
|
1841
|
+
},
|
|
1842
|
+
{
|
|
1843
|
+
"name": "Tabs",
|
|
1844
|
+
"boundary": "each option shows its own panel of content."
|
|
1845
|
+
},
|
|
1846
|
+
{
|
|
1847
|
+
"name": "Select",
|
|
1848
|
+
"boundary": "the set is long, or the row has little space."
|
|
1849
|
+
}
|
|
1850
|
+
],
|
|
1851
|
+
"useWhen": "Switch between a few short options, like a view or an environment, in one row.",
|
|
1852
|
+
"aliases": [
|
|
1853
|
+
"segmented button",
|
|
1854
|
+
"view switcher",
|
|
1855
|
+
"toggle group",
|
|
1856
|
+
"button group radio"
|
|
1009
1857
|
]
|
|
1010
1858
|
},
|
|
1011
1859
|
{
|
|
@@ -1017,14 +1865,34 @@
|
|
|
1017
1865
|
"importPath": "@ngrok/mantle/select",
|
|
1018
1866
|
"docsUrl": "https://mantle.ngrok.com/components/forms/select",
|
|
1019
1867
|
"markdownUrl": "https://mantle.ngrok.com/components/forms/select.md",
|
|
1020
|
-
"summary": "Displays a list of options for the user to pick from
|
|
1021
|
-
"jsdoc": "Displays a list of options for the user to pick from
|
|
1868
|
+
"summary": "Displays a list of options for the user to pick from, triggered by a button.",
|
|
1869
|
+
"jsdoc": "Displays a list of options for the user to pick from, triggered by a button.",
|
|
1022
1870
|
"examples": [
|
|
1023
1871
|
"Composition:\n```\nSelect.Root\n├── Select.Trigger\n│ └── Select.Value\n└── Select.Content\n ├── Select.Group\n │ ├── Select.Label\n │ └── Select.Item\n └── Select.Separator\n```",
|
|
1024
1872
|
"```tsx\n<Select.Root>\n <Select.Trigger>\n <Select.Value placeholder=\"Select a fruit\" />\n </Select.Trigger>\n <Select.Content>\n <Select.Group>\n <Select.Label>Fruits</Select.Label>\n <Select.Item value=\"apple\">Apple</Select.Item>\n <Select.Item value=\"banana\">Banana</Select.Item>\n <Select.Item value=\"cherry\">Cherry</Select.Item>\n </Select.Group>\n <Select.Separator />\n <Select.Group>\n <Select.Label>Veggies</Select.Label>\n <Select.Item value=\"carrot\">Carrot</Select.Item>\n <Select.Item value=\"cucumber\">Cucumber</Select.Item>\n </Select.Group>\n </Select.Content>\n</Select.Root>\n```"
|
|
1025
1873
|
],
|
|
1874
|
+
"siblings": [
|
|
1875
|
+
{
|
|
1876
|
+
"name": "Combobox",
|
|
1877
|
+
"boundary": "the list is long or loads from a server, and the user types to filter it."
|
|
1878
|
+
},
|
|
1879
|
+
{
|
|
1880
|
+
"name": "MultiSelect",
|
|
1881
|
+
"boundary": "the user picks several values."
|
|
1882
|
+
},
|
|
1883
|
+
{
|
|
1884
|
+
"name": "RadioGroup",
|
|
1885
|
+
"boundary": "the options are few and must all show at once."
|
|
1886
|
+
},
|
|
1887
|
+
{
|
|
1888
|
+
"name": "DropdownMenu",
|
|
1889
|
+
"boundary": "the list runs actions and sets no value."
|
|
1890
|
+
}
|
|
1891
|
+
],
|
|
1892
|
+
"useWhen": "Pick one value from a short, fixed list of options that needs no filter.",
|
|
1026
1893
|
"aliases": [
|
|
1027
|
-
"dropdown"
|
|
1894
|
+
"dropdown",
|
|
1895
|
+
"select box"
|
|
1028
1896
|
]
|
|
1029
1897
|
},
|
|
1030
1898
|
{
|
|
@@ -1037,10 +1905,25 @@
|
|
|
1037
1905
|
"docsUrl": "https://mantle.ngrok.com/components/data-display/selectable-list",
|
|
1038
1906
|
"markdownUrl": "https://mantle.ngrok.com/components/data-display/selectable-list.md",
|
|
1039
1907
|
"summary": "A filterable, multi-select grid of checkbox rows.",
|
|
1040
|
-
"jsdoc": "A filterable, multi-select **grid** of checkbox rows
|
|
1908
|
+
"jsdoc": "A filterable, multi-select **grid** of checkbox rows, the inline (non-popover) counterpart to `MultiSelect`/`Combobox`.",
|
|
1041
1909
|
"examples": [
|
|
1042
1910
|
"Composition:\n```\nSelectableList.Root\n├── SelectableList.Filter\n├── SelectableList.SelectAll\n├── SelectableList.Viewport (or .VirtualViewport)\n│ └── SelectableList.Item (optional render-prop; auto-rendered by default)\n│ ├── SelectableList.ItemTitle\n│ └── SelectableList.ItemDescription\n└── SelectableList.Empty\n```",
|
|
1043
1911
|
"```tsx\nconst options = accessKeys.map((key) => ({\n value: key.id,\n label: key.name,\n description: key.maskedToken,\n}));\n\n<SelectableList.Root options={options} value={selected} onValueChange={setSelected}>\n <SelectableList.Filter placeholder=\"Filter access keys…\" />\n <SelectableList.SelectAll>Select all</SelectableList.SelectAll>\n <SelectableList.Viewport aria-label=\"Access keys\" className=\"max-h-80\" />\n <SelectableList.Empty>No access keys found.</SelectableList.Empty>\n</SelectableList.Root>\n```"
|
|
1912
|
+
],
|
|
1913
|
+
"siblings": [
|
|
1914
|
+
{
|
|
1915
|
+
"name": "MultiSelect",
|
|
1916
|
+
"boundary": "the options open in a popover, and the picks show as tags."
|
|
1917
|
+
},
|
|
1918
|
+
{
|
|
1919
|
+
"name": "List",
|
|
1920
|
+
"boundary": "each row runs an action or navigates, with no selection."
|
|
1921
|
+
}
|
|
1922
|
+
],
|
|
1923
|
+
"useWhen": "Select several items from an inline, filterable list of checkbox rows, with no popover.",
|
|
1924
|
+
"aliases": [
|
|
1925
|
+
"checkbox list",
|
|
1926
|
+
"checklist"
|
|
1044
1927
|
]
|
|
1045
1928
|
},
|
|
1046
1929
|
{
|
|
@@ -1071,7 +1954,12 @@
|
|
|
1071
1954
|
"boundary": "the content is key and value pairs, which carry their own rows."
|
|
1072
1955
|
}
|
|
1073
1956
|
],
|
|
1074
|
-
"useWhen": "Divide adjacent content without a box, in a row or in a column."
|
|
1957
|
+
"useWhen": "Divide adjacent content without a box, in a row or in a column. To put a text label in the middle or at one end of a horizontal divider, wrap the label and the separators in a `HorizontalSeparatorGroup`.",
|
|
1958
|
+
"aliases": [
|
|
1959
|
+
"divider",
|
|
1960
|
+
"horizontal rule",
|
|
1961
|
+
"hr"
|
|
1962
|
+
]
|
|
1075
1963
|
},
|
|
1076
1964
|
{
|
|
1077
1965
|
"name": "Sheet",
|
|
@@ -1089,9 +1977,26 @@
|
|
|
1089
1977
|
"```tsx\n// Triggering a stateful sheet\n<Sheet.Root>\n <Sheet.Trigger asChild>\n <Button type=\"button\" appearance=\"filled\" intent=\"neutral\">\n Open Sheet\n </Button>\n </Sheet.Trigger>\n <Sheet.Content>\n <Sheet.Header>\n <Sheet.TitleGroup>\n <Sheet.Title>Are you absolutely sure?</Sheet.Title>\n <Sheet.Actions>\n <IconButton\n appearance=\"ghost\"\n intent=\"neutral\"\n type=\"button\"\n icon={<TrashSimple />}\n label=\"Delete\"\n />\n <Separator orientation=\"vertical\" className=\"h-[80%]\" />\n <Sheet.CloseIconButton />\n </Sheet.Actions>\n </Sheet.TitleGroup>\n <Sheet.Description>\n This action cannot be undone. This will permanently delete your account and remove your data from our servers.\n </Sheet.Description>\n </Sheet.Header>\n <Sheet.Body>\n <p>\n Consequat do voluptate culpa fugiat consequat nostrud duis\n aliqua minim. Tempor voluptate cillum elit velit. Voluptate\n aliqua ipsum aliqua dolore in nisi ea fugiat aliqua velit\n proident amet.\n </p>\n </Sheet.Body>\n <Sheet.Footer>\n <Sheet.Close asChild>\n <Button type=\"button\" appearance=\"outlined\" intent=\"neutral\">Close</Button>\n </Sheet.Close>\n <Button type=\"button\" appearance=\"filled\" intent=\"neutral\">\n Save\n </Button>\n </Sheet.Footer>\n </Sheet.Content>\n</Sheet.Root>\n```",
|
|
1090
1978
|
"```tsx\n// Sheet without a trigger (e.g. router controlled)\n<Sheet.Root open onOpenChange={() => onClose()}>\n <Sheet.Content>\n <Sheet.Header>\n <Sheet.TitleGroup>\n <Sheet.Title>Are you absolutely sure?</Sheet.Title>\n <Sheet.Actions>\n <IconButton\n appearance=\"ghost\"\n intent=\"neutral\"\n type=\"button\"\n icon={<TrashSimple />}\n label=\"Delete\"\n />\n <Separator orientation=\"vertical\" className=\"h-[80%]\" />\n <Sheet.CloseIconButton />\n </Sheet.Actions>\n </Sheet.TitleGroup>\n <Sheet.Description>\n This action cannot be undone. This will permanently delete your account and remove your data from our servers.\n </Sheet.Description>\n </Sheet.Header>\n <Sheet.Body>\n <p>\n Consequat do voluptate culpa fugiat consequat nostrud duis\n aliqua minim. Tempor voluptate cillum elit velit. Voluptate\n aliqua ipsum aliqua dolore in nisi ea fugiat aliqua velit\n proident amet.\n </p>\n </Sheet.Body>\n <Sheet.Footer>\n <Sheet.Close asChild>\n <Button type=\"button\" appearance=\"outlined\" intent=\"neutral\">Close</Button>\n </Sheet.Close>\n <Button type=\"button\" appearance=\"filled\" intent=\"neutral\">\n Save\n </Button>\n </Sheet.Footer>\n </Sheet.Content>\n</Sheet.Root>\n```"
|
|
1091
1979
|
],
|
|
1980
|
+
"siblings": [
|
|
1981
|
+
{
|
|
1982
|
+
"name": "Dialog",
|
|
1983
|
+
"boundary": "the task fits a centered modal window."
|
|
1984
|
+
},
|
|
1985
|
+
{
|
|
1986
|
+
"name": "AlertDialog",
|
|
1987
|
+
"boundary": "the user must confirm a destructive or irreversible action."
|
|
1988
|
+
},
|
|
1989
|
+
{
|
|
1990
|
+
"name": "Sidebar",
|
|
1991
|
+
"boundary": "the panel holds the persistent navigation of the app."
|
|
1992
|
+
}
|
|
1993
|
+
],
|
|
1994
|
+
"useWhen": "Open a panel from the edge of the screen for a task beside the current view, such as a filter panel, a detail view, or a mobile menu.",
|
|
1092
1995
|
"aliases": [
|
|
1093
1996
|
"drawer",
|
|
1094
|
-
"side panel"
|
|
1997
|
+
"side panel",
|
|
1998
|
+
"offcanvas",
|
|
1999
|
+
"slide over"
|
|
1095
2000
|
]
|
|
1096
2001
|
},
|
|
1097
2002
|
{
|
|
@@ -1104,10 +2009,30 @@
|
|
|
1104
2009
|
"docsUrl": "https://mantle.ngrok.com/components/navigation/sidebar",
|
|
1105
2010
|
"markdownUrl": "https://mantle.ngrok.com/components/navigation/sidebar.md",
|
|
1106
2011
|
"summary": "A composable, collapsible app-navigation sidebar with a mobile sheet presentation and a trigger that mounts anywhere in your app shell.",
|
|
1107
|
-
"jsdoc": "A composable, collapsible app-navigation sidebar. `Sidebar.Root` owns the state (no DOM)
|
|
2012
|
+
"jsdoc": "A composable, collapsible app-navigation sidebar. `Sidebar.Root` owns the state (no DOM). `Sidebar.Nav` renders the panel: inline on desktop, collapsing to a skinny icon rail, and a left-side `Sheet` below the root's `mobileBreakpoint`. `Sidebar.Trigger` toggles it from anywhere under the root (typically an `AppLayout.Header`).",
|
|
1108
2013
|
"examples": [
|
|
1109
2014
|
"Composition:\n```\nSidebar.Root\n├── Sidebar.Nav\n│ ├── Sidebar.Header\n│ │ └── Sidebar.SwitcherTrigger\n│ ├── Sidebar.Body\n│ │ ├── Sidebar.SearchTrigger\n│ │ └── Sidebar.Group\n│ │ ├── Sidebar.GroupLabel\n│ │ └── Sidebar.List\n│ │ └── Sidebar.Item\n│ │ └── Sidebar.Tooltip\n│ │ └── Sidebar.ItemButton\n│ └── Sidebar.Footer\n│ ├── Sidebar.ItemButton\n│ ├── Sidebar.Separator\n│ └── Sidebar.SwitcherTrigger\n└── Sidebar.Trigger\n```",
|
|
1110
2015
|
"```tsx\n<Sidebar.Root>\n <Sidebar.Nav aria-label=\"Main\">\n <Sidebar.Header>\n <DropdownMenu.Root>\n <DropdownMenu.Trigger asChild>\n <Sidebar.SwitcherTrigger>\n <GlobeIcon />\n <span className=\"text-strong min-w-0 flex-1 truncate text-base\">Universal Gateway</span>\n <CaretDownIcon className=\"text-muted size-4 shrink-0\" />\n </Sidebar.SwitcherTrigger>\n </DropdownMenu.Trigger>\n <DropdownMenu.Content width=\"trigger\" className=\"min-w-(--sidebar-row-width)\">…</DropdownMenu.Content>\n </DropdownMenu.Root>\n </Sidebar.Header>\n <Sidebar.Body>\n <Sidebar.Group>\n <Sidebar.GroupLabel>Traffic</Sidebar.GroupLabel>\n <Sidebar.List>\n <Sidebar.Item>\n <Sidebar.ItemButton asChild current>\n <a href=\"/endpoints\">\n <GraphIcon />\n Endpoints\n </a>\n </Sidebar.ItemButton>\n </Sidebar.Item>\n </Sidebar.List>\n </Sidebar.Group>\n </Sidebar.Body>\n <Sidebar.Footer>\n <Sidebar.Separator />\n <DropdownMenu.Root>\n <DropdownMenu.Trigger asChild>\n <Sidebar.SwitcherTrigger>\n <Avatar.Root appearance=\"square\" colorSeed=\"acc_123\">\n <Avatar.Fallback name=\"Acme Corp\" />\n </Avatar.Root>\n <span className=\"text-strong min-w-0 flex-1 truncate text-sm font-medium\">Acme Corp</span>\n </Sidebar.SwitcherTrigger>\n </DropdownMenu.Trigger>\n <DropdownMenu.Content width=\"trigger\" className=\"min-w-(--sidebar-row-width)\">…</DropdownMenu.Content>\n </DropdownMenu.Root>\n </Sidebar.Footer>\n </Sidebar.Nav>\n <Sidebar.Trigger />\n</Sidebar.Root>\n```"
|
|
2016
|
+
],
|
|
2017
|
+
"siblings": [
|
|
2018
|
+
{
|
|
2019
|
+
"name": "Tabs",
|
|
2020
|
+
"boundary": "the user switches between views inside one page."
|
|
2021
|
+
},
|
|
2022
|
+
{
|
|
2023
|
+
"name": "Sheet",
|
|
2024
|
+
"boundary": "a panel opens over the page for a task, not for navigation."
|
|
2025
|
+
},
|
|
2026
|
+
{
|
|
2027
|
+
"name": "Breadcrumb",
|
|
2028
|
+
"boundary": "the page shows where it sits in a hierarchy."
|
|
2029
|
+
}
|
|
2030
|
+
],
|
|
2031
|
+
"useWhen": "Show the main navigation of an app, with its app and account switchers, in a column that collapses to an icon rail, and to a sheet on small screens.",
|
|
2032
|
+
"aliases": [
|
|
2033
|
+
"side nav",
|
|
2034
|
+
"side navigation",
|
|
2035
|
+
"navigation drawer"
|
|
1111
2036
|
]
|
|
1112
2037
|
},
|
|
1113
2038
|
{
|
|
@@ -1119,10 +2044,26 @@
|
|
|
1119
2044
|
"importPath": "@ngrok/mantle/skeleton",
|
|
1120
2045
|
"docsUrl": "https://mantle.ngrok.com/components/feedback/skeleton",
|
|
1121
2046
|
"markdownUrl": "https://mantle.ngrok.com/components/feedback/skeleton.md",
|
|
1122
|
-
"summary": "Use to show a placeholder while content is loading.",
|
|
2047
|
+
"summary": "Use Skeleton to show a placeholder while content is loading.",
|
|
1123
2048
|
"jsdoc": "A skeleton is a placeholder for content that is loading.",
|
|
1124
2049
|
"examples": [
|
|
1125
2050
|
"```tsx\nimport { Skeleton } from \"@ngrok/mantle/skeleton\";\n\n// Text-line placeholder.\n<Skeleton className=\"w-1/2\" />\n\n// Avatar placeholder.\n<Skeleton className=\"h-12 w-12 rounded-full\" />\n\n// Announce loading state to assistive tech.\n<div role=\"status\" aria-live=\"polite\">\n <span className=\"sr-only\">Loading profile…</span>\n <Skeleton className=\"h-12 w-12 rounded-full\" />\n</div>\n```"
|
|
2051
|
+
],
|
|
2052
|
+
"siblings": [
|
|
2053
|
+
{
|
|
2054
|
+
"name": "Empty",
|
|
2055
|
+
"boundary": "the region loaded and has no data, no results, or no access to show."
|
|
2056
|
+
},
|
|
2057
|
+
{
|
|
2058
|
+
"name": "ProgressBar",
|
|
2059
|
+
"boundary": "a task shows how much of it is complete."
|
|
2060
|
+
}
|
|
2061
|
+
],
|
|
2062
|
+
"useWhen": "Hold the place of content while it loads, in the shape that the content will take.",
|
|
2063
|
+
"aliases": [
|
|
2064
|
+
"shimmer",
|
|
2065
|
+
"loading placeholder",
|
|
2066
|
+
"content loader"
|
|
1126
2067
|
]
|
|
1127
2068
|
},
|
|
1128
2069
|
{
|
|
@@ -1138,6 +2079,21 @@
|
|
|
1138
2079
|
"jsdoc": "A visually-hidden-until-focused \"skip link\" that lets keyboard users jump past repeated navigation and land directly on the page's main content landmark.",
|
|
1139
2080
|
"examples": [
|
|
1140
2081
|
"```tsx\n<SkipToMainLink />\n<Header />\n<Main>\n <h1>Page title</h1>\n</Main>\n```"
|
|
2082
|
+
],
|
|
2083
|
+
"siblings": [
|
|
2084
|
+
{
|
|
2085
|
+
"name": "Main",
|
|
2086
|
+
"boundary": "the page needs the focusable `<main>` landmark that the link targets."
|
|
2087
|
+
},
|
|
2088
|
+
{
|
|
2089
|
+
"name": "VisuallyHidden",
|
|
2090
|
+
"boundary": "the hidden content is text for screen readers, not a link."
|
|
2091
|
+
}
|
|
2092
|
+
],
|
|
2093
|
+
"useWhen": "Let keyboard users jump past repeated navigation to the main content of the page.",
|
|
2094
|
+
"aliases": [
|
|
2095
|
+
"skip link",
|
|
2096
|
+
"skip nav"
|
|
1141
2097
|
]
|
|
1142
2098
|
},
|
|
1143
2099
|
{
|
|
@@ -1155,6 +2111,17 @@
|
|
|
1155
2111
|
"```tsx\n// single thumb\n<Slider\n aria-label=\"Volume\"\n defaultValue={75}\n max={100}\n step={1}\n/>\n```",
|
|
1156
2112
|
"```tsx\n// range\n <Slider\n aria-label=\"Price\"\n defaultValue={[25, 50]}\n max={100}\n step={5}\n />\n```",
|
|
1157
2113
|
"```tsx\n// multiple thumbs\n<Slider\n aria-label=\"Breakpoint\"\n defaultValue={[10, 20, 70]}\n max={100}\n step={10}\n />\n```"
|
|
2114
|
+
],
|
|
2115
|
+
"siblings": [
|
|
2116
|
+
{
|
|
2117
|
+
"name": "Input",
|
|
2118
|
+
"boundary": "the user types an exact number."
|
|
2119
|
+
}
|
|
2120
|
+
],
|
|
2121
|
+
"useWhen": "Pick a number, or a range between two numbers, with a thumb that moves along a track.",
|
|
2122
|
+
"aliases": [
|
|
2123
|
+
"range slider",
|
|
2124
|
+
"range input"
|
|
1158
2125
|
]
|
|
1159
2126
|
},
|
|
1160
2127
|
{
|
|
@@ -1170,6 +2137,11 @@
|
|
|
1170
2137
|
"jsdoc": "Merges its props onto its immediate child.",
|
|
1171
2138
|
"examples": [
|
|
1172
2139
|
"```tsx\n<Slot className=\"custom-class\">\n <a href=\"/\">Home</a>\n</Slot>\n```"
|
|
2140
|
+
],
|
|
2141
|
+
"useWhen": "Merge the props of a part onto its one child element, to build an `asChild` prop.",
|
|
2142
|
+
"aliases": [
|
|
2143
|
+
"as child",
|
|
2144
|
+
"polymorphic"
|
|
1173
2145
|
]
|
|
1174
2146
|
},
|
|
1175
2147
|
{
|
|
@@ -1186,6 +2158,22 @@
|
|
|
1186
2158
|
"examples": [
|
|
1187
2159
|
"Composition:\n```\nSplitButton.Root\n├── SplitButton.PrimaryAction\n├── SplitButton.MenuTrigger\n└── SplitButton.MenuContent\n └── SplitButton.MenuItem\n```",
|
|
1188
2160
|
"```tsx\n<SplitButton.Root>\n <SplitButton.PrimaryAction icon={<CopyIcon />} onClick={copyMarkdownPage}>\n Copy page\n </SplitButton.PrimaryAction>\n <SplitButton.MenuTrigger label=\"Open doc actions menu\" />\n <SplitButton.MenuContent>\n <SplitButton.MenuItem onClick={copyMarkdownPage}>\n <Icon svg={<CopyIcon />} />\n Copy page\n </SplitButton.MenuItem>\n <SplitButton.MenuItem asChild onClick={copyMarkdownPage}>\n <a href={markdownUrl} target=\"_blank\" rel=\"noopener noreferrer\">\n <Icon svg={<FileTextIcon />} />\n View as Markdown\n </a>\n </SplitButton.MenuItem>\n </SplitButton.MenuContent>\n</SplitButton.Root>\n```"
|
|
2161
|
+
],
|
|
2162
|
+
"siblings": [
|
|
2163
|
+
{
|
|
2164
|
+
"name": "Button",
|
|
2165
|
+
"boundary": "the control runs one action, with no alternatives."
|
|
2166
|
+
},
|
|
2167
|
+
{
|
|
2168
|
+
"name": "DropdownMenu",
|
|
2169
|
+
"boundary": "the button only opens a menu and runs no default action."
|
|
2170
|
+
}
|
|
2171
|
+
],
|
|
2172
|
+
"useWhen": "Run a default action on one click, and offer related alternatives in an attached menu.",
|
|
2173
|
+
"aliases": [
|
|
2174
|
+
"dropdown button",
|
|
2175
|
+
"split dropdown",
|
|
2176
|
+
"combo button"
|
|
1189
2177
|
]
|
|
1190
2178
|
},
|
|
1191
2179
|
{
|
|
@@ -1197,11 +2185,30 @@
|
|
|
1197
2185
|
"importPath": "@ngrok/mantle/strata",
|
|
1198
2186
|
"docsUrl": "https://mantle.ngrok.com/components/structure/strata",
|
|
1199
2187
|
"markdownUrl": "https://mantle.ngrok.com/components/structure/strata.md",
|
|
1200
|
-
"summary": "A page of titled sections, each one explained beside its content
|
|
2188
|
+
"summary": "A page of titled sections, each one explained beside its content: the shape of a settings page or a configuration editor.",
|
|
1201
2189
|
"jsdoc": "A page of titled sections, each one explained beside its content.",
|
|
1202
2190
|
"examples": [
|
|
1203
2191
|
"Composition:\n```\nStrata.Root\n└── Strata.Section\n ├── Strata.Header\n │ ├── Strata.Title\n │ └── Strata.Description\n └── Strata.Body\n```",
|
|
1204
2192
|
"```tsx\n<Strata.Root>\n <Strata.Section>\n <Strata.Header>\n <Strata.Title>Providers</Strata.Title>\n <Strata.Description>What providers keys may call.</Strata.Description>\n </Strata.Header>\n <Strata.Body>\n <ProviderScopePicker />\n </Strata.Body>\n </Strata.Section>\n <Strata.Section>\n <Strata.Header>\n <Strata.Title>Routing rules</Strata.Title>\n <Strata.Description>Define how requests are authenticated.</Strata.Description>\n </Strata.Header>\n <Strata.Body>\n <RoutingRuleList />\n </Strata.Body>\n </Strata.Section>\n</Strata.Root>\n```"
|
|
2193
|
+
],
|
|
2194
|
+
"siblings": [
|
|
2195
|
+
{
|
|
2196
|
+
"name": "Card",
|
|
2197
|
+
"boundary": "a group needs a raised surface of its own."
|
|
2198
|
+
},
|
|
2199
|
+
{
|
|
2200
|
+
"name": "MediaObject",
|
|
2201
|
+
"boundary": "the thing beside the text is an image or an icon."
|
|
2202
|
+
},
|
|
2203
|
+
{
|
|
2204
|
+
"name": "DescriptionList",
|
|
2205
|
+
"boundary": "the pairs are read-only label and value data, not headed sections."
|
|
2206
|
+
}
|
|
2207
|
+
],
|
|
2208
|
+
"useWhen": "Lay out a settings page or a configuration editor as titled sections, each one explained beside its controls.",
|
|
2209
|
+
"aliases": [
|
|
2210
|
+
"settings page",
|
|
2211
|
+
"settings layout"
|
|
1205
2212
|
]
|
|
1206
2213
|
},
|
|
1207
2214
|
{
|
|
@@ -1213,13 +2220,29 @@
|
|
|
1213
2220
|
"importPath": "@ngrok/mantle/switch",
|
|
1214
2221
|
"docsUrl": "https://mantle.ngrok.com/components/forms/switch",
|
|
1215
2222
|
"markdownUrl": "https://mantle.ngrok.com/components/forms/switch.md",
|
|
1216
|
-
"summary": "A form control that toggles one setting on or off.
|
|
2223
|
+
"summary": "A form control that toggles one setting on or off.",
|
|
1217
2224
|
"jsdoc": "A form control that toggles one setting on or off.",
|
|
1218
2225
|
"examples": [
|
|
1219
2226
|
"```tsx\n<form>\n <Label htmlFor=\"airplane-mode\" className=\"flex items-center gap-2\">\n Airplane Mode\n <Switch name=\"airplane-mode\" id=\"airplane-mode\" />\n </Label>\n</form>\n```"
|
|
1220
2227
|
],
|
|
2228
|
+
"siblings": [
|
|
2229
|
+
{
|
|
2230
|
+
"name": "Checkbox",
|
|
2231
|
+
"boundary": "the option needs an indeterminate state."
|
|
2232
|
+
},
|
|
2233
|
+
{
|
|
2234
|
+
"name": "Choice",
|
|
2235
|
+
"boundary": "the switch needs a title and a description beside it."
|
|
2236
|
+
},
|
|
2237
|
+
{
|
|
2238
|
+
"name": "ThemeSwitcher",
|
|
2239
|
+
"boundary": "the setting is the light or dark theme."
|
|
2240
|
+
}
|
|
2241
|
+
],
|
|
2242
|
+
"useWhen": "Turn one setting on or off, such as a feature toggle in a settings list.",
|
|
1221
2243
|
"aliases": [
|
|
1222
|
-
"toggle"
|
|
2244
|
+
"toggle",
|
|
2245
|
+
"toggle switch"
|
|
1223
2246
|
]
|
|
1224
2247
|
},
|
|
1225
2248
|
{
|
|
@@ -1232,10 +2255,25 @@
|
|
|
1232
2255
|
"docsUrl": "https://mantle.ngrok.com/components/data-display/table",
|
|
1233
2256
|
"markdownUrl": "https://mantle.ngrok.com/components/data-display/table.md",
|
|
1234
2257
|
"summary": "A structured way to display data in rows and columns.",
|
|
1235
|
-
"jsdoc": "Use `Table` for STATIC, layout-driven tabular data
|
|
2258
|
+
"jsdoc": "Use `Table` for STATIC, layout-driven tabular data: read-only data dumps, simple key/value displays, plain markup tables.",
|
|
1236
2259
|
"examples": [
|
|
1237
2260
|
"Composition:\n```\nTable.Root\n└── Table.Element\n ├── Table.Caption\n ├── Table.Head\n │ └── Table.Row\n │ └── Table.Header\n ├── Table.Body\n │ └── Table.Row\n │ └── Table.Cell\n └── Table.Foot\n```",
|
|
1238
2261
|
"```tsx\n<Table.Root>\n <Table.Element>\n <Table.Caption>A list of your recent invoices.</Table.Caption>\n <Table.Head>\n <Table.Row>\n <Table.Header className=\"w-25\">Invoice</Table.Header>\n <Table.Header>Status</Table.Header>\n <Table.Header>Method</Table.Header>\n <Table.Header className=\"text-right\">Amount</Table.Header>\n </Table.Row>\n </Table.Head>\n <Table.Body>\n {invoices.map((invoice) => (\n <Table.Row key={invoice.invoice}>\n <Table.Cell className=\"font-medium\">{invoice.invoice}</Table.Cell>\n <Table.Cell>{invoice.paymentStatus}</Table.Cell>\n <Table.Cell>{invoice.paymentMethod}</Table.Cell>\n <Table.Cell className=\"text-right\">{invoice.totalAmount}</Table.Cell>\n </Table.Row>\n ))}\n </Table.Body>\n <Table.Foot>\n <Table.Row>\n <Table.Cell colSpan={3}>Total</Table.Cell>\n <Table.Cell className=\"text-right\">$2,500.00</Table.Cell>\n </Table.Row>\n </Table.Foot>\n </Table.Element>\n</Table.Root>\n```"
|
|
2262
|
+
],
|
|
2263
|
+
"siblings": [
|
|
2264
|
+
{
|
|
2265
|
+
"name": "DataTable",
|
|
2266
|
+
"boundary": "the user sorts, filters, pages through, or selects the rows."
|
|
2267
|
+
},
|
|
2268
|
+
{
|
|
2269
|
+
"name": "DescriptionList",
|
|
2270
|
+
"boundary": "one record shows as label and value pairs."
|
|
2271
|
+
}
|
|
2272
|
+
],
|
|
2273
|
+
"useWhen": "Show static rows and columns of data, such as a read-only data dump, with no sorting, filtering, or pagination.",
|
|
2274
|
+
"aliases": [
|
|
2275
|
+
"html table",
|
|
2276
|
+
"basic table"
|
|
1239
2277
|
]
|
|
1240
2278
|
},
|
|
1241
2279
|
{
|
|
@@ -1252,6 +2290,22 @@
|
|
|
1252
2290
|
"examples": [
|
|
1253
2291
|
"Composition:\n```\nTabs.Root\n├── Tabs.List\n│ └── Tabs.Trigger\n│ └── Tabs.Badge\n├── Tabs.Separator\n└── Tabs.Content\n```",
|
|
1254
2292
|
"```tsx\n<Tabs.Root defaultValue=\"account\">\n <Tabs.List>\n <Tabs.Trigger value=\"account\">Account</Tabs.Trigger>\n <Tabs.Trigger value=\"password\">Password</Tabs.Trigger>\n </Tabs.List>\n <Tabs.Separator />\n <Tabs.Content value=\"account\">\n <p>Make changes to your account here.</p>\n </Tabs.Content>\n <Tabs.Content value=\"password\">\n <p>Change your password here.</p>\n </Tabs.Content>\n</Tabs.Root>\n```"
|
|
2293
|
+
],
|
|
2294
|
+
"siblings": [
|
|
2295
|
+
{
|
|
2296
|
+
"name": "Accordion",
|
|
2297
|
+
"boundary": "several sections stack, and each one expands in place."
|
|
2298
|
+
},
|
|
2299
|
+
{
|
|
2300
|
+
"name": "RadioGroup",
|
|
2301
|
+
"boundary": "the user picks a form value, not a view."
|
|
2302
|
+
}
|
|
2303
|
+
],
|
|
2304
|
+
"useWhen": "Switch between peer views of related content in one place, with one view visible at a time.",
|
|
2305
|
+
"aliases": [
|
|
2306
|
+
"tab bar",
|
|
2307
|
+
"tab list",
|
|
2308
|
+
"tab strip"
|
|
1255
2309
|
]
|
|
1256
2310
|
},
|
|
1257
2311
|
{
|
|
@@ -1267,6 +2321,17 @@
|
|
|
1267
2321
|
"jsdoc": "A multi-line plain-text editing control, useful when you want to allow users to enter a sizeable amount of free-form text, for example a comment on a review or feedback form.",
|
|
1268
2322
|
"examples": [
|
|
1269
2323
|
"```tsx\n<form>\n <div>\n <Label htmlFor=\"feedback\">Feedback:</Label>\n <TextArea\n id=\"feedback\"\n name=\"feedback\"\n placeholder=\"Enter your feedback here\"\n />\n </div>\n</form>\n```"
|
|
2324
|
+
],
|
|
2325
|
+
"siblings": [
|
|
2326
|
+
{
|
|
2327
|
+
"name": "Input",
|
|
2328
|
+
"boundary": "the text fits on one line."
|
|
2329
|
+
}
|
|
2330
|
+
],
|
|
2331
|
+
"useWhen": "Accept several lines of free-form text, such as a comment or a description.",
|
|
2332
|
+
"aliases": [
|
|
2333
|
+
"multiline input",
|
|
2334
|
+
"multiline text field"
|
|
1270
2335
|
]
|
|
1271
2336
|
},
|
|
1272
2337
|
{
|
|
@@ -1279,7 +2344,18 @@
|
|
|
1279
2344
|
"docsUrl": "https://mantle.ngrok.com/components/primitives/theme",
|
|
1280
2345
|
"markdownUrl": "https://mantle.ngrok.com/components/primitives/theme.md",
|
|
1281
2346
|
"summary": "Theme primitives (ThemeProvider and FOUC prevention) for light and dark modes that follow the OS by default.",
|
|
1282
|
-
"jsdoc": "Re-exports for the Theme component
|
|
2347
|
+
"jsdoc": "Re-exports for the Theme component: the provider and hooks that carry the applied theme, plus the document tags that stop a wrong-theme flash.",
|
|
2348
|
+
"siblings": [
|
|
2349
|
+
{
|
|
2350
|
+
"name": "ThemeSwitcher",
|
|
2351
|
+
"boundary": "the user changes the theme from a control in the UI."
|
|
2352
|
+
}
|
|
2353
|
+
],
|
|
2354
|
+
"useWhen": "Apply the light or dark theme to an app, follow the operating system by default, and stop a wrong-theme flash on load.",
|
|
2355
|
+
"aliases": [
|
|
2356
|
+
"theme provider",
|
|
2357
|
+
"color scheme"
|
|
2358
|
+
]
|
|
1283
2359
|
},
|
|
1284
2360
|
{
|
|
1285
2361
|
"name": "Theme Switcher",
|
|
@@ -1295,6 +2371,18 @@
|
|
|
1295
2371
|
"examples": [
|
|
1296
2372
|
"```tsx\n<ThemeProvider>\n <header>\n <ThemeSwitcher />\n </header>\n</ThemeProvider>\n```",
|
|
1297
2373
|
"```tsx\n<ThemeSwitcher appearance=\"outlined\" label=\"Cambiar tema\" />\n```"
|
|
2374
|
+
],
|
|
2375
|
+
"siblings": [
|
|
2376
|
+
{
|
|
2377
|
+
"name": "Switch",
|
|
2378
|
+
"boundary": "the toggle controls a setting other than the theme."
|
|
2379
|
+
}
|
|
2380
|
+
],
|
|
2381
|
+
"useWhen": "Let the user switch between light and dark mode from a header, a toolbar, or an account menu.",
|
|
2382
|
+
"aliases": [
|
|
2383
|
+
"theme toggle",
|
|
2384
|
+
"dark mode toggle",
|
|
2385
|
+
"color mode toggle"
|
|
1298
2386
|
]
|
|
1299
2387
|
},
|
|
1300
2388
|
{
|
|
@@ -1312,9 +2400,26 @@
|
|
|
1312
2400
|
"Composition:\n```\nToast.Root\n├── Toast.Icon\n├── Toast.Message\n└── Toast.Action\n```",
|
|
1313
2401
|
"```tsx\nmakeToast(\n <Toast.Root intent=\"success\">\n <Toast.Icon />\n <Toast.Message>Operation completed successfully!</Toast.Message>\n <Toast.Action>Dismiss</Toast.Action>\n </Toast.Root>\n);\n```"
|
|
1314
2402
|
],
|
|
2403
|
+
"siblings": [
|
|
2404
|
+
{
|
|
2405
|
+
"name": "Alert",
|
|
2406
|
+
"boundary": "the message stays in the page next to the content it describes."
|
|
2407
|
+
},
|
|
2408
|
+
{
|
|
2409
|
+
"name": "AlertDialog",
|
|
2410
|
+
"boundary": "the user must respond before they continue."
|
|
2411
|
+
},
|
|
2412
|
+
{
|
|
2413
|
+
"name": "Sandbar",
|
|
2414
|
+
"boundary": "the message waits for the user to save or discard pending changes."
|
|
2415
|
+
}
|
|
2416
|
+
],
|
|
2417
|
+
"useWhen": "Report the result of an action, such as a save or a copy, in a brief message that goes away on its own.",
|
|
1315
2418
|
"aliases": [
|
|
1316
2419
|
"notification",
|
|
1317
|
-
"snackbar"
|
|
2420
|
+
"snackbar",
|
|
2421
|
+
"toaster",
|
|
2422
|
+
"flash message"
|
|
1318
2423
|
]
|
|
1319
2424
|
},
|
|
1320
2425
|
{
|
|
@@ -1331,6 +2436,20 @@
|
|
|
1331
2436
|
"examples": [
|
|
1332
2437
|
"Composition:\n```\nTooltip.Root\n├── Tooltip.Trigger\n└── Tooltip.Content\n```",
|
|
1333
2438
|
"```tsx\n<Tooltip.Root>\n <Tooltip.Trigger asChild>\n <Button type=\"button\" appearance=\"outlined\" intent=\"neutral\">\n Hover me\n </Button>\n </Tooltip.Trigger>\n <Tooltip.Content>\n This is a tooltip\n </Tooltip.Content>\n</Tooltip.Root>\n```"
|
|
2439
|
+
],
|
|
2440
|
+
"siblings": [
|
|
2441
|
+
{
|
|
2442
|
+
"name": "Popover",
|
|
2443
|
+
"boundary": "the content is interactive, such as a form or a settings menu."
|
|
2444
|
+
},
|
|
2445
|
+
{
|
|
2446
|
+
"name": "HoverCard",
|
|
2447
|
+
"boundary": "the content is a rich preview of a link."
|
|
2448
|
+
}
|
|
2449
|
+
],
|
|
2450
|
+
"useWhen": "Show a short, non-interactive hint for an element on hover or focus, such as the meaning of an icon button.",
|
|
2451
|
+
"aliases": [
|
|
2452
|
+
"hint"
|
|
1334
2453
|
]
|
|
1335
2454
|
},
|
|
1336
2455
|
{
|
|
@@ -1342,7 +2461,7 @@
|
|
|
1342
2461
|
"importPath": "@ngrok/mantle/truncated-text",
|
|
1343
2462
|
"docsUrl": "https://mantle.ngrok.com/components/data-display/truncated-text",
|
|
1344
2463
|
"markdownUrl": "https://mantle.ngrok.com/components/data-display/truncated-text.md",
|
|
1345
|
-
"summary": "Renders one long opaque value on a single line and keeps its tail visible when it overflows.",
|
|
2464
|
+
"summary": "Renders one long opaque value, such as a URL, a resource ID, a container image reference, or a token, on a single line and keeps its tail visible when it overflows.",
|
|
1346
2465
|
"jsdoc": "Renders one long opaque value (a URL, a resource ID, an image reference, a token) on a single line.",
|
|
1347
2466
|
"examples": [
|
|
1348
2467
|
"```tsx\nimport { TruncatedText } from \"@ngrok/mantle/truncated-text\";\n\n// A URL whose last path segment tells it apart from its neighbors.\n<TruncatedText\n className=\"font-mono text-sm\"\n value=\"https://example.ngrok.app/api/items?filter=%7B%22name%22%3A%22x%22%7D&limit=200\"\n/>\n\n// Keep the six characters that tell two IDs apart.\n<TruncatedText className=\"font-mono text-sm\" tail={6} value=\"ep_2abcdEFGhijKL123456\" />\n\n// Show an ID as its type prefix, an ellipsis, and its last eight characters.\n<TruncatedText className=\"font-mono text-sm\" head={4} value=\"mem_21h80N9qQuAmhSB8nlTA8KImPbQ\" />\n\n// Mute the type prefix and the ellipsis, and keep the tail at body color.\n<TruncatedText\n className=\"font-mono text-sm *:data-[slot=truncated-text-head]:text-muted *:data-[slot=truncated-text-tail]:text-body\"\n head={4}\n value=\"mem_21h80N9qQuAmhSB8nlTA8KImPbQ\"\n/>\n\n// As a <code> element.\n<TruncatedText asChild tail={12} value=\"ghcr.io/ngrok/ngrok-operator:0.14.0\">\n <code />\n</TruncatedText>\n```"
|
|
@@ -1357,7 +2476,12 @@
|
|
|
1357
2476
|
"boundary": "a value that may wrap over several lines."
|
|
1358
2477
|
}
|
|
1359
2478
|
],
|
|
1360
|
-
"useWhen": "Show one long opaque value on one line, and keep its end visible when it clips."
|
|
2479
|
+
"useWhen": "Show one long opaque value on one line, and keep its end visible when it clips.",
|
|
2480
|
+
"aliases": [
|
|
2481
|
+
"ellipsis",
|
|
2482
|
+
"middle truncation",
|
|
2483
|
+
"truncate"
|
|
2484
|
+
]
|
|
1361
2485
|
},
|
|
1362
2486
|
{
|
|
1363
2487
|
"name": "Visually Hidden",
|
|
@@ -1372,6 +2496,25 @@
|
|
|
1372
2496
|
"jsdoc": "Content for assistive technology only.",
|
|
1373
2497
|
"examples": [
|
|
1374
2498
|
"```tsx\nimport { VisuallyHidden } from \"@ngrok/mantle/visually-hidden\";\n\n<a href=\"https://status.ngrok.com\" target=\"_blank\" rel=\"noreferrer\">\n ngrok status\n <VisuallyHidden> (opens in a new tab)</VisuallyHidden>\n</a>\n```"
|
|
2499
|
+
],
|
|
2500
|
+
"siblings": [
|
|
2501
|
+
{
|
|
2502
|
+
"name": "LiveRegion",
|
|
2503
|
+
"boundary": "screen readers must announce the text when it changes."
|
|
2504
|
+
},
|
|
2505
|
+
{
|
|
2506
|
+
"name": "IconButton",
|
|
2507
|
+
"boundary": "the text names an icon-only button; pass it as the `label` prop."
|
|
2508
|
+
},
|
|
2509
|
+
{
|
|
2510
|
+
"name": "SkipToMainLink",
|
|
2511
|
+
"boundary": "the hidden content is a skip link that shows on focus."
|
|
2512
|
+
}
|
|
2513
|
+
],
|
|
2514
|
+
"useWhen": "Give screen readers text that sighted users never see, such as \"(opens in a new tab)\" on an external link.",
|
|
2515
|
+
"aliases": [
|
|
2516
|
+
"sr only",
|
|
2517
|
+
"screen reader only"
|
|
1375
2518
|
]
|
|
1376
2519
|
},
|
|
1377
2520
|
{
|
|
@@ -1403,7 +2546,10 @@
|
|
|
1403
2546
|
"boundary": "the content is code and needs highlighting and a copy button."
|
|
1404
2547
|
}
|
|
1405
2548
|
],
|
|
1406
|
-
"useWhen": "De-emphasize a block of content relative to the surface around it."
|
|
2549
|
+
"useWhen": "De-emphasize a block of content relative to the surface around it.",
|
|
2550
|
+
"aliases": [
|
|
2551
|
+
"inset"
|
|
2552
|
+
]
|
|
1407
2553
|
}
|
|
1408
2554
|
],
|
|
1409
2555
|
"hooks": [
|
|
@@ -1431,7 +2577,11 @@
|
|
|
1431
2577
|
"name": "useCallbackRef",
|
|
1432
2578
|
"importPath": "@ngrok/mantle/hooks",
|
|
1433
2579
|
"docsUrl": "https://mantle.ngrok.com/hooks",
|
|
1434
|
-
"markdownUrl": "https://mantle.ngrok.com/hooks.md"
|
|
2580
|
+
"markdownUrl": "https://mantle.ngrok.com/hooks.md",
|
|
2581
|
+
"summary": "Returns a memoized callback that always invokes the latest version of `callback`, while preserving a stable function identity across renders.",
|
|
2582
|
+
"examples": [
|
|
2583
|
+
"// Pass a stable handler to a memoized child without re-rendering it\nconst onSelect = useCallbackRef((id: string) => {\n // reads the latest `props.items` without being in deps\n props.onSelectItem(id, props.items);\n});\n\nreturn <MemoizedList onSelect={onSelect} />;"
|
|
2584
|
+
]
|
|
1435
2585
|
},
|
|
1436
2586
|
{
|
|
1437
2587
|
"name": "useComposedRefs",
|
|
@@ -1520,7 +2670,7 @@
|
|
|
1520
2670
|
"importPath": "@ngrok/mantle/hooks",
|
|
1521
2671
|
"docsUrl": "https://mantle.ngrok.com/hooks",
|
|
1522
2672
|
"markdownUrl": "https://mantle.ngrok.com/hooks.md",
|
|
1523
|
-
"summary": "Returns `false` during server rendering and the initial hydration render, then `true` on the client
|
|
2673
|
+
"summary": "Returns `false` during server rendering and the initial hydration render, then `true` on the client, without hydration mismatches, because React uses the server snapshot for the hydration pass and re-renders once with the client snapshot afterwards.",
|
|
1524
2674
|
"examples": [
|
|
1525
2675
|
"```tsx\nfunction PreferencesPanel() {\n const isHydrated = useIsHydrated();\n // localStorage-backed defaults are only correct on the client\n return isHydrated ? <PreferenceControls /> : <PreferencesSkeleton />;\n}\n```"
|
|
1526
2676
|
]
|