@lexibase/create-rdx 2.0.0 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/templates/default/docs/examples/accordion.mdx +66 -41
- package/templates/default/docs/examples/callouts.mdx +49 -32
- package/templates/default/docs/examples/code-blocks.mdx +185 -0
- package/templates/default/docs/examples/diagrams.mdx +95 -0
- package/templates/default/docs/examples/images.mdx +4 -0
- package/templates/default/docs/examples/keyboard-shortcuts.mdx +32 -18
- package/templates/default/docs/examples/links.mdx +3 -6
- package/templates/default/docs/examples/markdown.mdx +12 -12
- package/templates/default/docs/examples/tabs.mdx +81 -42
- package/templates/default/package.json +1 -1
package/package.json
CHANGED
|
@@ -1,69 +1,94 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Accordion
|
|
3
|
-
description:
|
|
3
|
+
description: Optional explanations, without crowding your documentation.
|
|
4
4
|
link_position: 6
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
## Frequently asked questions
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
Wrap questions in `:::accordion` and start each item with `### Question`.
|
|
10
|
+
The answer continues until the next direct `###` or the closing `:::`.
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
<AccordionContent>
|
|
12
|
+
::::accordion
|
|
13
|
+
|
|
14
|
+
### Where do I write my documentation?
|
|
16
15
|
|
|
17
16
|
Create folders and `.mdx` files inside **docs/**. Each folder becomes a category
|
|
18
17
|
and each file becomes a page.
|
|
19
18
|
|
|
20
|
-
|
|
19
|
+
### How do I preview my changes?
|
|
20
|
+
|
|
21
|
+
Start the development server from your documentation project root:
|
|
21
22
|
|
|
22
|
-
|
|
23
|
-
</AccordionItem>
|
|
24
|
-
<AccordionItem value="preview">
|
|
25
|
-
<AccordionTrigger>How do I preview my changes?</AccordionTrigger>
|
|
26
|
-
<AccordionContent>
|
|
23
|
+
:::tabs
|
|
27
24
|
|
|
28
|
-
|
|
25
|
+
### pnpm
|
|
29
26
|
|
|
30
|
-
```bash
|
|
31
27
|
pnpm dev
|
|
28
|
+
|
|
29
|
+
### npm
|
|
30
|
+
|
|
31
|
+
npm run dev
|
|
32
|
+
|
|
33
|
+
### yarn
|
|
34
|
+
|
|
35
|
+
yarn dev
|
|
36
|
+
|
|
37
|
+
:::
|
|
38
|
+
|
|
39
|
+
> [!TIP] Live updates
|
|
40
|
+
> Keep the server running while editing your documentation.
|
|
41
|
+
|
|
42
|
+
::::
|
|
43
|
+
|
|
44
|
+
## Write an Accordion
|
|
45
|
+
|
|
46
|
+
```md
|
|
47
|
+
:::accordion
|
|
48
|
+
|
|
49
|
+
### Where do I write my docs?
|
|
50
|
+
|
|
51
|
+
Create folders and Markdown files inside **docs/**.
|
|
52
|
+
|
|
53
|
+
### How do I preview my changes?
|
|
54
|
+
|
|
55
|
+
Start the development server from your documentation project root.
|
|
56
|
+
|
|
57
|
+
:::
|
|
32
58
|
```
|
|
33
59
|
|
|
34
|
-
|
|
60
|
+
No import or plugin is required. Items start closed, and opening one closes the
|
|
61
|
+
previous item in the same group. Use Enter or Space to toggle and Tab to move
|
|
62
|
+
between questions and links. Keep essential steps visible rather than hiding
|
|
63
|
+
the whole guide in panels.
|
|
64
|
+
|
|
65
|
+
## Nest components
|
|
35
66
|
|
|
36
|
-
|
|
67
|
+
Answers support Markdown and RDX components. When Tabs are inside an Accordion,
|
|
68
|
+
open the outer Accordion with **four colons** (`::::accordion`) and close it with
|
|
69
|
+
`::::`. The inner Tabs use **three colons** (`:::tabs`) and close with `:::`.
|
|
70
|
+
The extra colon keeps the inner closing fence from closing the outer component.
|
|
71
|
+
For each additional nesting level, use one more colon on the outer container:
|
|
37
72
|
|
|
38
|
-
|
|
73
|
+
```md
|
|
74
|
+
::::accordion
|
|
39
75
|
|
|
40
|
-
|
|
41
|
-
</AccordionItem>
|
|
42
|
-
<AccordionItem value="disabled" disabled>
|
|
43
|
-
<AccordionTrigger>Disabled example</AccordionTrigger>
|
|
44
|
-
<AccordionContent>This item demonstrates the disabled state.</AccordionContent>
|
|
45
|
-
</AccordionItem>
|
|
46
|
-
</Accordion>
|
|
76
|
+
### Which environment should I use?
|
|
47
77
|
|
|
48
|
-
|
|
78
|
+
:::tabs
|
|
49
79
|
|
|
50
|
-
|
|
80
|
+
### Development
|
|
51
81
|
|
|
52
|
-
|
|
53
|
-
<AccordionItem value="build">
|
|
54
|
-
<AccordionTrigger>Build for production</AccordionTrigger>
|
|
55
|
-
<AccordionContent>
|
|
82
|
+
Preview changes locally.
|
|
56
83
|
|
|
57
|
-
|
|
84
|
+
### Production
|
|
58
85
|
|
|
59
|
-
|
|
60
|
-
</AccordionItem>
|
|
61
|
-
<AccordionItem value="start">
|
|
62
|
-
<AccordionTrigger>Check the production site</AccordionTrigger>
|
|
63
|
-
<AccordionContent>
|
|
86
|
+
Build and deploy the site.
|
|
64
87
|
|
|
65
|
-
|
|
88
|
+
:::
|
|
89
|
+
|
|
90
|
+
::::
|
|
91
|
+
```
|
|
66
92
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
</Accordion>
|
|
93
|
+
Use `####` or deeper headings for subsections inside an answer. Direct `###`
|
|
94
|
+
headings define item titles in the current container.
|
|
@@ -1,56 +1,73 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Callouts
|
|
3
|
-
description:
|
|
3
|
+
description: Notes, tips, and warnings that fit the documentation.
|
|
4
4
|
link_position: 4
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
##
|
|
7
|
+
## Write a Callout
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Start a blockquote with `[!TYPE]`. Add an optional title on the same line and
|
|
10
|
+
write the body on the following quoted lines:
|
|
10
11
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
</Callout>
|
|
16
|
-
|
|
17
|
-
<Callout variant="tip" title="A helpful tip">
|
|
18
|
-
|
|
19
|
-
You can use **Markdown**, [documentation links](/docs/init/intro), and `inline code` inside a callout.
|
|
20
|
-
|
|
21
|
-
</Callout>
|
|
12
|
+
```md
|
|
13
|
+
> [!TIP] A useful shortcut
|
|
14
|
+
> Use **Markdown**, inline code, links, and lists in the body.
|
|
15
|
+
```
|
|
22
16
|
|
|
23
|
-
|
|
17
|
+
> [!TIP] A useful shortcut
|
|
18
|
+
> Use **Markdown**, inline code, links, and lists in the body.
|
|
24
19
|
|
|
25
|
-
|
|
20
|
+
No import or plugin is required. Choose one of the five uppercase markers:
|
|
26
21
|
|
|
27
|
-
|
|
22
|
+
## Try the variants
|
|
28
23
|
|
|
29
|
-
|
|
24
|
+
> [!NOTE] A useful note
|
|
25
|
+
> Explain a detail without interrupting the main instructions.
|
|
30
26
|
|
|
31
|
-
|
|
32
|
-
|
|
27
|
+
> [!TIP] Keep it short
|
|
28
|
+
> Use a Callout when the context changes how the reader should proceed.
|
|
33
29
|
|
|
34
|
-
|
|
30
|
+
> [!SUCCESS] Ready to continue
|
|
31
|
+
> Your documentation is ready for the next step.
|
|
35
32
|
|
|
36
|
-
|
|
33
|
+
> [!WARNING] Before updating
|
|
34
|
+
> Read the release notes and validate your production build.
|
|
37
35
|
|
|
38
|
-
|
|
36
|
+
> [!DANGER] Review destructive changes
|
|
37
|
+
> Confirm the exact files before deleting source content.
|
|
39
38
|
|
|
40
|
-
|
|
39
|
+
```md
|
|
40
|
+
> [!NOTE] A useful note
|
|
41
|
+
> Explain a detail.
|
|
41
42
|
|
|
42
|
-
|
|
43
|
+
> [!TIP] Keep it short
|
|
44
|
+
> Share a useful shortcut.
|
|
43
45
|
|
|
44
|
-
|
|
46
|
+
> [!SUCCESS] Ready to continue
|
|
47
|
+
> Confirm a successful step.
|
|
45
48
|
|
|
46
|
-
|
|
49
|
+
> [!WARNING] Before updating
|
|
50
|
+
> Read the release notes.
|
|
47
51
|
|
|
48
|
-
|
|
52
|
+
> [!DANGER] Review destructive changes
|
|
53
|
+
> Confirm the exact files before deleting them.
|
|
54
|
+
```
|
|
49
55
|
|
|
50
|
-
|
|
51
|
-
<Callout variant="warning" title="Before updating">
|
|
56
|
+
## Optional titles and rich content
|
|
52
57
|
|
|
53
|
-
|
|
58
|
+
Leave the title out for a compact note. Continue the quote with a blank quoted
|
|
59
|
+
line before a list or another paragraph:
|
|
54
60
|
|
|
55
|
-
|
|
61
|
+
```md
|
|
62
|
+
> [!NOTE]
|
|
63
|
+
> Before continuing:
|
|
64
|
+
>
|
|
65
|
+
> - Review your configuration.
|
|
66
|
+
> - Run a production build.
|
|
56
67
|
```
|
|
68
|
+
|
|
69
|
+
> [!NOTE]
|
|
70
|
+
> Before continuing:
|
|
71
|
+
>
|
|
72
|
+
> - Review your configuration.
|
|
73
|
+
> - Run a production build.
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Code blocks
|
|
3
|
+
description: Highlight code, compare changes, and draw directory trees.
|
|
4
|
+
link_position: 9
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
All fence options are optional. These examples show each one separately before
|
|
8
|
+
combining them.
|
|
9
|
+
|
|
10
|
+
## Plain code
|
|
11
|
+
|
|
12
|
+
````md
|
|
13
|
+
```
|
|
14
|
+
Hello, RDX!
|
|
15
|
+
```
|
|
16
|
+
````
|
|
17
|
+
|
|
18
|
+
```
|
|
19
|
+
Hello, RDX!
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
The header uses the default code label. Add a language for highlighting:
|
|
23
|
+
|
|
24
|
+
````md
|
|
25
|
+
```tsx
|
|
26
|
+
export function Welcome() {
|
|
27
|
+
return <h1>Hello, RDX!</h1>
|
|
28
|
+
}
|
|
29
|
+
```
|
|
30
|
+
````
|
|
31
|
+
|
|
32
|
+
```tsx
|
|
33
|
+
export function Welcome() {
|
|
34
|
+
return <h1>Hello, RDX!</h1>
|
|
35
|
+
}
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Show a filename
|
|
39
|
+
|
|
40
|
+
Place `title="filename"` after the fence language:
|
|
41
|
+
|
|
42
|
+
````md
|
|
43
|
+
```ts title="rdx.config.ts"
|
|
44
|
+
const search = true
|
|
45
|
+
```
|
|
46
|
+
````
|
|
47
|
+
|
|
48
|
+
```ts title="rdx.config.ts"
|
|
49
|
+
const search = true
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
The title appears in the header; copying keeps only the code. Titles with spaces
|
|
53
|
+
use quotes, such as `title="Install dependencies"`.
|
|
54
|
+
|
|
55
|
+
## Number lines
|
|
56
|
+
|
|
57
|
+
Add only `lineNumbers` to start at 1, with no title or custom starting value:
|
|
58
|
+
|
|
59
|
+
````md
|
|
60
|
+
```tsx lineNumbers
|
|
61
|
+
export function Welcome() {
|
|
62
|
+
return <h1>Hello, RDX!</h1>
|
|
63
|
+
}
|
|
64
|
+
```
|
|
65
|
+
````
|
|
66
|
+
|
|
67
|
+
```tsx lineNumbers
|
|
68
|
+
export function Welcome() {
|
|
69
|
+
return <h1>Hello, RDX!</h1>
|
|
70
|
+
}
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Omit the flag to keep numbers hidden. Copying excludes the line numbers.
|
|
74
|
+
|
|
75
|
+
## Set the starting line
|
|
76
|
+
|
|
77
|
+
Use `startLine` alongside `lineNumbers` for a fragment of a larger file:
|
|
78
|
+
|
|
79
|
+
````md
|
|
80
|
+
```ts lineNumbers startLine=20
|
|
81
|
+
const enabled = true
|
|
82
|
+
console.log(enabled)
|
|
83
|
+
```
|
|
84
|
+
````
|
|
85
|
+
|
|
86
|
+
```ts lineNumbers startLine=20
|
|
87
|
+
const enabled = true
|
|
88
|
+
console.log(enabled)
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
`startLine` is a positive integer. Omit it to start at 1. It sets the starting
|
|
92
|
+
value without enabling numbering by itself.
|
|
93
|
+
|
|
94
|
+
## Combine options
|
|
95
|
+
|
|
96
|
+
Add a title when a filename helps explain the fragment:
|
|
97
|
+
|
|
98
|
+
````md
|
|
99
|
+
```ts title="example.ts" lineNumbers startLine=20
|
|
100
|
+
const enabled = true
|
|
101
|
+
console.log(enabled)
|
|
102
|
+
```
|
|
103
|
+
````
|
|
104
|
+
|
|
105
|
+
```ts title="example.ts" lineNumbers startLine=20
|
|
106
|
+
const enabled = true
|
|
107
|
+
console.log(enabled)
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
## Long blocks on mobile
|
|
111
|
+
|
|
112
|
+
On screens narrower than 768px, blocks taller than about 12 visible lines show
|
|
113
|
+
an automatic preview. Use **Show more** to expand and **Show less** to collapse.
|
|
114
|
+
Short blocks and desktop views remain fully visible. Copying always includes
|
|
115
|
+
the complete block, including content outside the preview.
|
|
116
|
+
|
|
117
|
+
## Compare changes
|
|
118
|
+
|
|
119
|
+
Use a `diff` fence. Prefix removed lines with `-`, added lines with `+`,
|
|
120
|
+
and unchanged lines with a space. The copy button copies the patch as shown.
|
|
121
|
+
|
|
122
|
+
```diff
|
|
123
|
+
-const search = false
|
|
124
|
+
+const search = true
|
|
125
|
+
console.log(search)
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
## Mermaid diagrams
|
|
129
|
+
|
|
130
|
+
Use a `mermaid` fence to render a diagram. The header can show an optional title,
|
|
131
|
+
copy the definition, switch between diagram and source, or open a larger view:
|
|
132
|
+
|
|
133
|
+
```mermaid title="Documentation flow"
|
|
134
|
+
flowchart LR
|
|
135
|
+
A[Write Markdown] --> B[Preview] --> C[Publish]
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
See [Diagrams](./diagrams.mdx) for syntax examples and accessibility.
|
|
139
|
+
|
|
140
|
+
## Draw a folder tree
|
|
141
|
+
|
|
142
|
+
Use a `folder` fence with two spaces per level. End folder names with `/`.
|
|
143
|
+
The diagram's branches are generated from those indents.
|
|
144
|
+
|
|
145
|
+
```folder
|
|
146
|
+
my-docs/
|
|
147
|
+
docs/
|
|
148
|
+
guides/
|
|
149
|
+
introduction.mdx
|
|
150
|
+
public/
|
|
151
|
+
images/
|
|
152
|
+
logo.svg
|
|
153
|
+
components/
|
|
154
|
+
home.tsx
|
|
155
|
+
rdx.config.ts
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
Folder names ending in `/` receive a folder icon. File icons follow their
|
|
159
|
+
extension, with a generic file icon for other names.
|
|
160
|
+
|
|
161
|
+
## Type ASCII branches
|
|
162
|
+
|
|
163
|
+
Use `|-` for `├──`, `|_` for `└──`, and `|` for `│` in the tree prefixes:
|
|
164
|
+
|
|
165
|
+
````md
|
|
166
|
+
```folder title="Project files"
|
|
167
|
+
my-docs/
|
|
168
|
+
|- docs/
|
|
169
|
+
| |_ intro.mdx
|
|
170
|
+
|- package.json
|
|
171
|
+
|_ logo.svg
|
|
172
|
+
```
|
|
173
|
+
````
|
|
174
|
+
|
|
175
|
+
```folder title="Project files"
|
|
176
|
+
my-docs/
|
|
177
|
+
|- docs/
|
|
178
|
+
| |_ intro.mdx
|
|
179
|
+
|- package.json
|
|
180
|
+
|_ logo.svg
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
Leave a space between each branch marker and the name. Existing Unicode trees
|
|
184
|
+
also work. Copying produces the text diagram without icons; a `text` fence
|
|
185
|
+
preserves the original ASCII characters. Long lines scroll inside the block.
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Diagrams
|
|
3
|
+
description: Turn Mermaid definitions into flowcharts, sequences, and other diagrams.
|
|
4
|
+
link_position: 10
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Write a diagram
|
|
8
|
+
|
|
9
|
+
Use a fenced code block with `mermaid` as its language. RDX renders the diagram
|
|
10
|
+
inside the shared code-block frame:
|
|
11
|
+
|
|
12
|
+
````md
|
|
13
|
+
```mermaid title="Documentation flow"
|
|
14
|
+
flowchart TD
|
|
15
|
+
A[Write Markdown] --> B[Preview locally]
|
|
16
|
+
B --> C{Ready?}
|
|
17
|
+
C -->|Yes| D[Build and deploy]
|
|
18
|
+
C -->|No| A
|
|
19
|
+
```
|
|
20
|
+
````
|
|
21
|
+
|
|
22
|
+
```mermaid title="Documentation flow"
|
|
23
|
+
flowchart TD
|
|
24
|
+
A[Write Markdown] --> B[Preview locally]
|
|
25
|
+
B --> C{Ready?}
|
|
26
|
+
C -->|Yes| D[Build and deploy]
|
|
27
|
+
C -->|No| A
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
No import or plugin is required. The `title` is optional. Diagram colors follow
|
|
31
|
+
the site's light or dark theme.
|
|
32
|
+
|
|
33
|
+
## Explore and copy
|
|
34
|
+
|
|
35
|
+
Use the header buttons to show the diagram's source, return to the diagram,
|
|
36
|
+
open a larger view, or copy the original Mermaid definition. The larger view
|
|
37
|
+
scrolls when a diagram exceeds the screen. Press Escape to close it and return
|
|
38
|
+
to the expand button.
|
|
39
|
+
|
|
40
|
+
The source view also supports the optional `lineNumbers` and `startLine` fence
|
|
41
|
+
options. On mobile, use its wrap-lines button for long definitions.
|
|
42
|
+
|
|
43
|
+
Mermaid loads when a diagram block approaches the visible area. Rendering runs
|
|
44
|
+
in the browser; before it finishes, or with JavaScript disabled, the definition
|
|
45
|
+
remains readable. If a definition is invalid, the block displays a message and
|
|
46
|
+
keeps its source available. Keep definitions within 50,000 characters and
|
|
47
|
+
flowcharts within 500 edges.
|
|
48
|
+
|
|
49
|
+
## Sequence diagrams
|
|
50
|
+
|
|
51
|
+
Mermaid supports different diagram types through the same fence. For example:
|
|
52
|
+
|
|
53
|
+
```mermaid title="Documentation request"
|
|
54
|
+
sequenceDiagram
|
|
55
|
+
accTitle: Loading a documentation page
|
|
56
|
+
accDescr: A reader requests a page and the site returns the document.
|
|
57
|
+
participant Reader
|
|
58
|
+
participant Site
|
|
59
|
+
Reader->>Site: Open a documentation page
|
|
60
|
+
Site-->>Reader: Return the document
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
````md
|
|
64
|
+
```mermaid title="Documentation request"
|
|
65
|
+
sequenceDiagram
|
|
66
|
+
accTitle: Loading a documentation page
|
|
67
|
+
accDescr: A reader requests a page and the site returns the document.
|
|
68
|
+
participant Reader
|
|
69
|
+
participant Site
|
|
70
|
+
Reader->>Site: Open a documentation page
|
|
71
|
+
Site-->>Reader: Return the document
|
|
72
|
+
```
|
|
73
|
+
````
|
|
74
|
+
|
|
75
|
+
Use Mermaid's `accTitle` and `accDescr` to describe your diagram for screen
|
|
76
|
+
readers. A fence `title` supplies the image's accessible name when present,
|
|
77
|
+
followed by `accDescr` when provided.
|
|
78
|
+
|
|
79
|
+
## Tree-shaped flows
|
|
80
|
+
|
|
81
|
+
Use branches to describe a process or a hierarchy:
|
|
82
|
+
|
|
83
|
+
```mermaid title="Documentation sections"
|
|
84
|
+
flowchart TD
|
|
85
|
+
Docs[Documentation] --> Start[Getting started]
|
|
86
|
+
Docs --> Writing[Writing documentation]
|
|
87
|
+
Docs --> Features[Features]
|
|
88
|
+
Writing --> Markdown[Markdown]
|
|
89
|
+
Writing --> Components[Components]
|
|
90
|
+
Features --> Search[Search]
|
|
91
|
+
Features --> Versions[Versioning]
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
For directory structures, use a [folder code block](./code-blocks.mdx#draw-a-folder-tree).
|
|
95
|
+
For more diagram types and syntax, see the [Mermaid documentation](https://mermaid.js.org/intro/).
|
|
@@ -14,6 +14,10 @@ Put images inside `public/` and reference them from the site root:
|
|
|
14
14
|

|
|
15
15
|
```
|
|
16
16
|
|
|
17
|
+
Click the image to open its preview, or focus it and press Enter or Space.
|
|
18
|
+
Press Escape, use the close button, or click outside to return to the page.
|
|
19
|
+
Images inside links follow the link; images with empty alt text are decorative.
|
|
20
|
+
|
|
17
21
|
The file above lives at `public/images/rdx.svg`, not in `docs/` or `.rdx/`.
|
|
18
22
|
|
|
19
23
|
## Downloads
|
|
@@ -1,31 +1,45 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Keyboard shortcuts
|
|
3
|
-
description:
|
|
3
|
+
description: Describe keys and shortcut combinations with Markdown.
|
|
4
4
|
link_position: 8
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
##
|
|
7
|
+
## Display a key
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Write `:kbd[Key]` in your `.mdx` pages. No import or plugin is required:
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
Press :kbd[Esc] to close a dialog or :kbd[Enter] to confirm.
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
```md
|
|
14
|
+
Press :kbd[Esc] to close a dialog or :kbd[Enter] to confirm.
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Write a shortcut
|
|
18
|
+
|
|
19
|
+
Write the separator as ordinary text between the keys:
|
|
14
20
|
|
|
15
|
-
|
|
16
|
-
| :----- | :------- |
|
|
17
|
-
| Search | <KbdGroup><Kbd>Ctrl</Kbd>+<Kbd>K</Kbd></KbdGroup> |
|
|
18
|
-
| Save | <KbdGroup><Kbd>Ctrl</Kbd>+<Kbd>S</Kbd></KbdGroup> |
|
|
19
|
-
| Close | <Kbd>Esc</Kbd> |
|
|
21
|
+
Press :kbd[Ctrl] + :kbd[K] to open search.
|
|
20
22
|
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
<Kbd>Ctrl</Kbd>+<Kbd>K</Kbd>
|
|
24
|
-
</KbdGroup>
|
|
23
|
+
```md
|
|
24
|
+
Press :kbd[Ctrl] + :kbd[K] to open search.
|
|
25
25
|
```
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
## Shortcut reference tables
|
|
28
|
+
|
|
29
|
+
| Action | Shortcut |
|
|
30
|
+
| :------------- | :------------------- |
|
|
31
|
+
| Open search | :kbd[Ctrl] + :kbd[K] |
|
|
32
|
+
| Save | :kbd[Ctrl] + :kbd[S] |
|
|
33
|
+
| Close a dialog | :kbd[Esc] |
|
|
34
|
+
|
|
35
|
+
```md
|
|
36
|
+
| Action | Shortcut |
|
|
37
|
+
| :------------- | :------------------- |
|
|
38
|
+
| Open search | :kbd[Ctrl] + :kbd[K] |
|
|
39
|
+
| Save | :kbd[Ctrl] + :kbd[S] |
|
|
40
|
+
| Close a dialog | :kbd[Esc] |
|
|
41
|
+
```
|
|
28
42
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
43
|
+
These shared shadcn/ui components render semantic `<kbd>` elements and follow
|
|
44
|
+
the site's light and dark themes. Use them to describe shortcuts supported by
|
|
45
|
+
your application.
|
|
@@ -25,12 +25,9 @@ Jump to the [tables example](./markdown.mdx#tables), or return to
|
|
|
25
25
|
Markdown headings receive automatic IDs. Repeated headings get suffixes such as
|
|
26
26
|
`tables-1`. Relative document links must include the `.mdx` extension.
|
|
27
27
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
does not exist in the current version, RDX reports the source file and link to fix.
|
|
32
|
-
|
|
33
|
-
</Callout>
|
|
28
|
+
> [!NOTE] Keep links portable
|
|
29
|
+
> Use forward slashes and match the file's name and capitalization. If a destination
|
|
30
|
+
> does not exist in the current version, RDX reports the source file and link to fix.
|
|
34
31
|
|
|
35
32
|
## Assets and external links
|
|
36
33
|
|
|
@@ -16,23 +16,23 @@ const framework = 'RDX'
|
|
|
16
16
|
|
|
17
17
|
## Tables
|
|
18
18
|
|
|
19
|
-
| Feature
|
|
20
|
-
|
|
|
21
|
-
| Markdown tables |
|
|
22
|
-
| Callouts
|
|
23
|
-
| Code blocks
|
|
24
|
-
| Blockquotes
|
|
19
|
+
| Feature | Available |
|
|
20
|
+
| :-------------- | --------: |
|
|
21
|
+
| Markdown tables | Yes |
|
|
22
|
+
| Callouts | Yes |
|
|
23
|
+
| Code blocks | Yes |
|
|
24
|
+
| Blockquotes | Yes |
|
|
25
25
|
|
|
26
26
|
### Five-column comparison
|
|
27
27
|
|
|
28
28
|
Wider tables scroll horizontally on small screens without widening the page.
|
|
29
29
|
|
|
30
|
-
| Feature
|
|
31
|
-
|
|
|
32
|
-
| Markdown
|
|
33
|
-
| Callout
|
|
34
|
-
| Code block | Display source code with a copy button | Included | Not required | `pnpm dev`
|
|
35
|
-
| Blockquote | Quote a passage or explanation
|
|
30
|
+
| Feature | Description | Status | Plugin | Example |
|
|
31
|
+
| :--------- | :------------------------------------- | :------: | :----------: | :-------------- |
|
|
32
|
+
| Markdown | Write headings, lists, and paragraphs | Included | Not required | `## Heading` |
|
|
33
|
+
| Callout | Highlight contextual information | Included | Not required | `> [!NOTE]` |
|
|
34
|
+
| Code block | Display source code with a copy button | Included | Not required | `pnpm dev` |
|
|
35
|
+
| Blockquote | Quote a passage or explanation | Included | Not required | `> A quotation` |
|
|
36
36
|
|
|
37
37
|
## Task lists
|
|
38
38
|
|
|
@@ -1,72 +1,111 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Tabs
|
|
3
|
-
description:
|
|
3
|
+
description: Accessible tabs for related examples and documentation.
|
|
4
4
|
link_position: 5
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
## Choose your package manager
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
Wrap related examples in `:::tabs`. Each direct `### Title` creates a tab;
|
|
10
|
+
its content continues until the next title or the closing `:::`.
|
|
11
|
+
The first enabled tab is selected initially. No import or plugin is required.
|
|
12
|
+
|
|
13
|
+
:::tabs
|
|
11
14
|
|
|
12
|
-
|
|
13
|
-
<TabsList aria-label="Package manager">
|
|
14
|
-
<TabsTrigger value="npm">npm</TabsTrigger>
|
|
15
|
-
<TabsTrigger value="pnpm">pnpm</TabsTrigger>
|
|
16
|
-
<TabsTrigger value="yarn">yarn</TabsTrigger>
|
|
17
|
-
</TabsList>
|
|
18
|
-
<TabsContent value="npm">
|
|
15
|
+
### pnpm
|
|
19
16
|
|
|
20
|
-
|
|
17
|
+
pnpm install
|
|
18
|
+
|
|
19
|
+
### npm
|
|
21
20
|
|
|
22
|
-
```bash
|
|
23
21
|
npm install
|
|
24
|
-
```
|
|
25
22
|
|
|
26
|
-
|
|
27
|
-
|
|
23
|
+
### yarn
|
|
24
|
+
|
|
25
|
+
yarn install
|
|
26
|
+
|
|
27
|
+
:::
|
|
28
|
+
|
|
29
|
+
## Write your own tabs
|
|
28
30
|
|
|
29
|
-
|
|
31
|
+
```md
|
|
32
|
+
:::tabs
|
|
33
|
+
|
|
34
|
+
### pnpm
|
|
30
35
|
|
|
31
|
-
```bash
|
|
32
36
|
pnpm install
|
|
33
|
-
```
|
|
34
37
|
|
|
35
|
-
|
|
36
|
-
|
|
38
|
+
### npm
|
|
39
|
+
|
|
40
|
+
npm install
|
|
37
41
|
|
|
38
|
-
|
|
42
|
+
### yarn
|
|
39
43
|
|
|
40
|
-
```bash
|
|
41
44
|
yarn install
|
|
45
|
+
|
|
46
|
+
:::
|
|
42
47
|
```
|
|
43
48
|
|
|
44
|
-
|
|
45
|
-
|
|
49
|
+
Use the arrow keys to move between tabs and Enter or Space to select one.
|
|
50
|
+
The icon-only copy button copies the selected panel as plain text, including
|
|
51
|
+
complete code blocks. Each group maintains its own selection.
|
|
52
|
+
|
|
53
|
+
## Combine with Markdown
|
|
54
|
+
|
|
55
|
+
Panels support paragraphs, lists, code blocks, Callouts and other RDX components.
|
|
56
|
+
Use `####` or deeper headings for subsections inside a panel. Direct `###`
|
|
57
|
+
headings are reserved for tab labels within the container.
|
|
46
58
|
|
|
47
|
-
|
|
59
|
+
:::tabs
|
|
60
|
+
|
|
61
|
+
### Development
|
|
62
|
+
|
|
63
|
+
> [!TIP] Live updates
|
|
64
|
+
> Keep the development server running while editing your documentation.
|
|
65
|
+
|
|
66
|
+
### Production
|
|
67
|
+
|
|
68
|
+
1. Build your documentation.
|
|
69
|
+
2. Start the production server to check the result.
|
|
70
|
+
|
|
71
|
+
:::
|
|
72
|
+
|
|
73
|
+
## Disable a tab
|
|
74
|
+
|
|
75
|
+
Add `{disabled}` after the tab title. The label stays visible and the tab cannot
|
|
76
|
+
be activated. The first enabled tab is selected automatically; each group must
|
|
77
|
+
have at least one enabled tab.
|
|
78
|
+
|
|
79
|
+
```md
|
|
80
|
+
:::tabs
|
|
81
|
+
|
|
82
|
+
### pnpm
|
|
83
|
+
|
|
84
|
+
pnpm dev
|
|
85
|
+
|
|
86
|
+
### npm {disabled}
|
|
87
|
+
|
|
88
|
+
npm run dev
|
|
89
|
+
|
|
90
|
+
### yarn {disabled}
|
|
91
|
+
|
|
92
|
+
yarn dev
|
|
93
|
+
|
|
94
|
+
:::
|
|
95
|
+
```
|
|
48
96
|
|
|
49
|
-
|
|
97
|
+
:::tabs
|
|
50
98
|
|
|
51
|
-
|
|
52
|
-
<TabsList aria-label="Environment">
|
|
53
|
-
<TabsTrigger value="development">Development</TabsTrigger>
|
|
54
|
-
<TabsTrigger value="production">Production</TabsTrigger>
|
|
55
|
-
<TabsTrigger value="preview" disabled>Disabled example</TabsTrigger>
|
|
56
|
-
</TabsList>
|
|
57
|
-
<TabsContent value="development">
|
|
99
|
+
### pnpm
|
|
58
100
|
|
|
59
|
-
|
|
101
|
+
pnpm dev
|
|
60
102
|
|
|
61
|
-
|
|
103
|
+
### npm {disabled}
|
|
62
104
|
|
|
63
|
-
|
|
105
|
+
npm run dev
|
|
64
106
|
|
|
65
|
-
|
|
66
|
-
<TabsContent value="production">
|
|
107
|
+
### yarn {disabled}
|
|
67
108
|
|
|
68
|
-
|
|
69
|
-
2. Run `pnpm start` to check the production site.
|
|
109
|
+
yarn dev
|
|
70
110
|
|
|
71
|
-
|
|
72
|
-
</Tabs>
|
|
111
|
+
:::
|