Media · Gutenberg

File Download block for WordPress

Styled file download card with icon, file name, size, description, and call-to-action button.

Get Blockenberg

Free Gutenberg block in Blockenberg. The inspector controls and front-end behavior on this page come from this block’s source, not a shared stub.

Get Blockenberg

What it actually does

Styled file download card with icon, file name, size, description, and call-to-action button.

Inspector panels on this block: File, Icon, Card Style. Those titles come from index.js, not from a shared template.

Behavior controls: “File URL (manual)” (Auto-filled from media or enter a direct URL).

File Download has no render.php and no frontend.js. The saved Gutenberg HTML is what visitors see, plus Blockenberg layout/typography CSS.

Where to find it

Gutenberg inserter → Media → search “File Download” (block name `blockenberg/file-download` in block.json). Style it in the sidebar after insert.

How to use File Download block for WordPress

  1. Install Blockenberg. Install from WordPress.org and activate the plugin.
  2. Insert the block. Edit a page, click +, search for “File Download”, insert it. Category: Media.
  3. Configure inspector controls that exist on this block. Open File. Set “File Name”, “File Size (display)”, “File Type / Badge”, “File URL (manual)”.
  4. Publish. Save the page. Output is the saved block HTML; typography/colors follow Blockenberg shared panels.

Inspector controls from this block’s code

ControlWhat the code does
File NameText field in the inspector. block.json default: Annual Report 2025.pdf. Saved as `fileName`.
File Size (display)Text field in the inspector. block.json default: 2.4 MB. Saved as `fileSize`.
File Type / BadgeText field in the inspector. block.json default: PDF. Saved as `fileType`.
File URL (manual)Text field in the inspector. Auto-filled from media or enter a direct URL. Saved as `fileUrl`.
DescriptionText field in the inspector. block.json default: Download and review our complete annual report for the year 2025.. Saved as `description`.
Button LabelText field in the inspector. block.json default: Download. Saved as `btnLabel`.
Open In New TabOn/off toggle in the inspector. Off by default. Saved as `openInNew`.
Show IconOn/off toggle in the inspector. On by default. Saved as `showIcon`.
Icon Box Size (px)Numeric range control in the inspector. Range 32–96. block.json default: 48. Saved as `iconSize`.
File Name (Typo Name)Shared Blockenberg typography popover (family, size, weight, spacing). Saved as `typoName`.
Description (Typo Desc)Shared Blockenberg typography popover (family, size, weight, spacing). Saved as `typoDesc`.
MetaShared Blockenberg typography popover (family, size, weight, spacing). Saved as `typoMeta`.
BadgeShared Blockenberg typography popover (family, size, weight, spacing). Saved as `typoBadge`.
Typography — ButtonShared Blockenberg typography popover (family, size, weight, spacing). Saved as `typoBtn`.
Border Radius (px)Numeric range control in the inspector. Range 0–32. block.json default: 12. Saved as `cardRadius`.
Card ShadowOn/off toggle in the inspector. On by default. Saved as `cardShadow`.
Button Radius (px)Numeric range control in the inspector. Range 0–50. block.json default: 8. Saved as `btnRadius`.
Type BadgeOn/off toggle in the inspector. On by default. Saved as `badgeEnabled`.
Card BackgroundColor control in the inspector. block.json default: #ffffff. Saved as `cardBg`.
Card BorderColor control in the inspector. block.json default: #e5e7eb. Saved as `cardBorder`.
Icon BGColor control in the inspector. block.json default: #ede9fc. Saved as `iconBg`.
Icon ColorColor control in the inspector. block.json default: #6c3fb5. Saved as `iconColor`.
File Name ColorColor control in the inspector. block.json default: #1f2937. Saved as `nameColor`.
Meta ColorColor control in the inspector. block.json default: #6b7280. Saved as `metaColor`.
Description ColorColor control in the inspector. block.json default: #4b5563. Saved as `descColor`.
Button BGColor control in the inspector. block.json default: #6c3fb5. Saved as `btnBg`.
Button TextColor control in the inspector. block.json default: #ffffff. Saved as `btnColor`.
Badge BGColor control in the inspector. block.json default: #6c3fb5. Saved as `badgeBg`.
Badge TextColor control in the inspector. block.json default: #ffffff. Saved as `badgeColor`.

When this is the right block

Notes from the implementation

viewScript: this folder’s frontend.js is enqueued on the front end for this block.

FAQ

How do I add the File Download block in WordPress?

Install Blockenberg from WordPress.org, edit a page in the block editor, click +, and search for “File Download”. It sits under Media. After insert, open File and set “File Name”, “File Size (display)”, “File Type / Badge”, “File URL (manual)”.

What makes File Download different from other Blockenberg blocks?

Styled file download card with icon, file name, size, description, and call-to-action button. Inspector labels on this block include “File Name”, “File Size (display)”, “File Type / Badge”, “File URL (manual)”.

Is the File Download Gutenberg block free?

Yes. File Download ships inside Blockenberg. Get the plugin from WordPress.org — no paid add-on is required for this block.

Can I style File Download to match my theme?

Yes. Blockenberg’s shared typography and color panels apply here, plus any block-specific style controls listed on this page (panels: File, Icon, Card Style).

Related media blocks

Get Blockenberg

Install Blockenberg from WordPress.org, then insert File Download from the Gutenberg inserter.

Get Blockenberg