@matteoaliano/forest-ui 0.8.3 → 0.8.5
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 +154 -154
- package/bin/sync.mjs +95 -95
- package/dist/{chunk-MIJBSV5Z.mjs → chunk-6LFUPGC2.mjs} +1 -1
- package/dist/chunk-6LFUPGC2.mjs.map +1 -0
- package/dist/index.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +32 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +33 -2
- package/dist/index.mjs.map +1 -1
- package/dist/theme.js.map +1 -1
- package/dist/theme.mjs +1 -1
- package/fonts/aeonik/aeonik.css +42 -42
- package/fonts/aeonik-mono/aeonik-mono.css +32 -32
- package/fonts/alkemy-beta/alkemy-beta.css +10 -10
- package/package.json +97 -97
- package/skills/forest-alkemy-plus/SKILL.md +141 -141
- package/skills/forest-alkemy-plus/references/components.md +202 -202
- package/skills/forest-alkemy-plus/references/patterns.md +405 -405
- package/skills/forest-alkemy-plus/references/upgrading.md +137 -137
- package/dist/chunk-MIJBSV5Z.mjs.map +0 -1
|
@@ -1,202 +1,202 @@
|
|
|
1
|
-
# Forest UI — Component Reference
|
|
2
|
-
|
|
3
|
-
> Full API reference for all components exported by `@matteoaliano/forest-ui`.
|
|
4
|
-
|
|
5
|
-
## Import Pattern
|
|
6
|
-
|
|
7
|
-
```tsx
|
|
8
|
-
// CORRECT — import from forest-ui
|
|
9
|
-
import { Button, TextField, Alert } from "@matteoaliano/forest-ui";
|
|
10
|
-
|
|
11
|
-
// WRONG — never import from @mui/material
|
|
12
|
-
import Button from "@mui/material/Button";
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
> **All MUI components are re-exported.** Never import from `@mui/material` — always use `@matteoaliano/forest-ui`. The only exception is `@mui/icons-material` for icons.
|
|
16
|
-
|
|
17
|
-
## Layout
|
|
18
|
-
|
|
19
|
-
| Component | Import | Key Props |
|
|
20
|
-
|-----------|--------|-----------|
|
|
21
|
-
| `Box` | `import { Box } from "@matteoaliano/forest-ui"` | `sx`, `component`, all HTML attributes |
|
|
22
|
-
| `Stack` | `import { Stack } from "@matteoaliano/forest-ui"` | `direction`, `spacing`, `divider`, `alignItems`, `justifyContent` |
|
|
23
|
-
| `Grid` | `import { Grid } from "@matteoaliano/forest-ui"` | `container`, `size`, `spacing`, `offset`, `columns`, `direction` |
|
|
24
|
-
| `Container` | `import { Container } from "@matteoaliano/forest-ui"` | `maxWidth: "xs" \| "sm" \| "md" \| "lg" \| "xl" \| false`, `fixed`, `disableGutters` |
|
|
25
|
-
|
|
26
|
-
## Form Helpers
|
|
27
|
-
|
|
28
|
-
| Component | Import | Key Props |
|
|
29
|
-
|-----------|--------|-----------|
|
|
30
|
-
| `FormControl` | `import { FormControl } from "@matteoaliano/forest-ui"` | `variant`, `fullWidth`, `error`, `disabled`, `required`, `size` |
|
|
31
|
-
| `FormControlLabel` | `import { FormControlLabel } from "@matteoaliano/forest-ui"` | `control` (required), `label`, `labelPlacement`, `disabled` |
|
|
32
|
-
| `FormGroup` | `import { FormGroup } from "@matteoaliano/forest-ui"` | `row`, `children` |
|
|
33
|
-
| `FormHelperText` | `import { FormHelperText } from "@matteoaliano/forest-ui"` | `error`, `disabled`, `margin` |
|
|
34
|
-
| `FormLabel` | `import { FormLabel } from "@matteoaliano/forest-ui"` | `error`, `focused`, `required`, `disabled`, `color` |
|
|
35
|
-
| `InputAdornment` | `import { InputAdornment } from "@matteoaliano/forest-ui"` | `position: "start" \| "end"`, `variant`, `disablePointerEvents` |
|
|
36
|
-
| `InputBase` | `import { InputBase } from "@matteoaliano/forest-ui"` | `value`, `onChange`, `placeholder`, `multiline`, `rows`, `startAdornment`, `endAdornment` |
|
|
37
|
-
| `InputLabel` | `import { InputLabel } from "@matteoaliano/forest-ui"` | `shrink`, `variant`, `error`, `required`, `disabled` |
|
|
38
|
-
| `OutlinedInput` | `import { OutlinedInput } from "@matteoaliano/forest-ui"` | `label`, `notched`, all InputBase props |
|
|
39
|
-
| `FilledInput` | `import { FilledInput } from "@matteoaliano/forest-ui"` | All InputBase props |
|
|
40
|
-
|
|
41
|
-
## Inputs
|
|
42
|
-
|
|
43
|
-
| Component | Import | Variants / Key Props | Default Props |
|
|
44
|
-
|-----------|--------|----------------------|---------------|
|
|
45
|
-
| `Button` | `import { Button } from "@matteoaliano/forest-ui"` | `variant: "contained" \| "outlined" \| "text"`, `color`, `size: "small" \| "medium" \| "large"`, `disabled`, `startIcon`, `endIcon`, `fullWidth`, `href` | `variant="contained"` |
|
|
46
|
-
| `ButtonGroup` | `import { ButtonGroup } from "@matteoaliano/forest-ui"` | `variant: "contained" \| "outlined" \| "text"`, `size: "small" \| "medium" \| "large"`, `orientation: "horizontal" \| "vertical"`, `color`, `disabled`, `fullWidth` | `variant="contained"` |
|
|
47
|
-
| `TextField` | `import { TextField } from "@matteoaliano/forest-ui"` | `variant: "outlined" \| "filled" \| "standard"`, `size: "small" \| "medium"`, `label`, `error`, `helperText`, `fullWidth`, `multiline`, `rows`, `type`, `placeholder`, `required`, `disabled` | — |
|
|
48
|
-
| `Select` + `MenuItem` | `import { Select, MenuItem } from "@matteoaliano/forest-ui"` | `variant: "outlined" \| "filled" \| "standard"`, `size: "small" \| "medium"`, `multiple`, `displayEmpty`, `label`, `labelId`, `renderValue`, `native`, `error`, `disabled` | — |
|
|
49
|
-
| `MultiSelect` | `import { MultiSelect } from "@matteoaliano/forest-ui"` | `options: { label, value }[]`, `value: string[]`, `onChange: (values) => void`, `selectAll: boolean`, `selectAllLabel: string`, `label` + all SelectProps | `selectAll={true}`, `selectAllLabel="Select All"` |
|
|
50
|
-
| `Checkbox` | `import { Checkbox } from "@matteoaliano/forest-ui"` | `color: "default" \| "primary" \| "secondary" \| "error" \| "info" \| "success" \| "warning"`, `size: "small" \| "medium"`, `checked`, `indeterminate`, `disabled` | — |
|
|
51
|
-
| `RadioGroup` + `Radio` | `import { RadioGroup, Radio } from "@matteoaliano/forest-ui"` | `row`, `value`, `onChange`; Radio: `color`, `size: "small" \| "medium" \| "large"`, `disabled` | — |
|
|
52
|
-
| `Switch` | `import { Switch } from "@matteoaliano/forest-ui"` | `color: "default" \| "primary" \| "secondary" \| "error" \| "info" \| "success" \| "warning"`, `size: "small" \| "medium"`, `checked`, `disabled` | — |
|
|
53
|
-
| `ToggleButton` + `ToggleButtonGroup` | `import { ToggleButton, ToggleButtonGroup } from "@matteoaliano/forest-ui"` | `value`, `exclusive`, `onChange`, `orientation: "horizontal" \| "vertical"`, `size: "small" \| "medium" \| "large"`, `color`, `fullWidth` | — |
|
|
54
|
-
| `Fab` | `import { Fab } from "@matteoaliano/forest-ui"` | `variant: "circular" \| "extended"`, `size: "small" \| "medium" \| "large"`, `color`, `disabled`, `href` | `color="primary"` |
|
|
55
|
-
| `IconButton` | `import { IconButton } from "@matteoaliano/forest-ui"` | `color: "inherit" \| "primary" \| "secondary" \| "error" \| "info" \| "success" \| "warning" \| "default"`, `size: "small" \| "medium" \| "large"`, `disabled`, `disableRipple` | — |
|
|
56
|
-
| `Autocomplete` | `import { Autocomplete } from "@matteoaliano/forest-ui"` | `options`, `renderInput` (required), `multiple`, `freeSolo`, `disableClearable`, `loading`, `groupBy`, `limitTags`, `filterOptions` | — |
|
|
57
|
-
| `Search` | `import { Search } from "@matteoaliano/forest-ui"` | `onClear`, `placeholder`, all TextField props (except `variant`) | `variant="outlined"`, `placeholder="Search..."`, built-in search icon and clear button |
|
|
58
|
-
| `Input` | `import { Input } from "@matteoaliano/forest-ui"` | `value`, `onChange`, `placeholder`, `multiline`, `rows`, `startAdornment`, `endAdornment`, `disabled`, `error` — all InputBase props | — |
|
|
59
|
-
| `DatePicker` | `import { DatePicker } from "@matteoaliano/forest-ui"` | All MUI X DatePicker props (`value`, `onChange`, `label`, `format`, `minDate`, `maxDate`, `disabled`, `readOnly`) | Wraps with `LocalizationProvider` + `AdapterDayjs` automatically |
|
|
60
|
-
|
|
61
|
-
## Data Display
|
|
62
|
-
|
|
63
|
-
| Component | Import | Variants / Key Props | Default Props |
|
|
64
|
-
|-----------|--------|----------------------|---------------|
|
|
65
|
-
| `Badge` | `import { Badge } from "@matteoaliano/forest-ui"` | `variant: "standard" \| "dot"`, `color`, `badgeContent`, `max`, `invisible`, `showZero`, `overlap: "rectangular" \| "circular"`, `anchorOrigin` | — |
|
|
66
|
-
| `Chip` | `import { Chip } from "@matteoaliano/forest-ui"` | `variant: "filled" \| "outlined"`, `color`, `size: "small" \| "medium"`, `label`, `onDelete`, `clickable`, `avatar`, `icon` | `deleteIcon={<CloseOutlined />}` |
|
|
67
|
-
| `Divider` | `import { Divider } from "@matteoaliano/forest-ui"` | `orientation: "horizontal" \| "vertical"`, `variant: "fullWidth" \| "inset" \| "middle"`, `textAlign`, `flexItem` | — |
|
|
68
|
-
| `Typography` | `import { Typography } from "@matteoaliano/forest-ui"` | `variant: "h1"-"h6" \| "subtitle1" \| "subtitle2" \| "body1" \| "body2" \| "caption" \| "overline" \| "button"`, `align`, `gutterBottom`, `noWrap` | — |
|
|
69
|
-
| `Tooltip` | `import { Tooltip } from "@matteoaliano/forest-ui"` | `title` (required), `placement` (12 positions), `arrow`, `followCursor`, `enterDelay`, `leaveDelay` | `arrow={true}` |
|
|
70
|
-
| `Avatar` | `import { Avatar } from "@matteoaliano/forest-ui"` | `src`, `alt`, `variant: "circular" \| "rounded" \| "square"`, `sizes`, `children` (fallback) |
|
|
71
|
-
| `AvatarGroup` | `import { AvatarGroup } from "@matteoaliano/forest-ui"` | `max`, `total`, `spacing`, `variant` |
|
|
72
|
-
| `ImageList` | `import { ImageList } from "@matteoaliano/forest-ui"` | `variant: "masonry" \| "quilted" \| "standard" \| "woven"`, `cols`, `gap`, `rowHeight` |
|
|
73
|
-
| `ImageListItem` | `import { ImageListItem } from "@matteoaliano/forest-ui"` | `cols`, `rows` |
|
|
74
|
-
| `ImageListItemBar` | `import { ImageListItemBar } from "@matteoaliano/forest-ui"` | `title`, `subtitle`, `position`, `actionIcon` |
|
|
75
|
-
| `Logo` | `import { Logo } from "@matteoaliano/forest-ui"` | `product: "wsuite" \| "studio" \| "feedati" \| "ai-hub"`, `variant: "logo" \| "logomark"`, `color: "positive" \| "negative" \| "negative-payoff"`, `sx` | `product="studio"`, `variant="logo"`, `color="positive"`. Studio and AI Hub `logo` variants include the payoff caption — pass `sx={{ height: 64 }}` or larger to render legibly. WSuite/FeeDati only define `positive`; other colors fall back. `negative-payoff` falls back to `negative` for `logomark` (no payoff to invert). |
|
|
76
|
-
| `Rating` | `import { Rating } from "@matteoaliano/forest-ui"` | `value`, `onChange`, `precision`, `max`, `size`, `readOnly`, `disabled` |
|
|
77
|
-
| `Table` family | `import { Table, TableHead, TableBody, TableRow, TableCell, TableContainer } from "@matteoaliano/forest-ui"` | Table: `size: "small" \| "medium"`, `stickyHeader`; TableCell: `align`, `padding`, `sortDirection`, `variant`; TableRow: `hover`, `selected` | — |
|
|
78
|
-
| `DataGrid` | `import { DataGrid, type GridColDef, type GridRenderCellParams, type GridRowSelectionModel } from "@matteoaliano/forest-ui"` | `rows`, `columns`, `paginationModel`, `sortModel`, `filterModel`, `checkboxSelection`, `loading`, `density`. Types: `GridColDef`, `GridRowsProp`, `GridRowParams`, `GridCellParams`, `GridRenderCellParams`, `GridRowSelectionModel`, `GridSortModel`, `GridFilterModel`, `GridPaginationModel` | — |
|
|
79
|
-
| `List` family | `import { List, ListItem, ListItemButton, ListItemIcon, ListItemText, ListItemAvatar, ListSubheader } from "@matteoaliano/forest-ui"` | `dense`, `disablePadding`; ListItemButton: `selected`, `disabled`; ListItemText: `primary`, `secondary` | — |
|
|
80
|
-
| `TableFooter` | `import { TableFooter } from "@matteoaliano/forest-ui"` | `component`, `children` |
|
|
81
|
-
| `TablePagination` | `import { TablePagination } from "@matteoaliano/forest-ui"` | `count`, `page`, `rowsPerPage`, `onPageChange`, `onRowsPerPageChange` |
|
|
82
|
-
| `TableSortLabel` | `import { TableSortLabel } from "@matteoaliano/forest-ui"` | `active`, `direction: "asc" \| "desc"`, `onClick` |
|
|
83
|
-
| `ListItemSecondaryAction` | `import { ListItemSecondaryAction } from "@matteoaliano/forest-ui"` | `children` |
|
|
84
|
-
| `SnackbarContent` | `import { SnackbarContent } from "@matteoaliano/forest-ui"` | `message`, `action` |
|
|
85
|
-
|
|
86
|
-
## Surfaces
|
|
87
|
-
|
|
88
|
-
| Component | Import | Variants / Key Props | Default Props |
|
|
89
|
-
|-----------|--------|----------------------|---------------|
|
|
90
|
-
| `Accordion` family | `import { Accordion, AccordionSummary, AccordionDetails, AccordionActions } from "@matteoaliano/forest-ui"` | `expanded`, `defaultExpanded`, `onChange`, `disabled`, `disableGutters`, `square` | — |
|
|
91
|
-
| `AppBar` + `Toolbar` | `import { AppBar, Toolbar } from "@matteoaliano/forest-ui"` | `position`, `color`, `elevation`; Toolbar: `variant: "dense" \| "regular"` | — |
|
|
92
|
-
| `AppBarNavItem` | `import { AppBarNavItem } from "@matteoaliano/forest-ui"` | `label` (required), `icon`, `selected`, `href`, `sx` — navigation button for AppBar | — |
|
|
93
|
-
| `Card` family | `import { Card, CardContent, CardHeader, CardActions, CardMedia } from "@matteoaliano/forest-ui"` | `variant: "elevation" \| "outlined"`, `elevation`, `raised`; CardHeader: `title`, `subheader`, `avatar`, `action` | — |
|
|
94
|
-
| `Paper` | `import { Paper } from "@matteoaliano/forest-ui"` | `variant: "elevation" \| "outlined"`, `elevation` (0-24), `square` | — |
|
|
95
|
-
| `CardActionArea` | `import { CardActionArea } from "@matteoaliano/forest-ui"` | `onClick`, `href`, `disabled` |
|
|
96
|
-
| `Drawer` | `import { Drawer } from "@matteoaliano/forest-ui"` | `open`, `onClose`, `anchor: "left" \| "right" \| "top" \| "bottom"`, `variant: "permanent" \| "persistent" \| "temporary"`, `hideBackdrop` | `anchor="right"`, `hideBackdrop={true}` |
|
|
97
|
-
| `SwipeableDrawer` | `import { SwipeableDrawer } from "@matteoaliano/forest-ui"` | `onOpen` (required), `onClose` (required), `open`, `anchor`, `swipeAreaWidth` |
|
|
98
|
-
|
|
99
|
-
## Feedback
|
|
100
|
-
|
|
101
|
-
| Component | Import | Variants / Key Props | Default Props |
|
|
102
|
-
|-----------|--------|----------------------|---------------|
|
|
103
|
-
| `Alert` + `AlertTitle` | `import { Alert, AlertTitle } from "@matteoaliano/forest-ui"` | `severity: "success" \| "info" \| "warning" \| "error"`, `variant: "filled" \| "outlined" \| "standard"`, `color`, `icon`, `action`, `onClose` | — |
|
|
104
|
-
| `Dialog` family | `import { Dialog, DialogTitle, DialogContent, DialogActions, DialogContentText } from "@matteoaliano/forest-ui"` | `open` (required), `onClose`, `fullWidth`, `maxWidth`, `fullScreen`, `scroll: "paper" \| "body"` | — |
|
|
105
|
-
| `Backdrop` | `import { Backdrop } from "@matteoaliano/forest-ui"` | `open` (required), `invisible`, `onClick` | — |
|
|
106
|
-
| `LinearProgress` | `import { LinearProgress } from "@matteoaliano/forest-ui"` | `variant: "indeterminate" \| "determinate" \| "buffer" \| "query"`, `value` (0-100), `color` | — |
|
|
107
|
-
| `CircularProgress` | `import { CircularProgress } from "@matteoaliano/forest-ui"` | `variant: "indeterminate" \| "determinate"`, `value` (0-100), `color`, `size`, `thickness` | — |
|
|
108
|
-
| `Skeleton` | `import { Skeleton } from "@matteoaliano/forest-ui"` | `variant: "text" \| "circular" \| "rectangular" \| "rounded"`, `animation: "pulse" \| "wave" \| false`, `width`, `height` | — |
|
|
109
|
-
| `Modal` | `import { Modal } from "@matteoaliano/forest-ui"` | `open` (required), `onClose`, `children`, `keepMounted`, `disableAutoFocus`, `disableEscapeKeyDown` | — |
|
|
110
|
-
| `Popover` | `import { Popover } from "@matteoaliano/forest-ui"` | `open` (required), `anchorEl`, `onClose`, `anchorOrigin`, `transformOrigin`, `elevation` | — |
|
|
111
|
-
| `Snackbar` | `import { Snackbar } from "@matteoaliano/forest-ui"` | `open`, `message`, `autoHideDuration`, `onClose`, `action`, `anchorOrigin` | — |
|
|
112
|
-
| `Slider` | `import { Slider } from "@matteoaliano/forest-ui"` | `value`, `onChange`, `min`, `max`, `step`, `marks`, `valueLabelDisplay`, `orientation`, `size` | — |
|
|
113
|
-
|
|
114
|
-
## Navigation
|
|
115
|
-
|
|
116
|
-
| Component | Import | Variants / Key Props | Default Props |
|
|
117
|
-
|-----------|--------|----------------------|---------------|
|
|
118
|
-
| `Breadcrumbs` | `import { Breadcrumbs } from "@matteoaliano/forest-ui"` | `separator`, `maxItems`, `itemsAfterCollapse`, `itemsBeforeCollapse` | — |
|
|
119
|
-
| `Link` | `import { Link } from "@matteoaliano/forest-ui"` | `href`, `underline: "none" \| "hover" \| "always"`, `color`, `variant` | — |
|
|
120
|
-
| `Menu` + `MenuList` | `import { Menu, MenuList } from "@matteoaliano/forest-ui"` | Menu: `open` (required), `anchorEl`, `onClose`; use with `MenuItem` | — |
|
|
121
|
-
| `Pagination` | `import { Pagination } from "@matteoaliano/forest-ui"` | `count`, `page`, `onChange`, `variant: "text" \| "outlined"`, `shape`, `size`, `color`, `showFirstButton`, `showLastButton` | — |
|
|
122
|
-
| `Stepper` family | `import { Stepper, Step, StepLabel } from "@matteoaliano/forest-ui"` | `activeStep`, `orientation`, `alternativeLabel`, `nonLinear`; Step: `completed`, `disabled`; StepLabel: `optional`, `error` | — |
|
|
123
|
-
| `Tabs` + `Tab` | `import { Tabs, Tab } from "@matteoaliano/forest-ui"` | Tabs: `value`, `onChange`, `variant: "standard" \| "scrollable" \| "fullWidth"`, `orientation`, `centered`; Tab: `label`, `icon`, `iconPosition`, `disabled`, `value` | — |
|
|
124
|
-
| `SidebarNav` | `import { SidebarNav, SidebarItem, useSidebar } from "@matteoaliano/forest-ui"` | `open`, `onOpenChange`, `behavior: "permanent" \| "hover"`, `expandedWidth`, `collapsedWidth`, `showToggle`, `header`, `footer` | `expandedWidth=240`, `collapsedWidth=48`, `behavior="permanent"` |
|
|
125
|
-
| `SidebarItem` | (same import) | `icon` (required), `label` (required), `endAdornment`, `selected`, `onClick`, `disabled` | — |
|
|
126
|
-
| `BottomNavigation` | `import { BottomNavigation } from "@matteoaliano/forest-ui"` | `value`, `onChange`, `showLabels` |
|
|
127
|
-
| `BottomNavigationAction` | `import { BottomNavigationAction } from "@matteoaliano/forest-ui"` | `label`, `icon`, `value`, `showLabel` |
|
|
128
|
-
| `SpeedDial` | `import { SpeedDial } from "@matteoaliano/forest-ui"` | `ariaLabel` (required), `open`, `onOpen`, `onClose`, `icon`, `direction` |
|
|
129
|
-
| `SpeedDialAction` | `import { SpeedDialAction } from "@matteoaliano/forest-ui"` | `icon`, `tooltipTitle`, `onClick` |
|
|
130
|
-
| `SpeedDialIcon` | `import { SpeedDialIcon } from "@matteoaliano/forest-ui"` | `icon`, `openIcon` |
|
|
131
|
-
| `MobileStepper` | `import { MobileStepper } from "@matteoaliano/forest-ui"` | `steps`, `activeStep`, `variant: "dots" \| "progress" \| "text"`, `nextButton`, `backButton` |
|
|
132
|
-
| `PaginationItem` | `import { PaginationItem } from "@matteoaliano/forest-ui"` | `type`, `page`, `selected`, `disabled`, `shape`, `size` |
|
|
133
|
-
| `StepButton` | `import { StepButton } from "@matteoaliano/forest-ui"` | `optional`, `children`, `onClick` |
|
|
134
|
-
| `StepConnector` | `import { StepConnector } from "@matteoaliano/forest-ui"` | (styling via theme) |
|
|
135
|
-
| `StepContent` | `import { StepContent } from "@matteoaliano/forest-ui"` | `children`, `TransitionComponent`, `transitionDuration` |
|
|
136
|
-
| `StepIcon` | `import { StepIcon } from "@matteoaliano/forest-ui"` | `active`, `completed`, `error`, `icon` |
|
|
137
|
-
| `TabScrollButton` | `import { TabScrollButton } from "@matteoaliano/forest-ui"` | `direction: "left" \| "right"`, `orientation`, `disabled` |
|
|
138
|
-
|
|
139
|
-
## Charts
|
|
140
|
-
|
|
141
|
-
Requires `@mui/x-charts` peer dependency. All chart components are re-exported from `@matteoaliano/forest-ui` — never import directly from `@mui/x-charts`. Chart colors are automatically applied from the theme's 12-color series palette.
|
|
142
|
-
|
|
143
|
-
### Chart Components
|
|
144
|
-
|
|
145
|
-
| Component | Import | Variants / Key Props | Default Props |
|
|
146
|
-
|-----------|--------|----------------------|---------------|
|
|
147
|
-
| `BarChart` | `import { BarChart } from "@matteoaliano/forest-ui"` | `series` (supports `variant: "solid" \| "striped"` per series), `colors`, `xAxis`, `yAxis`, `width`, `height` | `grid horizontal`, `borderRadius=4`, highlight/fade on hover |
|
|
148
|
-
| `LineChart` | `import { LineChart } from "@matteoaliano/forest-ui"` | `series`, `colors`, `xAxis`, `yAxis`, `width`, `height` | `curve="linear"`, `strokeWidth=3`, `grid horizontal`, highlight/fade on hover |
|
|
149
|
-
| `PieChart` | `import { PieChart } from "@matteoaliano/forest-ui"` | `series` (data: `{ id, value, label, color? }[]`), `colors`, `width`, `height` | highlight/fade on hover |
|
|
150
|
-
| `ScatterChart` | `import { ScatterChart } from "@matteoaliano/forest-ui"` | `series`, `colors`, `xAxis`, `yAxis`, `width`, `height` | — |
|
|
151
|
-
| `Gauge` | `import { Gauge } from "@matteoaliano/forest-ui"` | `value`, `valueMin`, `valueMax`, `startAngle`, `endAngle`, `width`, `height` | — |
|
|
152
|
-
| `SparkLineChart` | `import { SparkLineChart } from "@matteoaliano/forest-ui"` | `data`, `plotType: "line" \| "bar"`, `width`, `height`, `colors` | — |
|
|
153
|
-
| `useChartColors` | `import { useChartColors } from "@matteoaliano/forest-ui"` | `useChartColors(count)` — returns `string[]` of theme chart series colors (max 12) | — |
|
|
154
|
-
|
|
155
|
-
### Chart Composition Primitives
|
|
156
|
-
|
|
157
|
-
For building custom chart layouts, these low-level primitives are also available:
|
|
158
|
-
|
|
159
|
-
- **Containers:** `ChartContainer`, `ResponsiveChartContainer`, `ChartsSurface`, `ChartsClipPath`
|
|
160
|
-
- **Axis & Grid:** `ChartsAxis`, `ChartsXAxis`, `ChartsYAxis`, `ChartsGrid`, `ChartsReferenceLine`
|
|
161
|
-
- **Legend & Tooltip:** `ChartsLegend`, `DefaultChartsLegend`, `ChartsTooltip`, `ChartsAxisTooltipContent`, `ChartsItemTooltipContent`, `ContinuousColorLegend`, `PiecewiseColorLegend`
|
|
162
|
-
- **Gauge parts:** `GaugeContainer`, `GaugeReferenceArc`, `GaugeValueArc`, `GaugeValueText`
|
|
163
|
-
- **Plot layers — Bar:** `BarPlot`, `BarElement`, `BarElementPath`, `BarLabel`
|
|
164
|
-
- **Plot layers — Line & Area:** `LinePlot`, `LineElement`, `AreaPlot`, `AreaElement`, `LineHighlightPlot`, `MarkPlot`, `AnimatedArea`, `AnimatedLine`
|
|
165
|
-
- **Plot layers — Pie:** `PiePlot`, `PieArc`, `PieArcPlot`, `PieArcLabel`, `PieArcLabelPlot`
|
|
166
|
-
- **Plot layers — Scatter:** `ScatterPlot`, `Scatter`
|
|
167
|
-
- **Interaction:** `ChartsAxisHighlight`, `ChartsOnAxisClickHandler`, `ChartsVoronoiHandler`, `HighlightedProvider`
|
|
168
|
-
- **Text:** `ChartsText`
|
|
169
|
-
- **Hooks:** `useDrawingArea`, `useChartId`, `useSvgRef`, `useXAxis`, `useXScale`, `useYAxis`, `useYScale`, `useAxisTooltip`, `useItemTooltip`, `useMouseTracker`, `useHighlighted`, `useItemHighlighted`, `useGaugeState`
|
|
170
|
-
- **Color palettes:** `blueberryTwilightPalette`, `cheerfulFiestaPalette`, `mangoFusionPalette` (each with `Light` and `Dark` variants)
|
|
171
|
-
|
|
172
|
-
## Transitions
|
|
173
|
-
|
|
174
|
-
| Component | Import | Key Props |
|
|
175
|
-
|-----------|--------|-----------|
|
|
176
|
-
| `Collapse` | `import { Collapse } from "@matteoaliano/forest-ui"` | `in`, `timeout`, `orientation: "vertical" \| "horizontal"`, `collapsedSize`, `unmountOnExit` |
|
|
177
|
-
| `Fade` | `import { Fade } from "@matteoaliano/forest-ui"` | `in`, `timeout`, `appear` |
|
|
178
|
-
| `Grow` | `import { Grow } from "@matteoaliano/forest-ui"` | `in`, `timeout`, `appear` |
|
|
179
|
-
| `Slide` | `import { Slide } from "@matteoaliano/forest-ui"` | `in`, `direction: "up" \| "down" \| "left" \| "right"`, `timeout`, `container` |
|
|
180
|
-
| `Zoom` | `import { Zoom } from "@matteoaliano/forest-ui"` | `in`, `timeout`, `appear` |
|
|
181
|
-
|
|
182
|
-
## Utilities
|
|
183
|
-
|
|
184
|
-
| Component | Import | Key Props |
|
|
185
|
-
|-----------|--------|-----------|
|
|
186
|
-
| `ClickAwayListener` | `import { ClickAwayListener } from "@matteoaliano/forest-ui"` | `onClickAway` (required), `mouseEvent`, `touchEvent`, `children` |
|
|
187
|
-
| `NoSsr` | `import { NoSsr } from "@matteoaliano/forest-ui"` | `defer`, `fallback`, `children` |
|
|
188
|
-
| `Portal` | `import { Portal } from "@matteoaliano/forest-ui"` | `container`, `disablePortal`, `children` |
|
|
189
|
-
| `Popper` | `import { Popper } from "@matteoaliano/forest-ui"` | `open` (required), `anchorEl`, `placement`, `transition`, `modifiers` |
|
|
190
|
-
| `TextareaAutosize` | `import { TextareaAutosize } from "@matteoaliano/forest-ui"` | `minRows`, `maxRows`, all textarea HTML attributes |
|
|
191
|
-
| `SvgIcon` | `import { SvgIcon } from "@matteoaliano/forest-ui"` | `viewBox`, `fontSize`, `color`, `children` (SVG path elements) |
|
|
192
|
-
| `ButtonBase` | `import { ButtonBase } from "@matteoaliano/forest-ui"` | `onClick`, `disabled`, `href`, `component`, `disableRipple` |
|
|
193
|
-
| `GlobalStyles` | `import { GlobalStyles } from "@matteoaliano/forest-ui"` | `styles` (required) — CSS object or function |
|
|
194
|
-
|
|
195
|
-
## Hooks
|
|
196
|
-
|
|
197
|
-
| Hook | Import | Signature |
|
|
198
|
-
|------|--------|-----------|
|
|
199
|
-
| `useMediaQuery` | `import { useMediaQuery } from "@matteoaliano/forest-ui"` | `useMediaQuery(query): boolean` — responsive breakpoint detection |
|
|
200
|
-
| `useScrollTrigger` | `import { useScrollTrigger } from "@matteoaliano/forest-ui"` | `useScrollTrigger(options?): boolean` — detect scroll for hide-on-scroll AppBars |
|
|
201
|
-
| `useFormControl` | `import { useFormControl } from "@matteoaliano/forest-ui"` | `useFormControl(): FormControlState` — access parent FormControl state |
|
|
202
|
-
| `useTheme` | `import { useTheme } from "@matteoaliano/forest-ui"` | `useTheme(): Theme` — access the current MUI theme object |
|
|
1
|
+
# Forest UI — Component Reference
|
|
2
|
+
|
|
3
|
+
> Full API reference for all components exported by `@matteoaliano/forest-ui`.
|
|
4
|
+
|
|
5
|
+
## Import Pattern
|
|
6
|
+
|
|
7
|
+
```tsx
|
|
8
|
+
// CORRECT — import from forest-ui
|
|
9
|
+
import { Button, TextField, Alert } from "@matteoaliano/forest-ui";
|
|
10
|
+
|
|
11
|
+
// WRONG — never import from @mui/material
|
|
12
|
+
import Button from "@mui/material/Button";
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
> **All MUI components are re-exported.** Never import from `@mui/material` — always use `@matteoaliano/forest-ui`. The only exception is `@mui/icons-material` for icons.
|
|
16
|
+
|
|
17
|
+
## Layout
|
|
18
|
+
|
|
19
|
+
| Component | Import | Key Props |
|
|
20
|
+
|-----------|--------|-----------|
|
|
21
|
+
| `Box` | `import { Box } from "@matteoaliano/forest-ui"` | `sx`, `component`, all HTML attributes |
|
|
22
|
+
| `Stack` | `import { Stack } from "@matteoaliano/forest-ui"` | `direction`, `spacing`, `divider`, `alignItems`, `justifyContent` |
|
|
23
|
+
| `Grid` | `import { Grid } from "@matteoaliano/forest-ui"` | `container`, `size`, `spacing`, `offset`, `columns`, `direction` |
|
|
24
|
+
| `Container` | `import { Container } from "@matteoaliano/forest-ui"` | `maxWidth: "xs" \| "sm" \| "md" \| "lg" \| "xl" \| false`, `fixed`, `disableGutters` |
|
|
25
|
+
|
|
26
|
+
## Form Helpers
|
|
27
|
+
|
|
28
|
+
| Component | Import | Key Props |
|
|
29
|
+
|-----------|--------|-----------|
|
|
30
|
+
| `FormControl` | `import { FormControl } from "@matteoaliano/forest-ui"` | `variant`, `fullWidth`, `error`, `disabled`, `required`, `size` |
|
|
31
|
+
| `FormControlLabel` | `import { FormControlLabel } from "@matteoaliano/forest-ui"` | `control` (required), `label`, `labelPlacement`, `disabled` |
|
|
32
|
+
| `FormGroup` | `import { FormGroup } from "@matteoaliano/forest-ui"` | `row`, `children` |
|
|
33
|
+
| `FormHelperText` | `import { FormHelperText } from "@matteoaliano/forest-ui"` | `error`, `disabled`, `margin` |
|
|
34
|
+
| `FormLabel` | `import { FormLabel } from "@matteoaliano/forest-ui"` | `error`, `focused`, `required`, `disabled`, `color` |
|
|
35
|
+
| `InputAdornment` | `import { InputAdornment } from "@matteoaliano/forest-ui"` | `position: "start" \| "end"`, `variant`, `disablePointerEvents` |
|
|
36
|
+
| `InputBase` | `import { InputBase } from "@matteoaliano/forest-ui"` | `value`, `onChange`, `placeholder`, `multiline`, `rows`, `startAdornment`, `endAdornment` |
|
|
37
|
+
| `InputLabel` | `import { InputLabel } from "@matteoaliano/forest-ui"` | `shrink`, `variant`, `error`, `required`, `disabled` |
|
|
38
|
+
| `OutlinedInput` | `import { OutlinedInput } from "@matteoaliano/forest-ui"` | `label`, `notched`, all InputBase props |
|
|
39
|
+
| `FilledInput` | `import { FilledInput } from "@matteoaliano/forest-ui"` | All InputBase props |
|
|
40
|
+
|
|
41
|
+
## Inputs
|
|
42
|
+
|
|
43
|
+
| Component | Import | Variants / Key Props | Default Props |
|
|
44
|
+
|-----------|--------|----------------------|---------------|
|
|
45
|
+
| `Button` | `import { Button } from "@matteoaliano/forest-ui"` | `variant: "contained" \| "outlined" \| "text"`, `color`, `size: "small" \| "medium" \| "large"`, `disabled`, `startIcon`, `endIcon`, `fullWidth`, `href` | `variant="contained"` |
|
|
46
|
+
| `ButtonGroup` | `import { ButtonGroup } from "@matteoaliano/forest-ui"` | `variant: "contained" \| "outlined" \| "text"`, `size: "small" \| "medium" \| "large"`, `orientation: "horizontal" \| "vertical"`, `color`, `disabled`, `fullWidth` | `variant="contained"` |
|
|
47
|
+
| `TextField` | `import { TextField } from "@matteoaliano/forest-ui"` | `variant: "outlined" \| "filled" \| "standard"`, `size: "small" \| "medium"`, `label`, `error`, `helperText`, `fullWidth`, `multiline`, `rows`, `type`, `placeholder`, `required`, `disabled` | — |
|
|
48
|
+
| `Select` + `MenuItem` | `import { Select, MenuItem } from "@matteoaliano/forest-ui"` | `variant: "outlined" \| "filled" \| "standard"`, `size: "small" \| "medium"`, `multiple`, `displayEmpty`, `label`, `labelId`, `renderValue`, `native`, `error`, `disabled` | — |
|
|
49
|
+
| `MultiSelect` | `import { MultiSelect } from "@matteoaliano/forest-ui"` | `options: { label, value }[]`, `value: string[]`, `onChange: (values) => void`, `selectAll: boolean`, `selectAllLabel: string`, `label` + all SelectProps | `selectAll={true}`, `selectAllLabel="Select All"` |
|
|
50
|
+
| `Checkbox` | `import { Checkbox } from "@matteoaliano/forest-ui"` | `color: "default" \| "primary" \| "secondary" \| "error" \| "info" \| "success" \| "warning"`, `size: "small" \| "medium"`, `checked`, `indeterminate`, `disabled` | — |
|
|
51
|
+
| `RadioGroup` + `Radio` | `import { RadioGroup, Radio } from "@matteoaliano/forest-ui"` | `row`, `value`, `onChange`; Radio: `color`, `size: "small" \| "medium" \| "large"`, `disabled` | — |
|
|
52
|
+
| `Switch` | `import { Switch } from "@matteoaliano/forest-ui"` | `color: "default" \| "primary" \| "secondary" \| "error" \| "info" \| "success" \| "warning"`, `size: "small" \| "medium"`, `checked`, `disabled` | — |
|
|
53
|
+
| `ToggleButton` + `ToggleButtonGroup` | `import { ToggleButton, ToggleButtonGroup } from "@matteoaliano/forest-ui"` | `value`, `exclusive`, `onChange`, `orientation: "horizontal" \| "vertical"`, `size: "small" \| "medium" \| "large"`, `color`, `fullWidth` | — |
|
|
54
|
+
| `Fab` | `import { Fab } from "@matteoaliano/forest-ui"` | `variant: "circular" \| "extended"`, `size: "small" \| "medium" \| "large"`, `color`, `disabled`, `href` | `color="primary"` |
|
|
55
|
+
| `IconButton` | `import { IconButton } from "@matteoaliano/forest-ui"` | `color: "inherit" \| "primary" \| "secondary" \| "error" \| "info" \| "success" \| "warning" \| "default"`, `size: "small" \| "medium" \| "large"`, `disabled`, `disableRipple` | — |
|
|
56
|
+
| `Autocomplete` | `import { Autocomplete } from "@matteoaliano/forest-ui"` | `options`, `renderInput` (required), `multiple`, `freeSolo`, `disableClearable`, `loading`, `groupBy`, `limitTags`, `filterOptions` | — |
|
|
57
|
+
| `Search` | `import { Search } from "@matteoaliano/forest-ui"` | `onClear`, `placeholder`, all TextField props (except `variant`) | `variant="outlined"`, `placeholder="Search..."`, built-in search icon and clear button |
|
|
58
|
+
| `Input` | `import { Input } from "@matteoaliano/forest-ui"` | `value`, `onChange`, `placeholder`, `multiline`, `rows`, `startAdornment`, `endAdornment`, `disabled`, `error` — all InputBase props | — |
|
|
59
|
+
| `DatePicker` | `import { DatePicker } from "@matteoaliano/forest-ui"` | All MUI X DatePicker props (`value`, `onChange`, `label`, `format`, `minDate`, `maxDate`, `disabled`, `readOnly`) | Wraps with `LocalizationProvider` + `AdapterDayjs` automatically |
|
|
60
|
+
|
|
61
|
+
## Data Display
|
|
62
|
+
|
|
63
|
+
| Component | Import | Variants / Key Props | Default Props |
|
|
64
|
+
|-----------|--------|----------------------|---------------|
|
|
65
|
+
| `Badge` | `import { Badge } from "@matteoaliano/forest-ui"` | `variant: "standard" \| "dot"`, `color`, `badgeContent`, `max`, `invisible`, `showZero`, `overlap: "rectangular" \| "circular"`, `anchorOrigin` | — |
|
|
66
|
+
| `Chip` | `import { Chip } from "@matteoaliano/forest-ui"` | `variant: "filled" \| "outlined"`, `color`, `size: "small" \| "medium"`, `label`, `onDelete`, `clickable`, `avatar`, `icon` | `deleteIcon={<CloseOutlined />}` |
|
|
67
|
+
| `Divider` | `import { Divider } from "@matteoaliano/forest-ui"` | `orientation: "horizontal" \| "vertical"`, `variant: "fullWidth" \| "inset" \| "middle"`, `textAlign`, `flexItem` | — |
|
|
68
|
+
| `Typography` | `import { Typography } from "@matteoaliano/forest-ui"` | `variant: "h1"-"h6" \| "subtitle1" \| "subtitle2" \| "body1" \| "body2" \| "caption" \| "overline" \| "button"`, `align`, `gutterBottom`, `noWrap` | — |
|
|
69
|
+
| `Tooltip` | `import { Tooltip } from "@matteoaliano/forest-ui"` | `title` (required), `placement` (12 positions), `arrow`, `followCursor`, `enterDelay`, `leaveDelay` | `arrow={true}` |
|
|
70
|
+
| `Avatar` | `import { Avatar } from "@matteoaliano/forest-ui"` | `src`, `alt`, `variant: "circular" \| "rounded" \| "square"`, `sizes`, `children` (fallback) |
|
|
71
|
+
| `AvatarGroup` | `import { AvatarGroup } from "@matteoaliano/forest-ui"` | `max`, `total`, `spacing`, `variant` |
|
|
72
|
+
| `ImageList` | `import { ImageList } from "@matteoaliano/forest-ui"` | `variant: "masonry" \| "quilted" \| "standard" \| "woven"`, `cols`, `gap`, `rowHeight` |
|
|
73
|
+
| `ImageListItem` | `import { ImageListItem } from "@matteoaliano/forest-ui"` | `cols`, `rows` |
|
|
74
|
+
| `ImageListItemBar` | `import { ImageListItemBar } from "@matteoaliano/forest-ui"` | `title`, `subtitle`, `position`, `actionIcon` |
|
|
75
|
+
| `Logo` | `import { Logo } from "@matteoaliano/forest-ui"` | `product: "wsuite" \| "studio" \| "feedati" \| "ai-hub"`, `variant: "logo" \| "logomark"`, `color: "positive" \| "negative" \| "negative-payoff"`, `sx` | `product="studio"`, `variant="logo"`, `color="positive"`. Studio and AI Hub `logo` variants include the payoff caption — pass `sx={{ height: 64 }}` or larger to render legibly. WSuite/FeeDati only define `positive`; other colors fall back. `negative-payoff` falls back to `negative` for `logomark` (no payoff to invert). |
|
|
76
|
+
| `Rating` | `import { Rating } from "@matteoaliano/forest-ui"` | `value`, `onChange`, `precision`, `max`, `size`, `readOnly`, `disabled` |
|
|
77
|
+
| `Table` family | `import { Table, TableHead, TableBody, TableRow, TableCell, TableContainer } from "@matteoaliano/forest-ui"` | Table: `size: "small" \| "medium"`, `stickyHeader`; TableCell: `align`, `padding`, `sortDirection`, `variant`; TableRow: `hover`, `selected` | — |
|
|
78
|
+
| `DataGrid` | `import { DataGrid, type GridColDef, type GridRenderCellParams, type GridRowSelectionModel } from "@matteoaliano/forest-ui"` | `rows`, `columns`, `paginationModel`, `sortModel`, `filterModel`, `checkboxSelection`, `loading`, `density`. Types: `GridColDef`, `GridRowsProp`, `GridRowParams`, `GridCellParams`, `GridRenderCellParams`, `GridRowSelectionModel`, `GridSortModel`, `GridFilterModel`, `GridPaginationModel` | — |
|
|
79
|
+
| `List` family | `import { List, ListItem, ListItemButton, ListItemIcon, ListItemText, ListItemAvatar, ListSubheader } from "@matteoaliano/forest-ui"` | `dense`, `disablePadding`; ListItemButton: `selected`, `disabled`; ListItemText: `primary`, `secondary` | — |
|
|
80
|
+
| `TableFooter` | `import { TableFooter } from "@matteoaliano/forest-ui"` | `component`, `children` |
|
|
81
|
+
| `TablePagination` | `import { TablePagination } from "@matteoaliano/forest-ui"` | `count`, `page`, `rowsPerPage`, `onPageChange`, `onRowsPerPageChange` |
|
|
82
|
+
| `TableSortLabel` | `import { TableSortLabel } from "@matteoaliano/forest-ui"` | `active`, `direction: "asc" \| "desc"`, `onClick` |
|
|
83
|
+
| `ListItemSecondaryAction` | `import { ListItemSecondaryAction } from "@matteoaliano/forest-ui"` | `children` |
|
|
84
|
+
| `SnackbarContent` | `import { SnackbarContent } from "@matteoaliano/forest-ui"` | `message`, `action` |
|
|
85
|
+
|
|
86
|
+
## Surfaces
|
|
87
|
+
|
|
88
|
+
| Component | Import | Variants / Key Props | Default Props |
|
|
89
|
+
|-----------|--------|----------------------|---------------|
|
|
90
|
+
| `Accordion` family | `import { Accordion, AccordionSummary, AccordionDetails, AccordionActions } from "@matteoaliano/forest-ui"` | `expanded`, `defaultExpanded`, `onChange`, `disabled`, `disableGutters`, `square` | — |
|
|
91
|
+
| `AppBar` + `Toolbar` | `import { AppBar, Toolbar } from "@matteoaliano/forest-ui"` | `position`, `color`, `elevation`; Toolbar: `variant: "dense" \| "regular"` | — |
|
|
92
|
+
| `AppBarNavItem` | `import { AppBarNavItem } from "@matteoaliano/forest-ui"` | `label` (required), `icon`, `selected`, `href`, `sx` — navigation button for AppBar | — |
|
|
93
|
+
| `Card` family | `import { Card, CardContent, CardHeader, CardActions, CardMedia } from "@matteoaliano/forest-ui"` | `variant: "elevation" \| "outlined"`, `elevation`, `raised`; CardHeader: `title`, `subheader`, `avatar`, `action` | — |
|
|
94
|
+
| `Paper` | `import { Paper } from "@matteoaliano/forest-ui"` | `variant: "elevation" \| "outlined"`, `elevation` (0-24), `square` | — |
|
|
95
|
+
| `CardActionArea` | `import { CardActionArea } from "@matteoaliano/forest-ui"` | `onClick`, `href`, `disabled` |
|
|
96
|
+
| `Drawer` | `import { Drawer } from "@matteoaliano/forest-ui"` | `open`, `onClose`, `anchor: "left" \| "right" \| "top" \| "bottom"`, `variant: "permanent" \| "persistent" \| "temporary"`, `hideBackdrop` | `anchor="right"`, `hideBackdrop={true}` |
|
|
97
|
+
| `SwipeableDrawer` | `import { SwipeableDrawer } from "@matteoaliano/forest-ui"` | `onOpen` (required), `onClose` (required), `open`, `anchor`, `swipeAreaWidth` |
|
|
98
|
+
|
|
99
|
+
## Feedback
|
|
100
|
+
|
|
101
|
+
| Component | Import | Variants / Key Props | Default Props |
|
|
102
|
+
|-----------|--------|----------------------|---------------|
|
|
103
|
+
| `Alert` + `AlertTitle` | `import { Alert, AlertTitle } from "@matteoaliano/forest-ui"` | `severity: "success" \| "info" \| "warning" \| "error"`, `variant: "filled" \| "outlined" \| "standard"`, `color`, `icon`, `action`, `onClose` | — |
|
|
104
|
+
| `Dialog` family | `import { Dialog, DialogTitle, DialogContent, DialogActions, DialogContentText } from "@matteoaliano/forest-ui"` | `open` (required), `onClose`, `fullWidth`, `maxWidth`, `fullScreen`, `scroll: "paper" \| "body"` | — |
|
|
105
|
+
| `Backdrop` | `import { Backdrop } from "@matteoaliano/forest-ui"` | `open` (required), `invisible`, `onClick` | — |
|
|
106
|
+
| `LinearProgress` | `import { LinearProgress } from "@matteoaliano/forest-ui"` | `variant: "indeterminate" \| "determinate" \| "buffer" \| "query"`, `value` (0-100), `color` | — |
|
|
107
|
+
| `CircularProgress` | `import { CircularProgress } from "@matteoaliano/forest-ui"` | `variant: "indeterminate" \| "determinate"`, `value` (0-100), `color`, `size`, `thickness` | — |
|
|
108
|
+
| `Skeleton` | `import { Skeleton } from "@matteoaliano/forest-ui"` | `variant: "text" \| "circular" \| "rectangular" \| "rounded"`, `animation: "pulse" \| "wave" \| false`, `width`, `height` | — |
|
|
109
|
+
| `Modal` | `import { Modal } from "@matteoaliano/forest-ui"` | `open` (required), `onClose`, `children`, `keepMounted`, `disableAutoFocus`, `disableEscapeKeyDown` | — |
|
|
110
|
+
| `Popover` | `import { Popover } from "@matteoaliano/forest-ui"` | `open` (required), `anchorEl`, `onClose`, `anchorOrigin`, `transformOrigin`, `elevation` | — |
|
|
111
|
+
| `Snackbar` | `import { Snackbar } from "@matteoaliano/forest-ui"` | `open`, `message`, `autoHideDuration`, `onClose`, `action`, `anchorOrigin` | — |
|
|
112
|
+
| `Slider` | `import { Slider } from "@matteoaliano/forest-ui"` | `value`, `onChange`, `min`, `max`, `step`, `marks`, `valueLabelDisplay`, `orientation`, `size` | — |
|
|
113
|
+
|
|
114
|
+
## Navigation
|
|
115
|
+
|
|
116
|
+
| Component | Import | Variants / Key Props | Default Props |
|
|
117
|
+
|-----------|--------|----------------------|---------------|
|
|
118
|
+
| `Breadcrumbs` | `import { Breadcrumbs } from "@matteoaliano/forest-ui"` | `separator`, `maxItems`, `itemsAfterCollapse`, `itemsBeforeCollapse` | — |
|
|
119
|
+
| `Link` | `import { Link } from "@matteoaliano/forest-ui"` | `href`, `underline: "none" \| "hover" \| "always"`, `color`, `variant` | — |
|
|
120
|
+
| `Menu` + `MenuList` | `import { Menu, MenuList } from "@matteoaliano/forest-ui"` | Menu: `open` (required), `anchorEl`, `onClose`; use with `MenuItem` | — |
|
|
121
|
+
| `Pagination` | `import { Pagination } from "@matteoaliano/forest-ui"` | `count`, `page`, `onChange`, `variant: "text" \| "outlined"`, `shape`, `size`, `color`, `showFirstButton`, `showLastButton` | — |
|
|
122
|
+
| `Stepper` family | `import { Stepper, Step, StepLabel } from "@matteoaliano/forest-ui"` | `activeStep`, `orientation`, `alternativeLabel`, `nonLinear`; Step: `completed`, `disabled`; StepLabel: `optional`, `error` | — |
|
|
123
|
+
| `Tabs` + `Tab` | `import { Tabs, Tab } from "@matteoaliano/forest-ui"` | Tabs: `value`, `onChange`, `variant: "standard" \| "scrollable" \| "fullWidth"`, `orientation`, `centered`; Tab: `label`, `icon`, `iconPosition`, `disabled`, `value` | — |
|
|
124
|
+
| `SidebarNav` | `import { SidebarNav, SidebarItem, useSidebar } from "@matteoaliano/forest-ui"` | `open`, `onOpenChange`, `behavior: "permanent" \| "hover"`, `expandedWidth`, `collapsedWidth`, `showToggle`, `header`, `footer` | `expandedWidth=240`, `collapsedWidth=48`, `behavior="permanent"` |
|
|
125
|
+
| `SidebarItem` | (same import) | `icon` (required), `label` (required), `endAdornment`, `selected`, `onClick`, `disabled` | — |
|
|
126
|
+
| `BottomNavigation` | `import { BottomNavigation } from "@matteoaliano/forest-ui"` | `value`, `onChange`, `showLabels` |
|
|
127
|
+
| `BottomNavigationAction` | `import { BottomNavigationAction } from "@matteoaliano/forest-ui"` | `label`, `icon`, `value`, `showLabel` |
|
|
128
|
+
| `SpeedDial` | `import { SpeedDial } from "@matteoaliano/forest-ui"` | `ariaLabel` (required), `open`, `onOpen`, `onClose`, `icon`, `direction` |
|
|
129
|
+
| `SpeedDialAction` | `import { SpeedDialAction } from "@matteoaliano/forest-ui"` | `icon`, `tooltipTitle`, `onClick` |
|
|
130
|
+
| `SpeedDialIcon` | `import { SpeedDialIcon } from "@matteoaliano/forest-ui"` | `icon`, `openIcon` |
|
|
131
|
+
| `MobileStepper` | `import { MobileStepper } from "@matteoaliano/forest-ui"` | `steps`, `activeStep`, `variant: "dots" \| "progress" \| "text"`, `nextButton`, `backButton` |
|
|
132
|
+
| `PaginationItem` | `import { PaginationItem } from "@matteoaliano/forest-ui"` | `type`, `page`, `selected`, `disabled`, `shape`, `size` |
|
|
133
|
+
| `StepButton` | `import { StepButton } from "@matteoaliano/forest-ui"` | `optional`, `children`, `onClick` |
|
|
134
|
+
| `StepConnector` | `import { StepConnector } from "@matteoaliano/forest-ui"` | (styling via theme) |
|
|
135
|
+
| `StepContent` | `import { StepContent } from "@matteoaliano/forest-ui"` | `children`, `TransitionComponent`, `transitionDuration` |
|
|
136
|
+
| `StepIcon` | `import { StepIcon } from "@matteoaliano/forest-ui"` | `active`, `completed`, `error`, `icon` |
|
|
137
|
+
| `TabScrollButton` | `import { TabScrollButton } from "@matteoaliano/forest-ui"` | `direction: "left" \| "right"`, `orientation`, `disabled` |
|
|
138
|
+
|
|
139
|
+
## Charts
|
|
140
|
+
|
|
141
|
+
Requires `@mui/x-charts` peer dependency. All chart components are re-exported from `@matteoaliano/forest-ui` — never import directly from `@mui/x-charts`. Chart colors are automatically applied from the theme's 12-color series palette.
|
|
142
|
+
|
|
143
|
+
### Chart Components
|
|
144
|
+
|
|
145
|
+
| Component | Import | Variants / Key Props | Default Props |
|
|
146
|
+
|-----------|--------|----------------------|---------------|
|
|
147
|
+
| `BarChart` | `import { BarChart } from "@matteoaliano/forest-ui"` | `series` (supports `variant: "solid" \| "striped"` per series), `colors`, `xAxis`, `yAxis`, `width`, `height` | `grid horizontal`, `borderRadius=4`, highlight/fade on hover |
|
|
148
|
+
| `LineChart` | `import { LineChart } from "@matteoaliano/forest-ui"` | `series`, `colors`, `xAxis`, `yAxis`, `width`, `height` | `curve="linear"`, `strokeWidth=3`, `grid horizontal`, highlight/fade on hover |
|
|
149
|
+
| `PieChart` | `import { PieChart } from "@matteoaliano/forest-ui"` | `series` (data: `{ id, value, label, color? }[]`), `colors`, `width`, `height` | highlight/fade on hover |
|
|
150
|
+
| `ScatterChart` | `import { ScatterChart } from "@matteoaliano/forest-ui"` | `series`, `colors`, `xAxis`, `yAxis`, `width`, `height` | — |
|
|
151
|
+
| `Gauge` | `import { Gauge } from "@matteoaliano/forest-ui"` | `value`, `valueMin`, `valueMax`, `startAngle`, `endAngle`, `width`, `height` | — |
|
|
152
|
+
| `SparkLineChart` | `import { SparkLineChart } from "@matteoaliano/forest-ui"` | `data`, `plotType: "line" \| "bar"`, `width`, `height`, `colors` | — |
|
|
153
|
+
| `useChartColors` | `import { useChartColors } from "@matteoaliano/forest-ui"` | `useChartColors(count)` — returns `string[]` of theme chart series colors (max 12) | — |
|
|
154
|
+
|
|
155
|
+
### Chart Composition Primitives
|
|
156
|
+
|
|
157
|
+
For building custom chart layouts, these low-level primitives are also available:
|
|
158
|
+
|
|
159
|
+
- **Containers:** `ChartContainer`, `ResponsiveChartContainer`, `ChartsSurface`, `ChartsClipPath`
|
|
160
|
+
- **Axis & Grid:** `ChartsAxis`, `ChartsXAxis`, `ChartsYAxis`, `ChartsGrid`, `ChartsReferenceLine`
|
|
161
|
+
- **Legend & Tooltip:** `ChartsLegend`, `DefaultChartsLegend`, `ChartsTooltip`, `ChartsAxisTooltipContent`, `ChartsItemTooltipContent`, `ContinuousColorLegend`, `PiecewiseColorLegend`
|
|
162
|
+
- **Gauge parts:** `GaugeContainer`, `GaugeReferenceArc`, `GaugeValueArc`, `GaugeValueText`
|
|
163
|
+
- **Plot layers — Bar:** `BarPlot`, `BarElement`, `BarElementPath`, `BarLabel`
|
|
164
|
+
- **Plot layers — Line & Area:** `LinePlot`, `LineElement`, `AreaPlot`, `AreaElement`, `LineHighlightPlot`, `MarkPlot`, `AnimatedArea`, `AnimatedLine`
|
|
165
|
+
- **Plot layers — Pie:** `PiePlot`, `PieArc`, `PieArcPlot`, `PieArcLabel`, `PieArcLabelPlot`
|
|
166
|
+
- **Plot layers — Scatter:** `ScatterPlot`, `Scatter`
|
|
167
|
+
- **Interaction:** `ChartsAxisHighlight`, `ChartsOnAxisClickHandler`, `ChartsVoronoiHandler`, `HighlightedProvider`
|
|
168
|
+
- **Text:** `ChartsText`
|
|
169
|
+
- **Hooks:** `useDrawingArea`, `useChartId`, `useSvgRef`, `useXAxis`, `useXScale`, `useYAxis`, `useYScale`, `useAxisTooltip`, `useItemTooltip`, `useMouseTracker`, `useHighlighted`, `useItemHighlighted`, `useGaugeState`
|
|
170
|
+
- **Color palettes:** `blueberryTwilightPalette`, `cheerfulFiestaPalette`, `mangoFusionPalette` (each with `Light` and `Dark` variants)
|
|
171
|
+
|
|
172
|
+
## Transitions
|
|
173
|
+
|
|
174
|
+
| Component | Import | Key Props |
|
|
175
|
+
|-----------|--------|-----------|
|
|
176
|
+
| `Collapse` | `import { Collapse } from "@matteoaliano/forest-ui"` | `in`, `timeout`, `orientation: "vertical" \| "horizontal"`, `collapsedSize`, `unmountOnExit` |
|
|
177
|
+
| `Fade` | `import { Fade } from "@matteoaliano/forest-ui"` | `in`, `timeout`, `appear` |
|
|
178
|
+
| `Grow` | `import { Grow } from "@matteoaliano/forest-ui"` | `in`, `timeout`, `appear` |
|
|
179
|
+
| `Slide` | `import { Slide } from "@matteoaliano/forest-ui"` | `in`, `direction: "up" \| "down" \| "left" \| "right"`, `timeout`, `container` |
|
|
180
|
+
| `Zoom` | `import { Zoom } from "@matteoaliano/forest-ui"` | `in`, `timeout`, `appear` |
|
|
181
|
+
|
|
182
|
+
## Utilities
|
|
183
|
+
|
|
184
|
+
| Component | Import | Key Props |
|
|
185
|
+
|-----------|--------|-----------|
|
|
186
|
+
| `ClickAwayListener` | `import { ClickAwayListener } from "@matteoaliano/forest-ui"` | `onClickAway` (required), `mouseEvent`, `touchEvent`, `children` |
|
|
187
|
+
| `NoSsr` | `import { NoSsr } from "@matteoaliano/forest-ui"` | `defer`, `fallback`, `children` |
|
|
188
|
+
| `Portal` | `import { Portal } from "@matteoaliano/forest-ui"` | `container`, `disablePortal`, `children` |
|
|
189
|
+
| `Popper` | `import { Popper } from "@matteoaliano/forest-ui"` | `open` (required), `anchorEl`, `placement`, `transition`, `modifiers` |
|
|
190
|
+
| `TextareaAutosize` | `import { TextareaAutosize } from "@matteoaliano/forest-ui"` | `minRows`, `maxRows`, all textarea HTML attributes |
|
|
191
|
+
| `SvgIcon` | `import { SvgIcon } from "@matteoaliano/forest-ui"` | `viewBox`, `fontSize`, `color`, `children` (SVG path elements) |
|
|
192
|
+
| `ButtonBase` | `import { ButtonBase } from "@matteoaliano/forest-ui"` | `onClick`, `disabled`, `href`, `component`, `disableRipple` |
|
|
193
|
+
| `GlobalStyles` | `import { GlobalStyles } from "@matteoaliano/forest-ui"` | `styles` (required) — CSS object or function |
|
|
194
|
+
|
|
195
|
+
## Hooks
|
|
196
|
+
|
|
197
|
+
| Hook | Import | Signature |
|
|
198
|
+
|------|--------|-----------|
|
|
199
|
+
| `useMediaQuery` | `import { useMediaQuery } from "@matteoaliano/forest-ui"` | `useMediaQuery(query): boolean` — responsive breakpoint detection |
|
|
200
|
+
| `useScrollTrigger` | `import { useScrollTrigger } from "@matteoaliano/forest-ui"` | `useScrollTrigger(options?): boolean` — detect scroll for hide-on-scroll AppBars |
|
|
201
|
+
| `useFormControl` | `import { useFormControl } from "@matteoaliano/forest-ui"` | `useFormControl(): FormControlState` — access parent FormControl state |
|
|
202
|
+
| `useTheme` | `import { useTheme } from "@matteoaliano/forest-ui"` | `useTheme(): Theme` — access the current MUI theme object |
|