What is the best way to create a phone icon with a clickable phone number that is only clickable on mobile devices, similar to what Loans Hub has done, using Webflow?
Published on
September 22, 2023
To create a phone icon with a clickable phone number that is only clickable on mobile devices in Webflow, you can follow these steps:
- Add the phone icon:
- Place a
Div Block
on your page where you want the phone icon to appear. - Set the size and position of the
Div Block
appropriately. - Add a phone icon to the
Div Block
using either an image or an appropriate font icon from Webflow's icon library.
- Create a link with the phone number:
- Select the
Div Block
containing the phone icon. - On the right-hand panel, go to the
Link Settings
section. - Add your phone number (with the appropriate country code) as the link URL, starting with
tel:
(e.g.,tel:+123456789
). - This will tell the browser to initiate a phone call when the link is clicked.
- Hide the phone icon on non-mobile devices:
- Select the
Div Block
or the parent element containing the phone icon. - Go to the
Settings
panel on the right-hand side. - Click on the
+
icon to add a new conditional visibility rule. - Choose
Visibility
from the drop-down menu. - In the first field, select
Device type
. - In the second field, select
Is Mobile
. - Select
Hide
to hide the elements on devices that are not mobile.
- Style the phone icon and link:
- Customize the style of the
Div Block
and the phone icon using Webflow's design tools. - Apply appropriate typography, colors, sizes, and spacing to make it visually appealing.
- Make sure the phone icon is clearly identifiable as a clickable link, such as by using a contrasting color or hover effect.
By following these steps, you can create a phone icon with a clickable phone number that is only clickable on mobile devices in Webflow. This will help improve the user experience by providing an easy way for mobile users to initiate phone calls directly from your website.
Additional Questions:
- How can I customize the design of a phone icon in Webflow?
- Can I use a custom font icon for the phone icon instead of the default ones provided by Webflow?
- How can I track clicks on the phone icon as events in Google Analytics?