-
+
+
```
+
+#### Row box
+
+Currently it is only used internally by other components like `NcRadioGroup`, but `row` prop can be used to display the items in a row instead of a column.
+
+```vue
+
+
+ Button
+ Button
+ Button
+
+
+```
+
+#### Nested form box
+
+Components with nested form boxes (like split buttons) are still under development, but nesting a row box inside the column boxes is already supported.
+
+```vue
+
+
+
+ Button
+ Button
+ Button
+
+
+
+ Button
+ Button
+ Button
+
+
+
+ Button
+ Button
+ Button
+
+
+
+```
diff --git a/src/components/NcFormBox/useNcFormBox.ts b/src/components/NcFormBox/useNcFormBox.ts
index 0c8a7eb149..a7462dec9b 100644
--- a/src/components/NcFormBox/useNcFormBox.ts
+++ b/src/components/NcFormBox/useNcFormBox.ts
@@ -9,9 +9,11 @@ import { inject } from 'vue'
export const NC_FORM_BOX_CONTEXT_KEY: InjectionKey<{
isInFormBox: false
+ isInFormBoxRow: false
formBoxItemClass: undefined
} | {
isInFormBox: true
+ isInFormBoxRow: boolean
formBoxItemClass: string
}> = Symbol.for('NcFormBox:context')
@@ -22,6 +24,7 @@ export const NC_FORM_BOX_CONTEXT_KEY: InjectionKey<{
export function useNcFormBox() {
return inject(NC_FORM_BOX_CONTEXT_KEY, {
isInFormBox: false,
+ isInFormBoxRow: false,
formBoxItemClass: undefined,
})
}