Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FileCard (Upload) component #953

Closed
kati-ux opened this issue Nov 6, 2024 · 0 comments · Fixed by #957
Closed

FileCard (Upload) component #953

kati-ux opened this issue Nov 6, 2024 · 0 comments · Fixed by #957
Assignees

Comments

@kati-ux
Copy link
Member

kati-ux commented Nov 6, 2024

Additional Documentation for FileCard

Description

The FileCard provides users with feedback on their uploaded files and allows them to remove files if needed. Additionally, a FileCard can indicate if an error occurred during the upload.

Design

A FileCard displays either a file or image icon or a preview of the uploaded image at the front. Next to it, the file name and file size are shown. If the name is too long for the available space, it is truncated with an ellipsis. This is not an issue, as the file name is only meant to serve as a hint about the file.

FileCards are typically displayed below a Dropzone and arranged in a two ColumnLayout. They belong to the "Uploads" category. If a FileCard is not used within a ColumnLayout, it adapts to fit the inner content.

FileCards can also optionally be made fully clickable, with hover and pressed states. This is useful, for instance, when a FileCard is displayed in a chat. In this case, users can click the FileCard to open a preview.

Image

Token

--filecard-corner-radius: var(--size-corner-radius-default);
--filecard-border-width: var(--size-border-width-100);
--filecard-padding-x: var(--size-s);
--filecard-padding-y: var(--size-xs);
--filecard-spacing-fielderror-to-filecard: var(--size-xs);
--filecard-background-color-default: var(--color-neutral-color-100);
--filecard-background-color-hover: var(--neutral-outline-background-color-hover);
--filecard-background-color-pressed: var(--neutral-outline-background-color-pressed);
--filecard-background-color-invalid: var(--color-danger-color-100);
--filecard-border-color-default: var(--neutral-outline-border-color);
--filecard-border-color-invalid: var(--danger-outline-border-color);
--filecard-spacing: var(--size-s);
@Lisa18289 Lisa18289 self-assigned this Nov 7, 2024
@Lisa18289 Lisa18289 linked a pull request Nov 7, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants