Filpresentatör

Komponent
Status
Produktionsklar
Innehåll

Filpresentatör används för att presentera fil, till exempel när användaren valt fil med filväljaren.

Filpresentatör med knapp och progress

Ikoner

Filikonen till vänster bestäms av mimetype:

  • Bilder använder f-icon-pic
  • PDF använder f-icon-pdf
  • Word-dokument använder f-icon-doc
  • Övriga filer använder f-icon-file

API

Props

id: string Optional

The id for the input id attribute. The id for the label for attribute. If the prop is not set a random value will be generated.

Default: () => ElementIdService.generateElementId()

fileName: string

The file name.

mimeType: string Optional

The mime type, can be changed if i.e server change the name.

Default: undefined

originalMimeType: string Optional

The name of the file uploaded

Default: undefined

changedMimeTypeText: string Optional

If file name changed, this info will be displayed, placeholder %before% and %after% will be replaced with originalMimeType and mimeType

Default: undefined

Slots

row

Slot for any content that should be placed beside the file icon and file name. If several elements is placed, they will be spaced evenly, for more information see https://developer.mozilla.org/en-US/docs/Web/CSS/justify-content.

default

Slot for any type of content. Elements placed in this slot will be position after the file icon and file name.

Relaterat

Esc för att stänga Pil upp/ner för att navigera Enter för att välja