Attachments API
Props, callbacks and methods. Select an underlined type to explore its fields, allowed values and callback arguments.
Attachments5 props1 callbacks0 methods
Preset and CSS
Set preset.className to attach your CSS class to the component's rendered surface. Explicit component props take precedence over preset options.
CSS parts in the example [data-part="root"]
Use styles.root and styles.parts in a theme and generate a CSS file with themeToCss. For other JSON-friendly component props, spread presetProps(preset) before explicit props. Parts and states depend on configuration; the gallery shows those visible in the current preview.
Props5
| Name | Type | Description |
|---|---|---|
labelRequired | string | Accessible label for the file list. |
itemsRequired |
| Files in display order. |
removeLabelRequired |
| Localized remove action label for a file. |
presetOptional |
| Optional presentation preset. |
classNameOptional | string | undefined | Additional root class names. |
Events and callbacks1
| Name | Type | Description |
|---|---|---|
onRemoveOptional |
| Called when a file is removed; omit for a read-only list. |
Methods0
No component-specific imperative methods. Use props and callbacks to control this component.