@exhaustive-ui/mcp 22.1.0 → 22.2.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/data/components/fileinput.md +565 -0
- package/data/components.json +1086 -0
- package/data/llms-full.txt +669 -0
- package/data/llms.txt +1 -0
- package/data/manifest.json +1039 -1
- package/data/snapshot.json +3 -3
- package/dist/index.mjs +13 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/data/llms-full.txt
CHANGED
|
@@ -17618,6 +17618,675 @@ Fieldset is a grouping component with the optional content toggle feature.
|
|
|
17618
17618
|
|
|
17619
17619
|
---
|
|
17620
17620
|
|
|
17621
|
+
# Angular FileInput Component
|
|
17622
|
+
|
|
17623
|
+
FileInput selects files by drag and drop, paste or the file picker, validates each file and uploads it with its own progress. It has a list, an images and an avatar variant, and works with every kind of Angular form.
|
|
17624
|
+
|
|
17625
|
+
## Accessibility
|
|
17626
|
+
|
|
17627
|
+
Screen Reader The dropzone, the add tile and the avatar are buttons that open the native file picker, which stays hidden. Describe them with ariaLabelledBy or ariaLabel ; the hint is linked to the dropzone with aria-describedby . The file list is labelled, every action button names its file, for example "Remove report.pdf", and progress bars use the progressbar role. A polite live region announces the files added and rejected, finished and failed uploads, and removed files.
|
|
17628
|
+
|
|
17629
|
+
## Avatar
|
|
17630
|
+
|
|
17631
|
+
The avatar variant is a single clickable image to replace a profile picture or a logo, round by default or square with avatarShape . It holds one file, so its value is a file or null. The image shown comes from the chosen file, otherwise from the first existing file. On mobile devices, capture opens the camera directly.
|
|
17632
|
+
|
|
17633
|
+
**Example:**
|
|
17634
|
+
|
|
17635
|
+
```typescript
|
|
17636
|
+
import { Component } from '@angular/core';
|
|
17637
|
+
import { FormsModule } from '@angular/forms';
|
|
17638
|
+
import { FileInputModule } from '@exhaustive-ui/core/fileinput';
|
|
17639
|
+
|
|
17640
|
+
@Component({
|
|
17641
|
+
template: `
|
|
17642
|
+
<div class="card flex flex-wrap justify-center gap-12">
|
|
17643
|
+
<p-file variant="avatar" accept="image/*" capture="user" ariaLabel="Profile picture" [(ngModel)]="photo" />
|
|
17644
|
+
<p-file variant="avatar" avatarShape="square" accept="image/*" ariaLabel="Company logo" [(ngModel)]="logo" />
|
|
17645
|
+
</div>
|
|
17646
|
+
`,
|
|
17647
|
+
standalone: true,
|
|
17648
|
+
imports: [FileInputModule, FormsModule]
|
|
17649
|
+
})
|
|
17650
|
+
export class FileinputAvatarDemo {
|
|
17651
|
+
photo: File | null = null;
|
|
17652
|
+
logo: File | null = null;
|
|
17653
|
+
}
|
|
17654
|
+
```
|
|
17655
|
+
|
|
17656
|
+
## Basic
|
|
17657
|
+
|
|
17658
|
+
FileInput is bound with ngModel , and its value is the array of selected files. Files are added by clicking the dropzone, with the keyboard, by drag and drop, or by pasting them, a screenshot for example, while the component has the focus. Dropping a folder adds the files it contains and keeps their relative path. Without an url or an uploadHandler , nothing is uploaded: the files stay in the value, ready to be sent with the form.
|
|
17659
|
+
|
|
17660
|
+
**Example:**
|
|
17661
|
+
|
|
17662
|
+
```typescript
|
|
17663
|
+
import { Component } from '@angular/core';
|
|
17664
|
+
import { FormsModule } from '@angular/forms';
|
|
17665
|
+
import { FileInputModule } from '@exhaustive-ui/core/fileinput';
|
|
17666
|
+
|
|
17667
|
+
@Component({
|
|
17668
|
+
template: `
|
|
17669
|
+
<div class="card">
|
|
17670
|
+
<p-file [(ngModel)]="files" />
|
|
17671
|
+
</div>
|
|
17672
|
+
`,
|
|
17673
|
+
standalone: true,
|
|
17674
|
+
imports: [FileInputModule, FormsModule]
|
|
17675
|
+
})
|
|
17676
|
+
export class FileinputBasicDemo {
|
|
17677
|
+
files: File[] = [];
|
|
17678
|
+
}
|
|
17679
|
+
```
|
|
17680
|
+
|
|
17681
|
+
## Disabled
|
|
17682
|
+
|
|
17683
|
+
When disabled is present, files can no longer be added or removed.
|
|
17684
|
+
|
|
17685
|
+
**Example:**
|
|
17686
|
+
|
|
17687
|
+
```typescript
|
|
17688
|
+
import { Component } from '@angular/core';
|
|
17689
|
+
import { FileInputModule } from '@exhaustive-ui/core/fileinput';
|
|
17690
|
+
|
|
17691
|
+
@Component({
|
|
17692
|
+
template: `
|
|
17693
|
+
<div class="card">
|
|
17694
|
+
<p-file disabled />
|
|
17695
|
+
</div>
|
|
17696
|
+
`,
|
|
17697
|
+
standalone: true,
|
|
17698
|
+
imports: [FileInputModule]
|
|
17699
|
+
})
|
|
17700
|
+
export class FileinputDisabledDemo {}
|
|
17701
|
+
```
|
|
17702
|
+
|
|
17703
|
+
## Existing Files
|
|
17704
|
+
|
|
17705
|
+
When a form edits a record, pass the files already stored on the server to existing . They are listed before the new files, with a download button when they have a url and a delete button. Deleting one emits onRemoveExisting : delete the file on the server from there. Existing files count toward maxFiles and are not part of the value.
|
|
17706
|
+
|
|
17707
|
+
**Example:**
|
|
17708
|
+
|
|
17709
|
+
```typescript
|
|
17710
|
+
import { Component, inject } from '@angular/core';
|
|
17711
|
+
import { FileInputModule } from '@exhaustive-ui/core/fileinput';
|
|
17712
|
+
import { ToastModule } from '@exhaustive-ui/core/toast';
|
|
17713
|
+
import { MessageService } from '@exhaustive-ui/core/api';
|
|
17714
|
+
|
|
17715
|
+
@Component({
|
|
17716
|
+
template: `
|
|
17717
|
+
<p-toast />
|
|
17718
|
+
<div class="card">
|
|
17719
|
+
<p-file [existing]="attachments" (onRemoveExisting)="onRemoveExisting($event)" />
|
|
17720
|
+
</div>
|
|
17721
|
+
`,
|
|
17722
|
+
standalone: true,
|
|
17723
|
+
imports: [FileInputModule, ToastModule]
|
|
17724
|
+
})
|
|
17725
|
+
export class FileinputExistingDemo {
|
|
17726
|
+
messageService = inject(MessageService);
|
|
17727
|
+
attachments: FileInputExistingFile[];
|
|
17728
|
+
|
|
17729
|
+
onRemoveExisting(event: FileInputRemoveExistingEvent) {
|
|
17730
|
+
this.messageService.add({ severity: 'info', summary: 'Delete on the server', detail: event.file.name, life: 3000 });
|
|
17731
|
+
}
|
|
17732
|
+
}
|
|
17733
|
+
```
|
|
17734
|
+
|
|
17735
|
+
## Images
|
|
17736
|
+
|
|
17737
|
+
The images variant shows the files as a grid of square thumbnails, for a gallery, a listing or a product page. The first image is marked as the cover, the progress of an upload is drawn over its thumbnail, and the add tile, which also accepts dropped files, stays at the end of the grid until maxFiles is reached.
|
|
17738
|
+
|
|
17739
|
+
**Example:**
|
|
17740
|
+
|
|
17741
|
+
```typescript
|
|
17742
|
+
import { Component } from '@angular/core';
|
|
17743
|
+
import { FormsModule } from '@angular/forms';
|
|
17744
|
+
import { FileInputModule } from '@exhaustive-ui/core/fileinput';
|
|
17745
|
+
|
|
17746
|
+
@Component({
|
|
17747
|
+
template: `
|
|
17748
|
+
<div class="card">
|
|
17749
|
+
<p-file variant="images" accept="image/*" [maxFiles]="6" [maxFileSize]="5000000" [uploadHandler]="upload" [(ngModel)]="photos" />
|
|
17750
|
+
</div>
|
|
17751
|
+
`,
|
|
17752
|
+
standalone: true,
|
|
17753
|
+
imports: [FileInputModule, FormsModule]
|
|
17754
|
+
})
|
|
17755
|
+
export class FileinputImagesDemo {
|
|
17756
|
+
photos: File[] = [];
|
|
17757
|
+
upload: FileInputUploadHandler = (file, { signal, progress }) =>;
|
|
17758
|
+
}
|
|
17759
|
+
```
|
|
17760
|
+
|
|
17761
|
+
## Invalid
|
|
17762
|
+
|
|
17763
|
+
The invalid state is applied using the invalid property to indicate failed validation.
|
|
17764
|
+
|
|
17765
|
+
**Example:**
|
|
17766
|
+
|
|
17767
|
+
```typescript
|
|
17768
|
+
import { Component } from '@angular/core';
|
|
17769
|
+
import { FileInputModule } from '@exhaustive-ui/core/fileinput';
|
|
17770
|
+
|
|
17771
|
+
@Component({
|
|
17772
|
+
template: `
|
|
17773
|
+
<div class="card">
|
|
17774
|
+
<p-file [invalid]="files.length === 0" (onSelect)="files = $event.items" />
|
|
17775
|
+
</div>
|
|
17776
|
+
`,
|
|
17777
|
+
standalone: true,
|
|
17778
|
+
imports: [FileInputModule]
|
|
17779
|
+
})
|
|
17780
|
+
export class FileinputInvalidDemo {
|
|
17781
|
+
files: unknown[] = [];
|
|
17782
|
+
}
|
|
17783
|
+
```
|
|
17784
|
+
|
|
17785
|
+
## Labels
|
|
17786
|
+
|
|
17787
|
+
Every text of the component, error messages and screen reader announcements included, can be replaced through labels . Missing keys keep their English default. Placeholders such as {{ '{0}' }} receive the values. Sizes use the fileSizeTypes units of the locale.
|
|
17788
|
+
|
|
17789
|
+
**Example:**
|
|
17790
|
+
|
|
17791
|
+
```typescript
|
|
17792
|
+
import { Component } from '@angular/core';
|
|
17793
|
+
import { FileInputModule } from '@exhaustive-ui/core/fileinput';
|
|
17794
|
+
|
|
17795
|
+
@Component({
|
|
17796
|
+
template: `
|
|
17797
|
+
<div class="card">
|
|
17798
|
+
<p-file [labels]="labels" [maxFileSize]="2000000" hint="2 Mo maximum par fichier" />
|
|
17799
|
+
</div>
|
|
17800
|
+
`,
|
|
17801
|
+
standalone: true,
|
|
17802
|
+
imports: [FileInputModule]
|
|
17803
|
+
})
|
|
17804
|
+
export class FileinputLabelsDemo {
|
|
17805
|
+
labels: Partial<FileInputLabels>;
|
|
17806
|
+
}
|
|
17807
|
+
```
|
|
17808
|
+
|
|
17809
|
+
## reactiveforms-doc
|
|
17810
|
+
|
|
17811
|
+
FileInput can also be used with reactive forms. In this case, the formControlName property is used to bind the component to a form control.
|
|
17812
|
+
|
|
17813
|
+
**Example:**
|
|
17814
|
+
|
|
17815
|
+
```typescript
|
|
17816
|
+
import { Component, inject } from '@angular/core';
|
|
17817
|
+
import { ReactiveFormsModule } from '@angular/forms';
|
|
17818
|
+
import { FileInputModule } from '@exhaustive-ui/core/fileinput';
|
|
17819
|
+
import { MessageModule } from '@exhaustive-ui/core/message';
|
|
17820
|
+
import { ToastModule } from '@exhaustive-ui/core/toast';
|
|
17821
|
+
import { ButtonModule } from '@exhaustive-ui/core/button';
|
|
17822
|
+
import { MessageService } from '@exhaustive-ui/core/api';
|
|
17823
|
+
|
|
17824
|
+
@Component({
|
|
17825
|
+
template: `
|
|
17826
|
+
<p-toast />
|
|
17827
|
+
<div class="card">
|
|
17828
|
+
<form [formGroup]="exampleForm" (ngSubmit)="onSubmit()" class="flex flex-col gap-4">
|
|
17829
|
+
<div class="flex flex-col gap-2">
|
|
17830
|
+
<label id="documents-label" class="font-medium">Documents</label>
|
|
17831
|
+
<p-file formControlName="documents" ariaLabelledBy="documents-label" size="small" [maxFiles]="3" [invalid]="isInvalid('documents')" />
|
|
17832
|
+
@if (isInvalid('documents')) {
|
|
17833
|
+
<p-message severity="error" size="small" variant="simple">At least one document is required.</p-message>
|
|
17834
|
+
}
|
|
17835
|
+
</div>
|
|
17836
|
+
<button pButton severity="secondary" type="submit" class="self-start"><span pButtonLabel>Submit</span></button>
|
|
17837
|
+
</form>
|
|
17838
|
+
</div>
|
|
17839
|
+
`,
|
|
17840
|
+
standalone: true,
|
|
17841
|
+
imports: [FileInputModule, MessageModule, ToastModule, ButtonModule, ReactiveFormsModule]
|
|
17842
|
+
})
|
|
17843
|
+
export class FileinputReactiveformsDemo {
|
|
17844
|
+
messageService = inject(MessageService);
|
|
17845
|
+
exampleForm: FormGroup;
|
|
17846
|
+
formSubmitted: boolean = false;
|
|
17847
|
+
|
|
17848
|
+
constructor() {
|
|
17849
|
+
this.exampleForm = this.fb.group({
|
|
17850
|
+
documents: [[], Validators.required]
|
|
17851
|
+
});
|
|
17852
|
+
}
|
|
17853
|
+
|
|
17854
|
+
onSubmit() {
|
|
17855
|
+
this.formSubmitted = true;
|
|
17856
|
+
if (this.exampleForm.valid) {
|
|
17857
|
+
this.messageService.add({ severity: 'success', summary: 'Success', detail: 'Form is submitted', life: 3000 });
|
|
17858
|
+
this.exampleForm.reset({ documents: [] });
|
|
17859
|
+
this.formSubmitted = false;
|
|
17860
|
+
}
|
|
17861
|
+
}
|
|
17862
|
+
|
|
17863
|
+
isInvalid(controlName: string) {
|
|
17864
|
+
const control = this.exampleForm.get(controlName);
|
|
17865
|
+
return control?.invalid && (control.touched || this.formSubmitted);
|
|
17866
|
+
}
|
|
17867
|
+
}
|
|
17868
|
+
```
|
|
17869
|
+
|
|
17870
|
+
## Signal Forms
|
|
17871
|
+
|
|
17872
|
+
FileInput can also be used with Angular Signal Forms . The [formField] directive binds the component to a field holding an array of files. Signal Forms' required does not treat an empty array as empty, so use minLength(field, 1) to require at least one file.
|
|
17873
|
+
|
|
17874
|
+
**Example:**
|
|
17875
|
+
|
|
17876
|
+
```typescript
|
|
17877
|
+
import { Component, inject, signal } from '@angular/core';
|
|
17878
|
+
import { form, FormField, minLength, submit } from '@angular/forms/signals';
|
|
17879
|
+
import { FileInputModule } from '@exhaustive-ui/core/fileinput';
|
|
17880
|
+
import { MessageModule } from '@exhaustive-ui/core/message';
|
|
17881
|
+
import { ToastModule } from '@exhaustive-ui/core/toast';
|
|
17882
|
+
import { ButtonModule } from '@exhaustive-ui/core/button';
|
|
17883
|
+
import { MessageService } from '@exhaustive-ui/core/api';
|
|
17884
|
+
|
|
17885
|
+
@Component({
|
|
17886
|
+
template: `
|
|
17887
|
+
<p-toast />
|
|
17888
|
+
<div class="card">
|
|
17889
|
+
<form novalidate (submit)="onSubmit($event)" class="flex flex-col gap-4">
|
|
17890
|
+
<div class="flex flex-col gap-2">
|
|
17891
|
+
<label id="photos-label" class="font-medium">Photos</label>
|
|
17892
|
+
<p-file [formField]="listingForm.photos" variant="images" accept="image/*" [maxFiles]="4" ariaLabelledBy="photos-label" />
|
|
17893
|
+
@let photos = listingForm.photos();
|
|
17894
|
+
@if (photos.invalid() && photos.touched()) {
|
|
17895
|
+
<p-message severity="error" size="small" variant="simple">Add at least one photo.</p-message>
|
|
17896
|
+
}
|
|
17897
|
+
</div>
|
|
17898
|
+
<button pButton severity="secondary" type="submit" class="self-start"><span pButtonLabel>Submit</span></button>
|
|
17899
|
+
</form>
|
|
17900
|
+
</div>
|
|
17901
|
+
`,
|
|
17902
|
+
standalone: true,
|
|
17903
|
+
imports: [FileInputModule, MessageModule, ToastModule, ButtonModule, FormField]
|
|
17904
|
+
})
|
|
17905
|
+
export class FileinputSignalformsDemo {
|
|
17906
|
+
messageService = inject(MessageService);
|
|
17907
|
+
model = signal<{ photos: File[] }>({ photos: [] });
|
|
17908
|
+
listingForm = form(this.model, (f) => {
|
|
17909
|
+
minLength(f.photos, 1);
|
|
17910
|
+
});
|
|
17911
|
+
|
|
17912
|
+
onSubmit(event: Event) {
|
|
17913
|
+
event.preventDefault();
|
|
17914
|
+
submit(this.listingForm, async () => {
|
|
17915
|
+
this.messageService.add({ severity: 'success', summary: 'Success', detail: 'Form is submitted', life: 3000 });
|
|
17916
|
+
this.listingForm().reset({ photos: [] });
|
|
17917
|
+
});
|
|
17918
|
+
}
|
|
17919
|
+
}
|
|
17920
|
+
```
|
|
17921
|
+
|
|
17922
|
+
## Sizes
|
|
17923
|
+
|
|
17924
|
+
FileInput provides small and large sizes as alternatives to the default, like the other form fields.
|
|
17925
|
+
|
|
17926
|
+
**Example:**
|
|
17927
|
+
|
|
17928
|
+
```typescript
|
|
17929
|
+
import { Component } from '@angular/core';
|
|
17930
|
+
import { FileInputModule } from '@exhaustive-ui/core/fileinput';
|
|
17931
|
+
|
|
17932
|
+
@Component({
|
|
17933
|
+
template: `
|
|
17934
|
+
<div class="card flex flex-col gap-4">
|
|
17935
|
+
<p-file size="small" />
|
|
17936
|
+
<p-file />
|
|
17937
|
+
<p-file size="large" />
|
|
17938
|
+
</div>
|
|
17939
|
+
`,
|
|
17940
|
+
standalone: true,
|
|
17941
|
+
imports: [FileInputModule]
|
|
17942
|
+
})
|
|
17943
|
+
export class FileinputSizesDemo {}
|
|
17944
|
+
```
|
|
17945
|
+
|
|
17946
|
+
## Template
|
|
17947
|
+
|
|
17948
|
+
The dropzone template replaces the content of the dropzone and receives an open function and an active flag, true while files are dragged over it. The item template replaces a row of the list and receives the item with its remove , retry and cancel functions.
|
|
17949
|
+
|
|
17950
|
+
**Example:**
|
|
17951
|
+
|
|
17952
|
+
```typescript
|
|
17953
|
+
import { Component } from '@angular/core';
|
|
17954
|
+
import { ButtonModule } from '@exhaustive-ui/core/button';
|
|
17955
|
+
import { FileInputModule } from '@exhaustive-ui/core/fileinput';
|
|
17956
|
+
|
|
17957
|
+
@Component({
|
|
17958
|
+
template: `
|
|
17959
|
+
<div class="card">
|
|
17960
|
+
<p-file accept=".csv,.xlsx">
|
|
17961
|
+
<ng-template #dropzone let-active="active">
|
|
17962
|
+
<i class="pi pi-file-excel !text-3xl text-muted-color"></i>
|
|
17963
|
+
<span class="font-semibold">{{ active ? 'Release to import' : 'Import a spreadsheet' }}</span>
|
|
17964
|
+
<span class="text-sm text-muted-color">CSV or Excel</span>
|
|
17965
|
+
</ng-template>
|
|
17966
|
+
<ng-template #item let-item let-remove="remove">
|
|
17967
|
+
<i class="pi pi-table text-muted-color"></i>
|
|
17968
|
+
<span class="flex-1 truncate">{{ item.name }}</span>
|
|
17969
|
+
<p-button icon="pi pi-times" severity="secondary" text rounded [ariaLabel]="'Remove ' + item.name" (onClick)="remove()" />
|
|
17970
|
+
</ng-template>
|
|
17971
|
+
</p-file>
|
|
17972
|
+
</div>
|
|
17973
|
+
`,
|
|
17974
|
+
standalone: true,
|
|
17975
|
+
imports: [ButtonModule, FileInputModule]
|
|
17976
|
+
})
|
|
17977
|
+
export class FileinputTemplateDemo {}
|
|
17978
|
+
```
|
|
17979
|
+
|
|
17980
|
+
## templatedrivenforms-doc
|
|
17981
|
+
|
|
17982
|
+
The value is an array of files, empty when nothing is selected, so required works as on the other fields. Resetting the form clears the files.
|
|
17983
|
+
|
|
17984
|
+
**Example:**
|
|
17985
|
+
|
|
17986
|
+
```typescript
|
|
17987
|
+
import { Component, inject } from '@angular/core';
|
|
17988
|
+
import { FormsModule } from '@angular/forms';
|
|
17989
|
+
import { FileInputModule } from '@exhaustive-ui/core/fileinput';
|
|
17990
|
+
import { MessageModule } from '@exhaustive-ui/core/message';
|
|
17991
|
+
import { ToastModule } from '@exhaustive-ui/core/toast';
|
|
17992
|
+
import { ButtonModule } from '@exhaustive-ui/core/button';
|
|
17993
|
+
import { MessageService } from '@exhaustive-ui/core/api';
|
|
17994
|
+
|
|
17995
|
+
@Component({
|
|
17996
|
+
template: `
|
|
17997
|
+
<p-toast />
|
|
17998
|
+
<div class="card">
|
|
17999
|
+
<form #exampleForm="ngForm" (ngSubmit)="onSubmit(exampleForm)" class="flex flex-col gap-4">
|
|
18000
|
+
<div class="flex flex-col gap-2">
|
|
18001
|
+
<label id="receipts-label" class="font-medium">Receipts</label>
|
|
18002
|
+
<p-file #model="ngModel" [(ngModel)]="receipts" name="receipts" ariaLabelledBy="receipts-label" size="small" accept="image/*,.pdf" [invalid]="model.invalid && exampleForm.submitted" required />
|
|
18003
|
+
@if (model.invalid && exampleForm.submitted) {
|
|
18004
|
+
<p-message severity="error" size="small" variant="simple">At least one receipt is required.</p-message>
|
|
18005
|
+
}
|
|
18006
|
+
</div>
|
|
18007
|
+
<button pButton severity="secondary" type="submit" class="self-start"><span pButtonLabel>Submit</span></button>
|
|
18008
|
+
</form>
|
|
18009
|
+
</div>
|
|
18010
|
+
`,
|
|
18011
|
+
standalone: true,
|
|
18012
|
+
imports: [FileInputModule, MessageModule, ToastModule, ButtonModule, FormsModule]
|
|
18013
|
+
})
|
|
18014
|
+
export class FileinputTemplatedrivenformsDemo {
|
|
18015
|
+
messageService = inject(MessageService);
|
|
18016
|
+
receipts: File[] = [];
|
|
18017
|
+
|
|
18018
|
+
onSubmit(form: any) {
|
|
18019
|
+
if (form.valid) {
|
|
18020
|
+
this.messageService.add({ severity: 'success', summary: 'Success', detail: 'Form Submitted', life: 3000 });
|
|
18021
|
+
form.resetForm();
|
|
18022
|
+
}
|
|
18023
|
+
}
|
|
18024
|
+
}
|
|
18025
|
+
```
|
|
18026
|
+
|
|
18027
|
+
## Upload
|
|
18028
|
+
|
|
18029
|
+
Each file is uploaded in its own request, with its own progress bar, as soon as it is added. Set url to post the files with HttpClient , which requires provideHttpClient() , or pass an uploadHandler function to upload them yourself, straight to cloud storage for example. The handler receives the file, an AbortSignal and a progress callback, and returns a promise of the server response. At most concurrency files upload at the same time, 3 by default. An upload in progress can be canceled, and a failed or canceled upload can be retried. Set auto to false to start the uploads with the upload() method instead. The demo below simulates the server. Files with "error" in their name fail. Posting to an endpoint only needs its url. The form data field is named file , or the value of fieldName .
|
|
18030
|
+
|
|
18031
|
+
**Example:**
|
|
18032
|
+
|
|
18033
|
+
```typescript
|
|
18034
|
+
import { Component, inject } from '@angular/core';
|
|
18035
|
+
import { FileInputModule } from '@exhaustive-ui/core/fileinput';
|
|
18036
|
+
import { ToastModule } from '@exhaustive-ui/core/toast';
|
|
18037
|
+
import { MessageService } from '@exhaustive-ui/core/api';
|
|
18038
|
+
|
|
18039
|
+
@Component({
|
|
18040
|
+
template: `
|
|
18041
|
+
<p-toast />
|
|
18042
|
+
<div class="card">
|
|
18043
|
+
<p-file [uploadHandler]="upload" (onUpload)="onUpload($event)" />
|
|
18044
|
+
</div>
|
|
18045
|
+
`,
|
|
18046
|
+
standalone: true,
|
|
18047
|
+
imports: [FileInputModule, ToastModule]
|
|
18048
|
+
})
|
|
18049
|
+
export class FileinputUploadDemo {
|
|
18050
|
+
messageService = inject(MessageService);
|
|
18051
|
+
upload: FileInputUploadHandler = (file, { signal, progress }) =>;
|
|
18052
|
+
urlCode: Code;
|
|
18053
|
+
|
|
18054
|
+
onUpload(event: FileInputUploadEvent) {
|
|
18055
|
+
this.messageService.add({ severity: 'success', summary: 'Uploaded', detail: event.item.name, life: 2000 });
|
|
18056
|
+
}
|
|
18057
|
+
}
|
|
18058
|
+
```
|
|
18059
|
+
|
|
18060
|
+
## Validation
|
|
18061
|
+
|
|
18062
|
+
accept takes extensions such as .pdf and MIME types such as image/* . maxFileSize and minFileSize limit the size of each file, maxFiles the number of files, existing files included, and maxTotalSize the size of all the files together, in bytes. A rejected file stays in the list with the reason next to it until the user removes it, and it is not part of the value. Use hint to state the rules under the dropzone.
|
|
18063
|
+
|
|
18064
|
+
**Example:**
|
|
18065
|
+
|
|
18066
|
+
```typescript
|
|
18067
|
+
import { Component } from '@angular/core';
|
|
18068
|
+
import { FileInputModule } from '@exhaustive-ui/core/fileinput';
|
|
18069
|
+
|
|
18070
|
+
@Component({
|
|
18071
|
+
template: `
|
|
18072
|
+
<div class="card">
|
|
18073
|
+
<p-file accept="image/*,.pdf" [maxFileSize]="5000000" [maxFiles]="5" [maxTotalSize]="15000000" hint="Images and PDF · 5 MB per file · 5 files and 15 MB in total" />
|
|
18074
|
+
</div>
|
|
18075
|
+
`,
|
|
18076
|
+
standalone: true,
|
|
18077
|
+
imports: [FileInputModule]
|
|
18078
|
+
})
|
|
18079
|
+
export class FileinputValidationDemo {}
|
|
18080
|
+
```
|
|
18081
|
+
|
|
18082
|
+
## File Input
|
|
18083
|
+
|
|
18084
|
+
FileInput selects files by drag and drop, paste or the file picker, validates each file and uploads it with its own progress. It works with template-driven forms, reactive forms and Signal Forms.
|
|
18085
|
+
|
|
18086
|
+
### Props
|
|
18087
|
+
|
|
18088
|
+
| Name | Type | Default | Description |
|
|
18089
|
+
|------|------|---------|-------------|
|
|
18090
|
+
| dt | InputSignal<Object> | undefined | Defines scoped design tokens of the component. |
|
|
18091
|
+
| unstyled | InputSignal<boolean> | undefined | Indicates whether the component should be rendered without styles. |
|
|
18092
|
+
| pt | InputSignal<FileInputPassThrough> | undefined | Used to pass attributes to DOM elements inside the component. |
|
|
18093
|
+
| ptOptions | InputSignal<PassThroughOptions> | undefined | Used to configure passthrough(pt) options of the component. |
|
|
18094
|
+
| required | InputSignalWithTransform<boolean, unknown> | false | There must be a value (if set). |
|
|
18095
|
+
| invalid | InputSignalWithTransform<boolean, unknown> | false | When present, it specifies that the component should have invalid state style. |
|
|
18096
|
+
| disabled | InputSignalWithTransform<boolean, unknown> | false | When present, it specifies that the component should have disabled state style. |
|
|
18097
|
+
| name | InputSignal<string> | undefined | When present, it specifies that the name of the input. |
|
|
18098
|
+
| variant | InputSignal<FileInputVariant> | 'list' | Layout of the component: a dropzone with a list, a grid of images, or a single avatar. |
|
|
18099
|
+
| avatarShape | InputSignal<"circle" \| "square"> | 'circle' | Shape of the avatar variant. |
|
|
18100
|
+
| multiple | InputSignalWithTransform<boolean, unknown> | true | Whether several files can be selected. The value is then an array of files, otherwise a single file or null. Always false in the avatar variant. |
|
|
18101
|
+
| accept | InputSignal<string> | ... | Accepted file types, as in the accept attribute of a file input: extensions such as `.pdf` and MIME types such as `image/*` . |
|
|
18102
|
+
| capture | InputSignal<"user" \| "environment"> | ... | On mobile devices, opens the camera directly: `user` for the front camera, `environment` for the back camera. |
|
|
18103
|
+
| directory | InputSignalWithTransform<boolean, unknown> | false | Makes the file picker select a whole folder. Dropped folders are always accepted. |
|
|
18104
|
+
| maxFileSize | InputSignalWithTransform<number, unknown> | ... | Maximum size of a file, in bytes. |
|
|
18105
|
+
| minFileSize | InputSignalWithTransform<number, unknown> | ... | Minimum size of a file, in bytes. |
|
|
18106
|
+
| maxFiles | InputSignalWithTransform<number, unknown> | ... | Maximum number of files, existing files included. |
|
|
18107
|
+
| maxTotalSize | InputSignalWithTransform<number, unknown> | ... | Maximum size of all the files together, in bytes. |
|
|
18108
|
+
| url | InputSignal<string> | ... | URL to upload each file to, in its own request. Requires provideHttpClient(). |
|
|
18109
|
+
| method | InputSignal<"post" \| "put"> | 'post' | HTTP method of the upload requests. |
|
|
18110
|
+
| headers | InputSignal<HttpHeaders> | ... | Headers of the upload requests. |
|
|
18111
|
+
| withCredentials | InputSignalWithTransform<boolean, unknown> | false | Whether the upload requests send cookies and credentials. |
|
|
18112
|
+
| fieldName | InputSignal<string> | 'file' | Name of the form data field that holds the file in an upload request. |
|
|
18113
|
+
| uploadHandler | InputSignal<FileInputUploadHandler> | ... | Function that uploads one file, used instead of url: to upload straight to cloud storage, or through your own service. |
|
|
18114
|
+
| auto | InputSignalWithTransform<boolean, unknown> | true | Whether files start uploading as soon as they are added. When false, call upload(). |
|
|
18115
|
+
| concurrency | InputSignalWithTransform<number, unknown> | 3 | Maximum number of files uploaded at the same time. |
|
|
18116
|
+
| existing | InputSignal<FileInputExistingFile[]> | ... | Files already stored on the server, shown with a download and a delete button. |
|
|
18117
|
+
| hint | InputSignal<string> | ... | Text under the dropzone label, such as the accepted types and sizes. |
|
|
18118
|
+
| labels | InputSignal<Partial<FileInputLabels>> | ... | Texts of the component, merged with the English defaults. |
|
|
18119
|
+
| showSummary | InputSignalWithTransform<boolean, unknown> | true | Whether to show the summary of the uploads in progress. |
|
|
18120
|
+
| size | InputSignal<"small" \| "large"> | ... | Size of the component. |
|
|
18121
|
+
| inputId | InputSignal<string> | ... | Identifier of the hidden file input. |
|
|
18122
|
+
| ariaLabel | InputSignal<string> | ... | Accessible label of the dropzone, the add tile or the avatar. |
|
|
18123
|
+
| ariaLabelledBy | InputSignal<string> | ... | Identifier of the element that labels the dropzone, the add tile or the avatar. |
|
|
18124
|
+
|
|
18125
|
+
### Emits
|
|
18126
|
+
|
|
18127
|
+
| Name | Parameters | Description |
|
|
18128
|
+
|------|------------|-------------|
|
|
18129
|
+
| onSelect | event: FileInputSelectEvent | Callback to invoke when files are added, including the ones rejected by validation. |
|
|
18130
|
+
| onRemove | event: FileInputItemEvent | Callback to invoke when the user removes a file. |
|
|
18131
|
+
| onCancel | event: FileInputItemEvent | Callback to invoke when the user cancels an upload. |
|
|
18132
|
+
| onUpload | event: FileInputUploadEvent | Callback to invoke when a file is uploaded. |
|
|
18133
|
+
| onError | event: FileInputErrorEvent | Callback to invoke when an upload fails. |
|
|
18134
|
+
| onComplete | event: FileInputCompleteEvent | Callback to invoke when the last upload in progress ends. |
|
|
18135
|
+
| onRemoveExisting | event: FileInputRemoveExistingEvent | Callback to invoke when the user deletes an existing file. Delete it on the server from this callback. |
|
|
18136
|
+
|
|
18137
|
+
### Templates
|
|
18138
|
+
|
|
18139
|
+
| Name | Type | Description |
|
|
18140
|
+
|------|------|-------------|
|
|
18141
|
+
| dropzone | TemplateRef<FileInputDropzoneTemplateContext> | Custom content of the dropzone. |
|
|
18142
|
+
| item | TemplateRef<FileInputItemTemplateContext> | Custom row of the list variant. |
|
|
18143
|
+
|
|
18144
|
+
### Methods
|
|
18145
|
+
|
|
18146
|
+
| Name | Parameters | Return Type | Description |
|
|
18147
|
+
|------|------------|-------------|-------------|
|
|
18148
|
+
| open | | void | Opens the file picker. |
|
|
18149
|
+
| addFiles | files: File[], event: Event | void | Adds files as if the user had selected them. |
|
|
18150
|
+
| upload | | void | Uploads the selected files that are not uploaded yet. Only needed when auto is false. |
|
|
18151
|
+
| remove | item: FileInputItem | void | Removes a file. For an existing file, emits onRemoveExisting. |
|
|
18152
|
+
| cancel | item: FileInputItem | void | Cancels the upload of a file. |
|
|
18153
|
+
| retry | item: FileInputItem | void | Retries the upload of a failed or canceled file. |
|
|
18154
|
+
| clear | | void | Removes all the selected files and cancels their uploads. Existing files are kept. |
|
|
18155
|
+
|
|
18156
|
+
## Pass Through Options
|
|
18157
|
+
|
|
18158
|
+
| Name | Type | Description |
|
|
18159
|
+
|------|------|-------------|
|
|
18160
|
+
| root | PassThroughOption<HTMLElement, I> | Used to pass attributes to the root's DOM element. |
|
|
18161
|
+
| input | PassThroughOption<HTMLInputElement, I> | Used to pass attributes to the hidden file input's DOM element. |
|
|
18162
|
+
| dropzone | PassThroughOption<HTMLDivElement, I> | Used to pass attributes to the dropzone's DOM element. |
|
|
18163
|
+
| dropzoneIcon | PassThroughOption<SVGElement, I> | Used to pass attributes to the dropzone icon's DOM element. |
|
|
18164
|
+
| label | PassThroughOption<HTMLSpanElement, I> | Used to pass attributes to the dropzone label's DOM element. |
|
|
18165
|
+
| hint | PassThroughOption<HTMLSpanElement, I> | Used to pass attributes to the hint's DOM element. |
|
|
18166
|
+
| summary | PassThroughOption<HTMLDivElement, I> | Used to pass attributes to the upload summary's DOM element. |
|
|
18167
|
+
| list | PassThroughOption<HTMLUListElement, I> | Used to pass attributes to the file list's DOM element. |
|
|
18168
|
+
| item | PassThroughOption<HTMLLIElement, I> | Used to pass attributes to a file row's DOM element. |
|
|
18169
|
+
| thumbnail | PassThroughOption<HTMLDivElement, I> | Used to pass attributes to a thumbnail's DOM element. |
|
|
18170
|
+
| name | PassThroughOption<HTMLSpanElement, I> | Used to pass attributes to a file name's DOM element. |
|
|
18171
|
+
| meta | PassThroughOption<HTMLDivElement, I> | Used to pass attributes to the size and status line's DOM element. |
|
|
18172
|
+
| progress | PassThroughOption<HTMLDivElement, I> | Used to pass attributes to a progress bar's DOM element. |
|
|
18173
|
+
| actions | PassThroughOption<HTMLDivElement, I> | Used to pass attributes to the actions container of a row or tile. |
|
|
18174
|
+
| action | PassThroughOption<HTMLAnchorElement \| HTMLButtonElement, I> | Used to pass attributes to an action button's DOM element. |
|
|
18175
|
+
| grid | PassThroughOption<HTMLUListElement, I> | Used to pass attributes to the image grid's DOM element. |
|
|
18176
|
+
| tile | PassThroughOption<HTMLLIElement, I> | Used to pass attributes to an image tile's DOM element. |
|
|
18177
|
+
| add | PassThroughOption<HTMLButtonElement, I> | Used to pass attributes to the add tile's DOM element. |
|
|
18178
|
+
| avatar | PassThroughOption<HTMLDivElement, I> | Used to pass attributes to the avatar's DOM element. |
|
|
18179
|
+
|
|
18180
|
+
## Theming
|
|
18181
|
+
|
|
18182
|
+
### CSS Classes
|
|
18183
|
+
|
|
18184
|
+
| Class | Description |
|
|
18185
|
+
|-------|-------------|
|
|
18186
|
+
| p-fileinput | Class name of the root element |
|
|
18187
|
+
| p-fileinput-input | Class name of the hidden file input |
|
|
18188
|
+
| p-fileinput-dropzone | Class name of the dropzone |
|
|
18189
|
+
| p-fileinput-dropzone-icon | Class name of the dropzone icon |
|
|
18190
|
+
| p-fileinput-label | Class name of the dropzone label |
|
|
18191
|
+
| p-fileinput-hint | Class name of the hint |
|
|
18192
|
+
| p-fileinput-summary | Class name of the upload summary |
|
|
18193
|
+
| p-fileinput-progress | Class name of a progress bar |
|
|
18194
|
+
| p-fileinput-list | Class name of the file list |
|
|
18195
|
+
| p-fileinput-item | Class name of a file row |
|
|
18196
|
+
| p-fileinput-thumbnail | Class name of a thumbnail |
|
|
18197
|
+
| p-fileinput-name | Class name of a file name |
|
|
18198
|
+
| p-fileinput-meta | Class name of the size and status line |
|
|
18199
|
+
| p-fileinput-action | Class name of an action button |
|
|
18200
|
+
| p-fileinput-grid | Class name of the image grid |
|
|
18201
|
+
| p-fileinput-tile | Class name of an image tile |
|
|
18202
|
+
| p-fileinput-add | Class name of the add tile |
|
|
18203
|
+
| p-fileinput-avatar | Class name of the avatar |
|
|
18204
|
+
|
|
18205
|
+
### Design Tokens
|
|
18206
|
+
|
|
18207
|
+
| Token | CSS Variable | Description |
|
|
18208
|
+
|-------|--------------|-------------|
|
|
18209
|
+
| fileinput.gap | --p-fileinput-gap | Gap between the dropzone, the summary and the file list |
|
|
18210
|
+
| fileinput.transition.duration | --p-fileinput-transition-duration | Transition duration |
|
|
18211
|
+
| fileinput.dropzone.background | --p-fileinput-dropzone-background | Background |
|
|
18212
|
+
| fileinput.dropzone.border.color | --p-fileinput-dropzone-border-color | Border color |
|
|
18213
|
+
| fileinput.dropzone.hover.border.color | --p-fileinput-dropzone-hover-border-color | Border color while hovered |
|
|
18214
|
+
| fileinput.dropzone.active.border.color | --p-fileinput-dropzone-active-border-color | Border color while files are dragged over |
|
|
18215
|
+
| fileinput.dropzone.active.background | --p-fileinput-dropzone-active-background | Background while files are dragged over |
|
|
18216
|
+
| fileinput.dropzone.color | --p-fileinput-dropzone-color | Text color |
|
|
18217
|
+
| fileinput.dropzone.invalid.border.color | --p-fileinput-dropzone-invalid-border-color | Border color in invalid state |
|
|
18218
|
+
| fileinput.dropzone.disabled.background | --p-fileinput-dropzone-disabled-background | Background in disabled state |
|
|
18219
|
+
| fileinput.dropzone.disabled.color | --p-fileinput-dropzone-disabled-color | Text color in disabled state |
|
|
18220
|
+
| fileinput.dropzone.border.radius | --p-fileinput-dropzone-border-radius | Border radius |
|
|
18221
|
+
| fileinput.dropzone.padding | --p-fileinput-dropzone-padding | Padding |
|
|
18222
|
+
| fileinput.dropzone.gap | --p-fileinput-dropzone-gap | Gap between the icon, the label and the hint |
|
|
18223
|
+
| fileinput.dropzone.font.weight | --p-fileinput-dropzone-font-weight | Font weight of the label |
|
|
18224
|
+
| fileinput.dropzone.focus.ring.width | --p-fileinput-dropzone-focus-ring-width | Focus ring width of the dropzone |
|
|
18225
|
+
| fileinput.dropzone.focus.ring.style | --p-fileinput-dropzone-focus-ring-style | Focus ring style of the dropzone |
|
|
18226
|
+
| fileinput.dropzone.focus.ring.color | --p-fileinput-dropzone-focus-ring-color | Focus ring color of the dropzone |
|
|
18227
|
+
| fileinput.dropzone.focus.ring.offset | --p-fileinput-dropzone-focus-ring-offset | Focus ring offset of the dropzone |
|
|
18228
|
+
| fileinput.dropzone.focus.ring.shadow | --p-fileinput-dropzone-focus-ring-shadow | Focus ring shadow of the dropzone |
|
|
18229
|
+
| fileinput.dropzone.sm.padding | --p-fileinput-dropzone-sm-padding | Padding of the small size |
|
|
18230
|
+
| fileinput.dropzone.sm.font.size | --p-fileinput-dropzone-sm-font-size | Font size of the small size |
|
|
18231
|
+
| fileinput.dropzone.lg.padding | --p-fileinput-dropzone-lg-padding | Padding of the large size |
|
|
18232
|
+
| fileinput.dropzone.lg.font.size | --p-fileinput-dropzone-lg-font-size | Font size of the large size |
|
|
18233
|
+
| fileinput.icon.color | --p-fileinput-icon-color | Color of the dropzone icon |
|
|
18234
|
+
| fileinput.icon.size | --p-fileinput-icon-size | Size of the dropzone icon |
|
|
18235
|
+
| fileinput.hint.color | --p-fileinput-hint-color | Color of the hint |
|
|
18236
|
+
| fileinput.hint.font.size | --p-fileinput-hint-font-size | Font size of the hint |
|
|
18237
|
+
| fileinput.list.border.color | --p-fileinput-list-border-color | Border color of the file list |
|
|
18238
|
+
| fileinput.list.border.radius | --p-fileinput-list-border-radius | Border radius of the file list |
|
|
18239
|
+
| fileinput.item.padding | --p-fileinput-item-padding | Padding of a file row |
|
|
18240
|
+
| fileinput.item.gap | --p-fileinput-item-gap | Gap inside a file row |
|
|
18241
|
+
| fileinput.item.border.color | --p-fileinput-item-border-color | Separator color between rows |
|
|
18242
|
+
| fileinput.item.error.background | --p-fileinput-item-error-background | Background of a row in error |
|
|
18243
|
+
| fileinput.thumbnail.size | --p-fileinput-thumbnail-size | Size of a thumbnail |
|
|
18244
|
+
| fileinput.thumbnail.border.radius | --p-fileinput-thumbnail-border-radius | Border radius of a thumbnail |
|
|
18245
|
+
| fileinput.thumbnail.background | --p-fileinput-thumbnail-background | Background of a thumbnail |
|
|
18246
|
+
| fileinput.thumbnail.color | --p-fileinput-thumbnail-color | Color of the file extension shown in a thumbnail |
|
|
18247
|
+
| fileinput.meta.color | --p-fileinput-meta-color | Color of the size and status line |
|
|
18248
|
+
| fileinput.meta.font.size | --p-fileinput-meta-font-size | Font size of the size and status line |
|
|
18249
|
+
| fileinput.meta.gap | --p-fileinput-meta-gap | Gap inside the size and status line |
|
|
18250
|
+
| fileinput.progress.height | --p-fileinput-progress-height | Height of a progress bar |
|
|
18251
|
+
| fileinput.progress.border.radius | --p-fileinput-progress-border-radius | Border radius of a progress bar |
|
|
18252
|
+
| fileinput.progress.background | --p-fileinput-progress-background | Track color of a progress bar |
|
|
18253
|
+
| fileinput.progress.value.background | --p-fileinput-progress-value-background | Value color of a progress bar |
|
|
18254
|
+
| fileinput.status.success.color | --p-fileinput-status-success-color | Color of the uploaded status |
|
|
18255
|
+
| fileinput.status.error.color | --p-fileinput-status-error-color | Color of error messages |
|
|
18256
|
+
| fileinput.action.size | --p-fileinput-action-size | Size of a row action button |
|
|
18257
|
+
| fileinput.action.border.radius | --p-fileinput-action-border-radius | Border radius of a row action button |
|
|
18258
|
+
| fileinput.action.color | --p-fileinput-action-color | Color of a row action button |
|
|
18259
|
+
| fileinput.action.hover.color | --p-fileinput-action-hover-color | Color of a hovered row action button |
|
|
18260
|
+
| fileinput.action.hover.background | --p-fileinput-action-hover-background | Background of a hovered row action button |
|
|
18261
|
+
| fileinput.action.focus.ring.width | --p-fileinput-action-focus-ring-width | Focus ring width of the action |
|
|
18262
|
+
| fileinput.action.focus.ring.style | --p-fileinput-action-focus-ring-style | Focus ring style of the action |
|
|
18263
|
+
| fileinput.action.focus.ring.color | --p-fileinput-action-focus-ring-color | Focus ring color of the action |
|
|
18264
|
+
| fileinput.action.focus.ring.offset | --p-fileinput-action-focus-ring-offset | Focus ring offset of the action |
|
|
18265
|
+
| fileinput.action.focus.ring.shadow | --p-fileinput-action-focus-ring-shadow | Focus ring shadow of the action |
|
|
18266
|
+
| fileinput.summary.gap | --p-fileinput-summary-gap | Gap inside the upload summary |
|
|
18267
|
+
| fileinput.summary.color | --p-fileinput-summary-color | Color of the upload summary |
|
|
18268
|
+
| fileinput.summary.font.size | --p-fileinput-summary-font-size | Font size of the upload summary |
|
|
18269
|
+
| fileinput.grid.gap | --p-fileinput-grid-gap | Gap between image tiles |
|
|
18270
|
+
| fileinput.grid.item.min.width | --p-fileinput-grid-item-min-width | Minimum width of an image tile |
|
|
18271
|
+
| fileinput.tile.border.radius | --p-fileinput-tile-border-radius | Border radius of an image tile |
|
|
18272
|
+
| fileinput.tile.border.color | --p-fileinput-tile-border-color | Border color of an image tile |
|
|
18273
|
+
| fileinput.tile.error.border.color | --p-fileinput-tile-error-border-color | Border color of an image tile in error |
|
|
18274
|
+
| fileinput.tile.background | --p-fileinput-tile-background | Background of an image tile |
|
|
18275
|
+
| fileinput.tile.overlay.background | --p-fileinput-tile-overlay-background | Background of the progress overlay |
|
|
18276
|
+
| fileinput.tile.overlay.color | --p-fileinput-tile-overlay-color | Text color of the overlays |
|
|
18277
|
+
| fileinput.tile.error.overlay.background | --p-fileinput-tile-error-overlay-background | Background of the error overlay |
|
|
18278
|
+
| fileinput.tile.action.background | --p-fileinput-tile-action-background | Background of the tile action buttons and badge |
|
|
18279
|
+
| fileinput.tile.action.color | --p-fileinput-tile-action-color | Color of the tile action buttons and badge |
|
|
18280
|
+
| fileinput.avatar.size | --p-fileinput-avatar-size | Size of the avatar |
|
|
18281
|
+
| fileinput.avatar.background | --p-fileinput-avatar-background | Background of the avatar |
|
|
18282
|
+
| fileinput.avatar.border.color | --p-fileinput-avatar-border-color | Border color of the avatar |
|
|
18283
|
+
| fileinput.avatar.color | --p-fileinput-avatar-color | Icon color of an empty avatar |
|
|
18284
|
+
| fileinput.avatar.square.border.radius | --p-fileinput-avatar-square-border-radius | Border radius of the square avatar |
|
|
18285
|
+
| fileinput.avatar.overlay.background | --p-fileinput-avatar-overlay-background | Background of the avatar overlay |
|
|
18286
|
+
| fileinput.avatar.overlay.color | --p-fileinput-avatar-overlay-color | Text color of the avatar overlay |
|
|
18287
|
+
|
|
18288
|
+
---
|
|
18289
|
+
|
|
17621
18290
|
# Angular FileUpload Component
|
|
17622
18291
|
|
|
17623
18292
|
FileUpload is an advanced uploader with dragdrop support, multi file uploads, auto uploading, progress tracking and validations.
|