File<mds-file>Generated from @maggioli-design-system/magma@2.3.0dist/documentation.json. Encapsulation: shadow.
Magma components are web components: custom elements you write like HTML tags, with any framework or without one. Props configure them, events tell you what happened, methods are functions you call on the element and slots take the content you put inside it.
Props
Set a prop as an HTML attribute in the markup, or as a property from JavaScript. The Attribute column gives the name of the attribute, a dash when it is the same as the property; props without one, such as arrays and functions, are set from JavaScript only. To turn a boolean attribute off, remove it: never write disabled="false".description
-
string | undefinedOverrides the default filetype description
filename
-
stringThe filename shown as component title, is used to auto assign one of the filetype known in the filetype dictionary
format
-
string | undefinedSets if the download icon must be shown or not
hideDownloadedIconhide-downloaded-iconboolean | undefinedfalseHides the download icon
preview
-
string | undefinedThe image preview src if available of a file, useful if you have a logo to display, or a smaller version of a bigger image
suffix
-
7z | ace | ai | db | default | dmg | doc | docm | docx | eml | eps | exe | flac | gif | heic | htm | html | jpe | jpeg | jpg | js | json | jsx | m2v | mp2 | mp3 | mp4 | mp4v | mpeg | mpg | mpg4 | mpga | odf | odp | ods | odt | ole | p7m | pdf | php | png | ppt | rar | rtf | sass | shtml | svg | tar | tiff | ts | tsd | txt | wav | webp | xar | xls | xlsx | xml | zip | undefinedOverrides the automatic filetype recongition by forcing the suffix to one of the available formats choosen
Events
mdsFileDownloadMdsFileEventDetailEmits when the component is clicked, returning file infos