@ceed/cds 1.29.0 → 1.30.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/dist/Overview.md +5 -5
- package/dist/components/Calendar/utils/index.d.ts +1 -0
- package/dist/components/DatePicker/DatePicker.d.ts +4 -0
- package/dist/components/DateRangePicker/DateRangePicker.d.ts +4 -0
- package/dist/components/MonthRangePicker/MonthRangePicker.d.ts +8 -0
- package/dist/components/data-display/Avatar.md +110 -69
- package/dist/components/data-display/Badge.md +91 -39
- package/dist/components/data-display/Chip.md +49 -20
- package/dist/components/data-display/DataTable.md +93 -0
- package/dist/components/data-display/InfoSign.md +12 -0
- package/dist/components/data-display/Table.md +72 -55
- package/dist/components/data-display/Tooltip.md +40 -40
- package/dist/components/data-display/Typography.md +53 -70
- package/dist/components/feedback/Alert.md +88 -72
- package/dist/components/feedback/CircularProgress.md +17 -0
- package/dist/components/feedback/Skeleton.md +17 -0
- package/dist/components/inputs/Button.md +94 -68
- package/dist/components/inputs/ButtonGroup.md +17 -0
- package/dist/components/inputs/Calendar.md +118 -457
- package/dist/components/inputs/Checkbox.md +185 -430
- package/dist/components/inputs/CurrencyInput.md +22 -0
- package/dist/components/inputs/DatePicker.md +59 -5
- package/dist/components/inputs/DateRangePicker.md +46 -5
- package/dist/components/inputs/FilterableCheckboxGroup.md +20 -3
- package/dist/components/inputs/FormControl.md +32 -2
- package/dist/components/inputs/IconButton.md +18 -0
- package/dist/components/inputs/Input.md +198 -136
- package/dist/components/inputs/MonthPicker.md +59 -5
- package/dist/components/inputs/MonthRangePicker.md +44 -5
- package/dist/components/inputs/PercentageInput.md +25 -0
- package/dist/components/inputs/RadioButton.md +23 -0
- package/dist/components/inputs/RadioList.md +20 -1
- package/dist/components/inputs/RadioTileGroup.md +37 -3
- package/dist/components/inputs/Select.md +56 -0
- package/dist/components/inputs/Slider.md +23 -0
- package/dist/components/inputs/Switch.md +20 -0
- package/dist/components/inputs/Textarea.md +32 -8
- package/dist/components/inputs/Uploader/Uploader.md +21 -0
- package/dist/components/layout/Box.md +52 -41
- package/dist/components/layout/Grid.md +87 -81
- package/dist/components/layout/Stack.md +88 -68
- package/dist/components/navigation/Breadcrumbs.md +57 -46
- package/dist/components/navigation/Drawer.md +17 -0
- package/dist/components/navigation/Dropdown.md +13 -0
- package/dist/components/navigation/IconMenuButton.md +17 -0
- package/dist/components/navigation/InsetDrawer.md +130 -292
- package/dist/components/navigation/Link.md +78 -0
- package/dist/components/navigation/Menu.md +17 -0
- package/dist/components/navigation/MenuButton.md +18 -0
- package/dist/components/navigation/Pagination.md +13 -0
- package/dist/components/navigation/Stepper.md +15 -0
- package/dist/components/navigation/Tabs.md +27 -0
- package/dist/components/surfaces/Accordions.md +804 -49
- package/dist/components/surfaces/Card.md +173 -97
- package/dist/components/surfaces/Divider.md +246 -82
- package/dist/components/surfaces/Sheet.md +15 -0
- package/dist/index.browser.js +4 -4
- package/dist/index.browser.js.map +3 -3
- package/dist/index.cjs +99 -39
- package/dist/index.js +99 -39
- package/framer/index.js +1 -1
- package/package.json +1 -1
|
@@ -261,6 +261,28 @@ function BudgetSetting() {
|
|
|
261
261
|
|
|
262
262
|
5. **Handle negative values carefully**: CurrencyInput supports negative values. If negatives are not valid for your use case, validate in `onChange`.
|
|
263
263
|
|
|
264
|
+
## Props and Customization
|
|
265
|
+
|
|
266
|
+
### Key Props
|
|
267
|
+
|
|
268
|
+
| Prop | Type | Default | Description |
|
|
269
|
+
| -------------- | -------------------------------------------------------- | ------- | -------------------------------------------------------- |
|
|
270
|
+
| `value` | `number` | - | Currency value (controlled mode) |
|
|
271
|
+
| `defaultValue` | `number` | - | Initial currency value (uncontrolled mode) |
|
|
272
|
+
| `onChange` | `(event: { target: { name?, value?: number } }) => void` | - | Callback when the value changes |
|
|
273
|
+
| `currency` | `'USD' \| 'KRW' \| 'CAD'` | `'USD'` | Currency code (determines symbol and formatting) |
|
|
274
|
+
| `useMinorUnit` | `boolean` | `false` | When true, value is in minor units (e.g., cents for USD) |
|
|
275
|
+
| `max` | `number` | - | Maximum allowed value |
|
|
276
|
+
| `label` | `ReactNode` | - | Form label displayed above the input |
|
|
277
|
+
| `helperText` | `ReactNode` | - | Helper text displayed below the input |
|
|
278
|
+
| `error` | `boolean` | `false` | Applies danger color to indicate validation error |
|
|
279
|
+
| `required` | `boolean` | `false` | Marks the field as required |
|
|
280
|
+
| `disabled` | `boolean` | `false` | Disables the input |
|
|
281
|
+
| `name` | `string` | - | HTML name attribute for form submission |
|
|
282
|
+
| `placeholder` | `string` | - | Placeholder text when the input is empty |
|
|
283
|
+
| `size` | `'sm' \| 'md' \| 'lg'` | `'md'` | Input size |
|
|
284
|
+
| `sx` | `SxProps` | - | Custom styles using the MUI system |
|
|
285
|
+
|
|
264
286
|
## Accessibility
|
|
265
287
|
|
|
266
288
|
- The input has `role="textbox"` with proper labeling via the `label` prop.
|
|
@@ -347,9 +347,7 @@ Multiple DatePicker instances can share the same value for dependent field scena
|
|
|
347
347
|
</Stack>
|
|
348
348
|
```
|
|
349
349
|
|
|
350
|
-
##
|
|
351
|
-
|
|
352
|
-
### Form with Validation
|
|
350
|
+
## Form with Validation
|
|
353
351
|
|
|
354
352
|
```tsx
|
|
355
353
|
function BookingForm() {
|
|
@@ -382,7 +380,7 @@ function BookingForm() {
|
|
|
382
380
|
}
|
|
383
381
|
```
|
|
384
382
|
|
|
385
|
-
|
|
383
|
+
## Custom Date Disabling (Weekdays Only)
|
|
386
384
|
|
|
387
385
|
```tsx
|
|
388
386
|
function AppointmentPicker() {
|
|
@@ -406,7 +404,7 @@ function AppointmentPicker() {
|
|
|
406
404
|
}
|
|
407
405
|
```
|
|
408
406
|
|
|
409
|
-
|
|
407
|
+
## Locale-Aware Display
|
|
410
408
|
|
|
411
409
|
```tsx
|
|
412
410
|
function RegionalDateField({ locale }: { locale: string }) {
|
|
@@ -480,6 +478,62 @@ function RegionalDateField({ locale }: { locale: string }) {
|
|
|
480
478
|
<DatePicker value={invalidDate} />
|
|
481
479
|
```
|
|
482
480
|
|
|
481
|
+
## Props and Customization
|
|
482
|
+
|
|
483
|
+
### Key Props
|
|
484
|
+
|
|
485
|
+
| Prop | Type | Default | Description |
|
|
486
|
+
| ------------------- | ------------------------------------------------------- | -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
487
|
+
| `value` | `string` | - | Selected date string in `format` (controlled mode) |
|
|
488
|
+
| `defaultValue` | `string` | `''` | Initial date string (uncontrolled mode) |
|
|
489
|
+
| `onChange` | `(event: { target: { name?, value: string } }) => void` | - | Callback when the date changes. Value is in `format` |
|
|
490
|
+
| `format` | `string` | `'YYYY/MM/DD'` | Format of the `value` and `onChange` value. Determines the internal data format |
|
|
491
|
+
| `displayFormat` | `string` | `'YYYY/MM/DD'` | Format displayed in the input field. Can differ from `format` for locale display. Supports `MMM` (short month name) and `MMMM` (full month name) tokens |
|
|
492
|
+
| `locale` | `string` | `'default'` | Locale for month names when using `MMM`/`MMMM` tokens in `displayFormat` (BCP 47 format, e.g., `'en-US'`, `'ko-KR'`) |
|
|
493
|
+
| `label` | `ReactNode` | - | Form label displayed above the input |
|
|
494
|
+
| `helperText` | `ReactNode` | - | Helper text displayed below the input |
|
|
495
|
+
| `error` | `boolean` | `false` | Applies danger color to indicate validation error |
|
|
496
|
+
| `required` | `boolean` | `false` | Marks the field as required (adds asterisk to label) |
|
|
497
|
+
| `disabled` | `boolean` | `false` | Disables the entire component |
|
|
498
|
+
| `name` | `string` | - | HTML name attribute for form submission |
|
|
499
|
+
| `minDate` | `string` | - | Minimum selectable date (in `format`) |
|
|
500
|
+
| `maxDate` | `string` | - | Maximum selectable date (in `format`) |
|
|
501
|
+
| `disableFuture` | `boolean` | `false` | Disables all future dates |
|
|
502
|
+
| `disablePast` | `boolean` | `false` | Disables all past dates |
|
|
503
|
+
| `shouldDisableDate` | `(date: string) => boolean` | - | Custom function to disable specific dates. Receives date in `format`. Return `true` to disable |
|
|
504
|
+
| `inputReadOnly` | `boolean` | `false` | Prevents keyboard typing in the input (users must use the calendar popup) |
|
|
505
|
+
| `hideClearButton` | `boolean` | `false` | Hides the clear button in the calendar popup |
|
|
506
|
+
|
|
507
|
+
### format vs displayFormat
|
|
508
|
+
|
|
509
|
+
| Prop | Controls | Example |
|
|
510
|
+
| --------------- | ------------------------------------------------------ | ------------------------------------------------- |
|
|
511
|
+
| `format` | Value in `onChange`, `value`, and `defaultValue` props | `'YYYY-MM-DD'` → onChange receives `'2024-05-03'` |
|
|
512
|
+
| `displayFormat` | What the user sees in the input field | `'MM/DD/YYYY'` → input shows `05/03/2024` |
|
|
513
|
+
|
|
514
|
+
When both are set, the component converts between formats internally. This lets you keep a consistent API format while showing locale-appropriate display.
|
|
515
|
+
|
|
516
|
+
### Alphabetic Month Tokens (MMM / MMMM)
|
|
517
|
+
|
|
518
|
+
The `displayFormat` prop supports alphabetic month tokens for more human-readable date display:
|
|
519
|
+
|
|
520
|
+
| Token | Output | Example |
|
|
521
|
+
| ------ | ---------------------- | ------------------------------ |
|
|
522
|
+
| `MMM` | Abbreviated month name | `Jan`, `Feb`, `Apr` |
|
|
523
|
+
| `MMMM` | Full month name | `January`, `February`, `April` |
|
|
524
|
+
|
|
525
|
+
When `displayFormat` contains `MMM` or `MMMM`, the input becomes **read-only** and the user must select a date through the calendar popup. Use the `locale` prop to control the language of month names (e.g., `locale="ko-KR"` for Korean month names).
|
|
526
|
+
|
|
527
|
+
```tsx
|
|
528
|
+
<DatePicker displayFormat="MMM DD, YYYY" locale="en-US" />
|
|
529
|
+
// → "Apr 09, 2026"
|
|
530
|
+
|
|
531
|
+
<DatePicker displayFormat="MMMM DD, YYYY" locale="ko-KR" />
|
|
532
|
+
// → "4월 09, 2026"
|
|
533
|
+
```
|
|
534
|
+
|
|
535
|
+
> **Note**: DatePicker also accepts all Input props (e.g., `size`, `variant`, `color`, `startDecorator`, `placeholder`, `sx`).
|
|
536
|
+
|
|
483
537
|
## Accessibility
|
|
484
538
|
|
|
485
539
|
- **Keyboard navigation**: Tab moves focus between the input and the calendar toggle button. Arrow keys navigate dates within the open calendar. Enter selects the focused date, and Escape closes the calendar popup.
|
|
@@ -429,9 +429,7 @@ Example of integrating an external reset button to clear the selected date range
|
|
|
429
429
|
</div>
|
|
430
430
|
```
|
|
431
431
|
|
|
432
|
-
##
|
|
433
|
-
|
|
434
|
-
### Booking Form
|
|
432
|
+
## Booking Form
|
|
435
433
|
|
|
436
434
|
```tsx
|
|
437
435
|
function BookingForm() {
|
|
@@ -465,7 +463,7 @@ function BookingForm() {
|
|
|
465
463
|
}
|
|
466
464
|
```
|
|
467
465
|
|
|
468
|
-
|
|
466
|
+
## Report Date Filter
|
|
469
467
|
|
|
470
468
|
```tsx
|
|
471
469
|
function ReportFilters({ onFilter }) {
|
|
@@ -493,7 +491,7 @@ function ReportFilters({ onFilter }) {
|
|
|
493
491
|
}
|
|
494
492
|
```
|
|
495
493
|
|
|
496
|
-
|
|
494
|
+
## Separate API and Display Formats
|
|
497
495
|
|
|
498
496
|
```tsx
|
|
499
497
|
function DataExport() {
|
|
@@ -562,6 +560,49 @@ const getDuration = (value) => {
|
|
|
562
560
|
<DateRangePicker helperText={getDuration(dateRange)} />
|
|
563
561
|
```
|
|
564
562
|
|
|
563
|
+
## Props and Customization
|
|
564
|
+
|
|
565
|
+
### Key Props
|
|
566
|
+
|
|
567
|
+
| Prop | Type | Default | Description |
|
|
568
|
+
| ----------------- | ------------------------------------------------------- | -------------- | -------------------------------------------------------------------------------------------------------------------- |
|
|
569
|
+
| `value` | `string` | - | Selected date range string in `format` (controlled mode) |
|
|
570
|
+
| `defaultValue` | `string` | `''` | Initial date range string (uncontrolled mode) |
|
|
571
|
+
| `onChange` | `(event: { target: { name?, value: string } }) => void` | - | Callback when the date range changes |
|
|
572
|
+
| `format` | `string` | `'YYYY/MM/DD'` | Format of the `value` and `onChange` value |
|
|
573
|
+
| `displayFormat` | `string` | `'YYYY/MM/DD'` | Format displayed in the input field. Supports `MMM` (short month name) and `MMMM` (full month name) tokens |
|
|
574
|
+
| `locale` | `string` | `'default'` | Locale for month names when using `MMM`/`MMMM` tokens in `displayFormat` (BCP 47 format, e.g., `'en-US'`, `'ko-KR'`) |
|
|
575
|
+
| `label` | `ReactNode` | - | Form label displayed above the input |
|
|
576
|
+
| `helperText` | `ReactNode` | - | Helper text displayed below the input |
|
|
577
|
+
| `error` | `boolean` | `false` | Applies danger color to indicate validation error |
|
|
578
|
+
| `required` | `boolean` | `false` | Marks the field as required |
|
|
579
|
+
| `disabled` | `boolean` | `false` | Disables the entire component |
|
|
580
|
+
| `name` | `string` | - | HTML name attribute for form submission |
|
|
581
|
+
| `minDate` | `string` | - | Minimum selectable date (in `format`) |
|
|
582
|
+
| `maxDate` | `string` | - | Maximum selectable date (in `format`) |
|
|
583
|
+
| `disableFuture` | `boolean` | `false` | Disables all future dates |
|
|
584
|
+
| `disablePast` | `boolean` | `false` | Disables all past dates |
|
|
585
|
+
| `inputReadOnly` | `boolean` | `false` | Prevents keyboard typing (calendar-only input) |
|
|
586
|
+
| `hideClearButton` | `boolean` | `false` | Hides the clear button in the calendar popup |
|
|
587
|
+
|
|
588
|
+
### Alphabetic Month Tokens (MMM / MMMM)
|
|
589
|
+
|
|
590
|
+
The `displayFormat` prop supports alphabetic month tokens for more human-readable date display:
|
|
591
|
+
|
|
592
|
+
| Token | Output | Example |
|
|
593
|
+
| ------ | ---------------------- | ------------------------------ |
|
|
594
|
+
| `MMM` | Abbreviated month name | `Jan`, `Feb`, `Apr` |
|
|
595
|
+
| `MMMM` | Full month name | `January`, `February`, `April` |
|
|
596
|
+
|
|
597
|
+
When `displayFormat` contains `MMM` or `MMMM`, the input becomes **read-only** and the user must select dates through the calendar popup. Use the `locale` prop to control the language of month names.
|
|
598
|
+
|
|
599
|
+
```tsx
|
|
600
|
+
<DateRangePicker displayFormat="MMM DD, YYYY" locale="en-US" />
|
|
601
|
+
// → "Apr 01, 2026 - Apr 09, 2026"
|
|
602
|
+
```
|
|
603
|
+
|
|
604
|
+
> **Note**: DateRangePicker also accepts all Input props (e.g., `size`, `variant`, `color`, `sx`).
|
|
605
|
+
|
|
565
606
|
## Accessibility
|
|
566
607
|
|
|
567
608
|
- The input has `role="textbox"` and the calendar button has `aria-label="Toggle Calendar"` for screen reader identification.
|
|
@@ -6,10 +6,10 @@ FilterableCheckboxGroup is a multi-select component that combines a search input
|
|
|
6
6
|
|
|
7
7
|
Key capabilities include a "Select all" toggle for bulk selection, automatic sorting (selected items first, then alphabetical), customizable list height, and built-in form integration via `label`, `helperText`, and `required` props. The component accepts options as either simple strings or `{ value, label }` objects.
|
|
8
8
|
|
|
9
|
-
> **
|
|
9
|
+
> **Using built-in props is recommended when building forms**
|
|
10
10
|
>
|
|
11
|
-
>
|
|
12
|
-
>
|
|
11
|
+
> This component provides built-in form-related props such as `label` and `helperText`.
|
|
12
|
+
> When building a form, use the component's built-in props instead of creating separate labels or helper text with Typography.
|
|
13
13
|
|
|
14
14
|
```tsx
|
|
15
15
|
<FilterableCheckboxGroup
|
|
@@ -310,6 +310,23 @@ When dealing with a large set of options like countries, the search filter and v
|
|
|
310
310
|
|
|
311
311
|
5. **Keep option labels concise.** Long labels will be truncated with an ellipsis. If detailed descriptions are needed, consider using a tooltip or a separate detail view.
|
|
312
312
|
|
|
313
|
+
## Props and Customization
|
|
314
|
+
|
|
315
|
+
### Key Props
|
|
316
|
+
|
|
317
|
+
| Prop | Type | Default | Description |
|
|
318
|
+
| ------------- | -------------------------------------------------------- | ---------- | --------------------------------------------------- |
|
|
319
|
+
| `options` | `{ value: string; label: string; disabled?: boolean }[]` | (required) | Array of checkbox options |
|
|
320
|
+
| `value` | `string[]` | - | Selected values (controlled mode) |
|
|
321
|
+
| `onChange` | `(value: string[]) => void` | - | Callback when selection changes |
|
|
322
|
+
| `label` | `ReactNode` | - | Group label displayed above the component |
|
|
323
|
+
| `helperText` | `ReactNode` | - | Helper text displayed below the component |
|
|
324
|
+
| `placeholder` | `string` | - | Placeholder text for the search input |
|
|
325
|
+
| `required` | `boolean` | `false` | Marks the field as required |
|
|
326
|
+
| `disabled` | `boolean` | `false` | Disables all checkboxes |
|
|
327
|
+
| `size` | `'sm' \| 'md' \| 'lg'` | `'md'` | Component size |
|
|
328
|
+
| `maxHeight` | `string \| number` | `300` | Maximum height of the options list before scrolling |
|
|
329
|
+
|
|
313
330
|
## Accessibility
|
|
314
331
|
|
|
315
332
|
- The search input is labeled by the component's `label` prop, ensuring screen readers announce its purpose.
|
|
@@ -294,8 +294,8 @@ function SettingsForm() {
|
|
|
294
294
|
|
|
295
295
|
> **Tip: Use built-in form props instead**
|
|
296
296
|
>
|
|
297
|
-
> Input, Select, Textarea, DatePicker
|
|
298
|
-
>
|
|
297
|
+
> Input-family components such as Input, Select, Textarea, and DatePicker support `label` and `helperText` props directly.
|
|
298
|
+
> For simple form fields, using each component's built-in props is more concise.
|
|
299
299
|
>
|
|
300
300
|
> ```tsx
|
|
301
301
|
> // ✅ Simpler: built-in props
|
|
@@ -352,6 +352,36 @@ function SettingsForm() {
|
|
|
352
352
|
|
|
353
353
|
5. **Provide helpful error messages**: When using the error state, always include a FormHelperText explaining what went wrong and how to fix it.
|
|
354
354
|
|
|
355
|
+
## Props and Customization
|
|
356
|
+
|
|
357
|
+
### FormControl Props
|
|
358
|
+
|
|
359
|
+
| Prop | Type | Default | Description |
|
|
360
|
+
| ------------- | -------------------------------------------------------------- | ------------ | ----------------------------------------------------------------- |
|
|
361
|
+
| `children` | `ReactNode` | - | Form field elements (FormLabel, Input, FormHelperText, etc.) |
|
|
362
|
+
| `error` | `boolean` | `false` | Applies error styling to child components |
|
|
363
|
+
| `disabled` | `boolean` | `false` | Disables all child form elements |
|
|
364
|
+
| `required` | `boolean` | `false` | Adds required indicator to FormLabel and `aria-required` to input |
|
|
365
|
+
| `size` | `'sm' \| 'md' \| 'lg'` | `'md'` | Size applied to child components |
|
|
366
|
+
| `color` | `'primary' \| 'neutral' \| 'danger' \| 'success' \| 'warning'` | `'neutral'` | Color scheme |
|
|
367
|
+
| `orientation` | `'horizontal' \| 'vertical'` | `'vertical'` | Layout direction |
|
|
368
|
+
| `sx` | `SxProps` | - | Custom styles using the MUI system |
|
|
369
|
+
|
|
370
|
+
### FormLabel Props
|
|
371
|
+
|
|
372
|
+
| Prop | Type | Default | Description |
|
|
373
|
+
| ---------- | ----------- | ------- | ------------------------------------------------------- |
|
|
374
|
+
| `children` | `ReactNode` | - | Label text |
|
|
375
|
+
| `required` | `boolean` | - | Shows asterisk (inherited from FormControl when nested) |
|
|
376
|
+
|
|
377
|
+
### FormHelperText Props
|
|
378
|
+
|
|
379
|
+
| Prop | Type | Default | Description |
|
|
380
|
+
| ---------- | ----------- | ------- | ---------------------------- |
|
|
381
|
+
| `children` | `ReactNode` | - | Helper or error message text |
|
|
382
|
+
|
|
383
|
+
> **Note**: FormControl, FormLabel, and FormHelperText accept all their respective Joy UI props.
|
|
384
|
+
|
|
355
385
|
## Accessibility
|
|
356
386
|
|
|
357
387
|
- FormControl automatically associates FormLabel with the input using `htmlFor` and `id`.
|
|
@@ -402,6 +402,24 @@ import ArrowBackIcon from '@mui/icons-material/ArrowBack';
|
|
|
402
402
|
|
|
403
403
|
5. **Maintain consistent sizing within the same context.** Use the same `size` and `variant` for all IconButtons in a toolbar or action group to keep the interface clean and predictable.
|
|
404
404
|
|
|
405
|
+
## Props and Customization
|
|
406
|
+
|
|
407
|
+
### Key Props
|
|
408
|
+
|
|
409
|
+
| Prop | Type | Default | Description |
|
|
410
|
+
| ----------- | -------------------------------------------------------------- | ----------- | ---------------------------------------- |
|
|
411
|
+
| `children` | `ReactNode` | - | Icon element to render inside the button |
|
|
412
|
+
| `variant` | `'solid' \| 'soft' \| 'outlined' \| 'plain'` | `'plain'` | Visual style |
|
|
413
|
+
| `size` | `'sm' \| 'md' \| 'lg'` | `'md'` | Button size |
|
|
414
|
+
| `color` | `'primary' \| 'neutral' \| 'danger' \| 'success' \| 'warning'` | `'neutral'` | Color scheme |
|
|
415
|
+
| `disabled` | `boolean` | `false` | Disables the button |
|
|
416
|
+
| `loading` | `boolean` | `false` | Shows a loading indicator |
|
|
417
|
+
| `component` | `ElementType` | `'button'` | Root element type (polymorphic) |
|
|
418
|
+
| `onClick` | `(event: MouseEvent) => void` | - | Click event handler |
|
|
419
|
+
| `sx` | `SxProps` | - | Custom styles using the MUI system |
|
|
420
|
+
|
|
421
|
+
> **Note**: IconButton also accepts all Joy UI IconButton props and Framer Motion props.
|
|
422
|
+
|
|
405
423
|
## Accessibility
|
|
406
424
|
|
|
407
425
|
- **`aria-label` is essential**: Every IconButton must have either an `aria-label`, `aria-labelledby`, or a wrapping Tooltip with `title` to provide a text alternative for screen readers.
|