Skip to content

Commit d5e4f09

Browse files
authored
docs: introduce UI Components API reference (#42)
* docs: introduce UI Components API reference * chore: add a sentence about the components origin
1 parent 7aa11d3 commit d5e4f09

63 files changed

Lines changed: 8763 additions & 4 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
---
2+
title: Accordion
3+
---
4+
5+
# Accordion
6+
7+
## Accordion
8+
9+
10+
**Source:** [`packages/appkit-ui/src/react/ui/accordion.tsx`](https://github.com/databricks/appkit/blob/main/packages/appkit-ui/src/react/ui/accordion.tsx)
11+
12+
13+
### Props
14+
15+
| Prop | Type | Required | Default | Description |
16+
|------|------|----------|---------|-------------|
17+
| `type` | `enum` || - | - |
18+
| `value` | `string \| string[]` | | - | The controlled stateful value of the accordion item whose content is expanded. The controlled stateful value of the accordion items whose contents are expanded. |
19+
| `defaultValue` | `string \| string[]` | | - | The value of the item whose content is expanded when the accordion is initially rendered. Use `defaultValue` if you do not need to control the state of an accordion. The value of the items whose contents are expanded when the accordion is initially rendered. Use `defaultValue` if you do not need to control the state of an accordion. |
20+
| `onValueChange` | `((value: string) => void) \| ((value: string[]) => void)` | | - | The callback that fires when the state of the accordion changes. |
21+
| `collapsible` | `boolean` | | `false` | Whether an accordion item can be collapsed after it has been opened. |
22+
| `disabled` | `boolean` | | - | Whether or not an accordion is disabled from user interaction. @defaultValue false |
23+
| `orientation` | `enum` | | `vertical` | The layout in which the Accordion operates. |
24+
| `dir` | `enum` | | - | The language read direction. |
25+
| `asChild` | `boolean` | | - | - |
26+
27+
28+
29+
### Usage
30+
31+
```tsx
32+
import { Accordion } from '@databricks/appkit-ui';
33+
34+
<Accordion /* props */ />
35+
```
36+
37+
38+
## AccordionContent
39+
40+
41+
**Source:** [`packages/appkit-ui/src/react/ui/accordion.tsx`](https://github.com/databricks/appkit/blob/main/packages/appkit-ui/src/react/ui/accordion.tsx)
42+
43+
44+
### Props
45+
46+
| Prop | Type | Required | Default | Description |
47+
|------|------|----------|---------|-------------|
48+
| `asChild` | `boolean` | | - | - |
49+
| `forceMount` | `true` | | - | Used to force mounting when more control is needed. Useful when controlling animation with React animation libraries. |
50+
51+
52+
53+
### Usage
54+
55+
```tsx
56+
import { AccordionContent } from '@databricks/appkit-ui';
57+
58+
<AccordionContent /* props */ />
59+
```
60+
61+
62+
## AccordionItem
63+
64+
65+
**Source:** [`packages/appkit-ui/src/react/ui/accordion.tsx`](https://github.com/databricks/appkit/blob/main/packages/appkit-ui/src/react/ui/accordion.tsx)
66+
67+
68+
### Props
69+
70+
| Prop | Type | Required | Default | Description |
71+
|------|------|----------|---------|-------------|
72+
| `disabled` | `boolean` | | - | Whether or not an accordion is disabled from user interaction. @defaultValue false |
73+
| `value` | `string \| string[]` | | - | The controlled stateful value of the accordion item whose content is expanded. The controlled stateful value of the accordion items whose contents are expanded. |
74+
| `asChild` | `boolean` | | - | - |
75+
76+
77+
78+
### Usage
79+
80+
```tsx
81+
import { AccordionItem } from '@databricks/appkit-ui';
82+
83+
<AccordionItem /* props */ />
84+
```
85+
86+
87+
## AccordionTrigger
88+
89+
90+
**Source:** [`packages/appkit-ui/src/react/ui/accordion.tsx`](https://github.com/databricks/appkit/blob/main/packages/appkit-ui/src/react/ui/accordion.tsx)
91+
92+
93+
### Props
94+
95+
| Prop | Type | Required | Default | Description |
96+
|------|------|----------|---------|-------------|
97+
| `asChild` | `boolean` | | - | - |
98+
99+
100+
101+
### Usage
102+
103+
```tsx
104+
import { AccordionTrigger } from '@databricks/appkit-ui';
105+
106+
<AccordionTrigger /* props */ />
107+
```
108+
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
---
2+
title: Alert
3+
---
4+
5+
# Alert
6+
7+
## Alert
8+
9+
10+
**Source:** [`packages/appkit-ui/src/react/ui/alert.tsx`](https://github.com/databricks/appkit/blob/main/packages/appkit-ui/src/react/ui/alert.tsx)
11+
12+
13+
### Props
14+
15+
| Prop | Type | Required | Default | Description |
16+
|------|------|----------|---------|-------------|
17+
| `variant` | `"default" \| "destructive" \| null` | | - | - |
18+
19+
20+
21+
### Usage
22+
23+
```tsx
24+
import { Alert } from '@databricks/appkit-ui';
25+
26+
<Alert /* props */ />
27+
```
28+
29+
30+
## AlertDescription
31+
32+
33+
**Source:** [`packages/appkit-ui/src/react/ui/alert.tsx`](https://github.com/databricks/appkit/blob/main/packages/appkit-ui/src/react/ui/alert.tsx)
34+
35+
36+
### Props
37+
38+
This component extends standard HTML element attributes.
39+
40+
41+
42+
### Usage
43+
44+
```tsx
45+
import { AlertDescription } from '@databricks/appkit-ui';
46+
47+
<AlertDescription /* props */ />
48+
```
49+
50+
51+
## AlertTitle
52+
53+
54+
**Source:** [`packages/appkit-ui/src/react/ui/alert.tsx`](https://github.com/databricks/appkit/blob/main/packages/appkit-ui/src/react/ui/alert.tsx)
55+
56+
57+
### Props
58+
59+
This component extends standard HTML element attributes.
60+
61+
62+
63+
### Usage
64+
65+
```tsx
66+
import { AlertTitle } from '@databricks/appkit-ui';
67+
68+
<AlertTitle /* props */ />
69+
```
70+

0 commit comments

Comments
 (0)