Skip to content

Button Widgets

Buttons are the most important interactive elements of your app. BLOCQ offers five button types that you can customize individually.

Button TypeUsageExample
PrimaryMain actions”Save”, “Submit”
SecondarySecondary actions”Cancel”, “Back”
TextSubtle actions”Learn more”, Links
IconCompact actionsShare, Favorite
FABMain page actionNew post, Add

The most prominent button for the most important actions.

SettingDescription
Background ColorFill color of the button
Text ColorColor of the label
Border ColorColor of the border (when activated)
SettingRangeDescription
Border Width0-4 pxThickness of the border
Elevation0-24Strength of the shadow
SettingDescription
Shadow ColorColor of the shadow
Blur RadiusSoftness of the shadow
Spread RadiusSpread of the shadow
Offset X/YPosition of the shadow
SettingDescription
Enable GradientColor gradient instead of solid color
Start ColorFirst color of the gradient
End ColorSecond color of the gradient
DirectionGradient direction (Horizontal, Vertical, Diagonal)
SettingRangeDescription
Height36-64 pxHeight of the button
Horizontal Padding8-48 pxInternal spacing left/right
Vertical Padding4-24 pxInternal spacing top/bottom
Corner Radius0-32 pxRounding of corners
Font Size12-24 pxSize of the label
Icon Size16-32 pxSize of the optional icon
Icon Spacing4-16 pxSpacing between icon and text
Font FamilyGoogle FontsFont of the label

For each state you can define separate colors:

Default state of the button.

SettingDescription
Background ColorColor when pressed
Text ColorText color when pressed
Overlay OpacityStrength of darkening
SettingDescription
Background ColorColor in disabled state
Text ColorText color in disabled state
OpacityOverall transparency
SettingDescription
Background ColorColor on focus
Text ColorText color on focus
Border ColorBorder color on focus
SettingOptionsDescription
Splash EffectOn/OffRipple animation on tap
Animation Duration100-500 msDuration of state transitions
Minimum Width0-200 pxMinimum button width

For less important actions, usually as outline button.

The settings are identical to the primary button, but with different default values:

  • Transparent background
  • Colored border
  • Colored text

Minimalist button without background.

  • No background in normal state
  • Only text (and optionally icon)
  • Subtle hover/press effect

Most settings correspond to the primary button. Additionally:

SettingDescription
UnderlineShow text underlined
Hover BackgroundLight background on hover

Compact button with icon only.

  • Square or round
  • Only icon, no text
  • Ideal for toolbars
SettingRangeDescription
Size32-56 pxOverall size of the button
Icon Size18-32 pxSize of the icon
Background Color-Fill color (often transparent)
Icon Color-Color of the icon
Corner Radius0-28 pxRounding (28 = round)

Floating action button for the main action of a page.

  • Floats over content
  • Prominently positioned
  • Round by default

All settings of the primary button, plus:

SettingOptionsDescription
SizeMini, Normal, LargeSize variant
ExtendedOn/OffWith text next to icon
PositionLeft, Center, RightHorizontal positioning
Elevation0-24Floating height (shadow)

When “Extended” is activated:

  • Shows icon and text
  • Wider, rounded shape
  • Additional text settings

Each button can have separate colors for Light and Dark Mode:

  1. Use the toggle in the preview area
  2. Edit the colors for the respective mode
  3. Test both modes in the preview

Tip: In Dark Mode, buttons should often be less saturated or brighter to remain visible.


Set the corner radius to half the button height (e.g. height 48 px = radius 24 px).

Can I use different fonts for different buttons?

Section titled “Can I use different fonts for different buttons?”

Yes, each button type has its own font setting. However, for consistency it’s recommended to use the same font.

Why does my button look strange in Dark Mode?

Section titled “Why does my button look strange in Dark Mode?”

Check if you’ve set the Dark Mode colors separately. Switch to Dark Mode with the toggle and adjust the colors.

What is the difference between Elevation and Shadow?

Section titled “What is the difference between Elevation and Shadow?”
  • Elevation: Simple elevation with automatic shadow
  • Shadow: Full control over the shadow

You can combine both or use only one.