Attachment
Add any type of attachment or attachments with preview. Click logo or picture to preview.
#
ExampleAdd attachment with preview.
#
SizeAdd file size by adding size
prop to attachment information array.
#
Additional itemAdd additional content under the title by additionalItem
prop.
#
ImageClick on picture to see preview.
Use simple
to show only image preview.
#
VideoClick on video to preview.
#
AudioClick on Audio to preview.
#
Multiple attachmentsAdd multiple attachments by attachments
prop.
#
IndexSet the file to start from attachments by index
. (Index number starts with 0)
#
APIName | Type | Defualt | Description | |
---|---|---|---|---|
attachment | name | string | Define file name | |
type | string | Define file type | ||
url | string | Declare file path | ||
size | number | Shows file size | ||
scrollBottom | function | Define function that runs after the image finished loading | ||
additionalItem | React.ReactNode | Add additional item | ||
simple | boolean | Shows only image | ||
index | number | When previewing attachments, define which file to start from | ||
attachments (array) | name | string | Define file name | |
type | string | Define file type | ||
url | string | Declare file path | ||
size | number | Shows file size |