Global CSS API: Controls - File

The following CSS custom properties are used for file input type control UI.

Native File Input Type Control

Properties used for native file input type control UI.

Base

Properties used for base file input type control UI.

PropertyDescriptionDefault
--gf-ctrl-file-padding-xHorizontal (left/right) padding.0 var(--gf-ctrl-padding-x)

File Input "Button"

Properties used for file input type control "button" UI.

PropertyDescriptionDefault
Background
--gf-ctrl-file-btn-bg-colorBackground color.var(--gf-color-secondary-darker)
--gf-ctrl-file-btn-bg-color-hoverBackground color on hover.var(--gf-color-secondary)
--gf-ctrl-file-btn-bg-color-focusBackground color on focus.var(--gf-ctrl-file-btn-bg-color)
--gf-ctrl-file-btn-bg-color-disabledBackground color when disabled.var(--gf-ctrl-file-btn-bg-color)
Border
--gf-ctrl-file-btn-border-inline-end-widthInline end (right) border width.1px
--gf-ctrl-file-btn-border-inline-end-styleInline end (right) border style.solid
--gf-ctrl-file-btn-border-inline-end-colorInline end (right) border color.var(--gf-ctrl-border-color)
--gf-ctrl-file-btn-border-inline-end-color-hoverInline end (right) border color on hover.var(--gf-ctrl-file-btn-border-inline-end-color)
--gf-ctrl-file-btn-border-inline-end-color-focusInline end (right) border color on focus.var(--gf-ctrl-file-btn-border-inline-end-color)
--gf-ctrl-file-btn-border-inline-end-color-disabledInline end (right) border color when disabled.var(--gf-ctrl-file-btn-border-inline-end-color)
--gf-ctrl-file-btn-radiusBorder radius.var(--gf-ctrl-radius)
Color
--gf-ctrl-file-btn-colorColor.rgba(var(--gf-color-secondary-contrast-rgb), 0.725)
--gf-ctrl-file-btn-color-hoverColor on hover.var(--gf-ctrl-file-btn-color)
--gf-ctrl-file-btn-color-focusColor on focus.var(--gf-ctrl-file-btn-color)
--gf-ctrl-file-btn-color-disabledColor when disabled.var(--gf-ctrl-file-btn-color)
Typography
--gf-ctrl-file-btn-font-familyFont family.var(--gf-font-family-base)
--gf-ctrl-file-btn-font-sizeFont size.14px
--gf-ctrl-file-btn-font-styleFont style.var(--gf-font-style-base)
--gf-ctrl-file-btn-font-weightFont weight.500
--gf-ctrl-file-btn-letter-spacingLetter spacing.var(--gf-letter-spacing-primary)
--gf-ctrl-file-btn-line-heightLine height.1.43
--gf-ctrl-file-btn-text-decorationText decoration.none
--gf-ctrl-file-btn-text-transformText transform.none
Spacing
--gf-ctrl-file-btn-margin-xHorizontal (left/right) margin.0 12px
--gf-ctrl-file-btn-padding-xHorizontal (left/right) padding.12px
Transition & Animation
--gf-ctrl-file-btn-transitionTransition.var(--gf-ctrl-transition)

Enhanced File Input Type Control

Properties used for enhanced file input type control UI.

File Upload Drop Area

Properties used for enhanced file upload drop area UI.

PropertyDescriptionDefault
Border
--gf-ctrl-file-zone-border-styleBorder style.dashed
--gf-ctrl-file-zone-radiusBorder radius.var(--gf-ctrl-radius-max-lg)
Color
--gf-ctrl-file-zone-colorColor.rgba(var(--gf-color-in-ctrl-contrast-rgb), 0.725)
Sizing
--gf-ctrl-file-zone-heightFile upload drop area height.auto
Spacing
--gf-ctrl-file-zone-padding-xHorizontal (left/right) padding.40px
--gf-ctrl-file-zone-padding-yVertical (top/bottom) padding.40px
--gf-ctrl-file-zone-instructions-margin-y-endVertical end (bottom) margin for instructions.12px
Typography
--gf-ctrl-file-zone-font-weightFont weight.500
--gf-ctrl-file-zone-line-heightLine height.1
Icon
--gf-ctrl-file-zone-icon-colorIcon color.var(--gf-color-in-ctrl-primary)
--gf-ctrl-file-zone-icon-font-sizeIcon font size.36px
--gf-ctrl-file-zone-icon-margin-y-endVertical end (bottom) margin.8px

File Upload Progress

Properties used for enhanced file upload progress UI.

PropertyDescriptionDefault
Progress UI
--gf-ctrl-file-prog-ui-gapProgress UI gap.12px
--gf-ctrl-file-prog-ui-sizeProgress bar size.var(--gf-icon-font-size)
Progress Bar
--gf-ctrl-file-prog-bar-bg-colorProgress bar background color.var(--gf-color-out-ctrl-light)
--gf-ctrl-file-prog-bar-bg-color-loadingProgress bar background color when loading.var(--gf-color-primary)
--gf-ctrl-file-prog-bar-heightProgress bar height.6px
--gf-ctrl-file-prog-bar-radiusProgress bar border radius.var(--gf-radius)
--gf-ctrl-file-prog-bar-transitionProgress bar transition.var(--gf-transition-ctrl)
Progress Text
--gf-ctrl-file-prog-text-colorProgress UI text color.var(--gf-ctrl-desc-color)
--gf-ctrl-file-prog-text-min-widthProgress UI text minimum width.33px
--gf-ctrl-file-prog-text-font-sizeProgress UI text font size.12px
Progress Button
--gf-ctrl-file-prog-btn-inset-y-startProgress UI button vertical start (top) position.-2px
--gf-ctrl-file-prog-btn-inset-x-endProgress UI button horizontal end (right) position.-2px
--gf-ctrl-file-prog-btn-positionProgress UI button position.absolute
--gf-ctrl-file-prog-btn-font-size-cancelProgress UI cancel/remove button font size.0
--gf-ctrl-file-prog-btn-icon-sizeProgress UI button icon size.var(--gf-icon-font-size)
--gf-ctrl-file-prog-btn-icon-color-completeProgress UI button icon color when complete.var(--gf-color-success)

File Upload Preview

Properties used for enhanced file upload preview UI.

PropertyDescriptionDefault
Preview Area
--gf-ctrl-file-prev-area-gapPreview area gap.16px
--gf-ctrl-file-prev-area-margin-y-startPreview area vertical start (top) margin.16px
--gf-ctrl-file-prev-font-familyPreview area font family.var(--gf-font-family-secondary)
--gf-ctrl-file-prev-font-sizePreview area font size.var(--gf-font-size-secondary)
--gf-ctrl-file-prev-font-stylePreview area font style.var(--gf-font-style-secondary)
--gf-ctrl-file-prev-font-weightPreview area font weight.var(--gf-font-weight-secondary)
--gf-ctrl-file-prev-letter-spacingPreview area letter spacing.var(--gf-letter-spacing-secondary)
--gf-ctrl-file-prev-line-heightPreview area line height.1
--gf-ctrl-file-prev-gapPreview item gap.4px
Preview Item
--gf-ctrl-file-prev-name-colorPreview item name color.var(--gf-ctrl-label-color-primary)
--gf-ctrl-file-prev-name-line-heightPreview item name line height.var(--gf-line-height-secondary)
--gf-ctrl-file-prev-name-overflowPreview item name overflow.hidden
--gf-ctrl-file-prev-name-padding-x-endPreview item name horizontal end (right) padding.calc(var(--gf-ctrl-file-prog-btn-icon-size) + var(--gf-ctrl-file-prog-text-min-width) + calc(var(--gf-ctrl-file-prog-ui-gap) * 2))
--gf-ctrl-file-prev-name-text-overflowPreview item name text overflow.ellipsis
--gf-ctrl-file-prev-name-white-spacePreview item name white space.nowrap
Preview Item Size
--gf-ctrl-file-prev-size-colorPreview item size color.var(--gf-ctrl-desc-color)