Hello B4X Developers!
Are you looking to add modern, web-style hyperlinks to your mobile or desktop applications? We are excited to showcase the capabilities of B4XDaisyLink, a seamless implementation of DaisyUI link classes brought directly into the B4X ecosystem.
Because B4XDaisyLink utilizes our robust B4XDaisyText as its core building block, it inherits a wealth of flexible styling properties right out of the box. You no longer have to manually handle text colors, hover states, or underline formatting.
Key Features:
Let me know what you think of this component and how you plan to use it in your projects. Happy coding!
Related Content
www.b4x.com
Are you looking to add modern, web-style hyperlinks to your mobile or desktop applications? We are excited to showcase the capabilities of B4XDaisyLink, a seamless implementation of DaisyUI link classes brought directly into the B4X ecosystem.
Because B4XDaisyLink utilizes our robust B4XDaisyText as its core building block, it inherits a wealth of flexible styling properties right out of the box. You no longer have to manually handle text colors, hover states, or underline formatting.
- Semantic Variants: Easily style your links using DaisyUI variants like primary, secondary, accent, neutral, info, success, warning, and error.
- Built-in Link Behaviors: Use the Link boolean property to immediately render text as a clickable link and the Underline property to toggle visual underlines.
- URL Intents: The dedicated Url property lets you cleanly define a destination URL that handles routing when the link is clicked.
- Auto Resize & Constraints: Automatically resizes the height to fit text content seamlessly.
B4X:
' 1. Declare the component in your Globals or Class_Globals
Private myLink As B4XDaisyText
' 2. Initialize and add it to your parent container (e.g., pnlHost)
myLink.Initialize(Me, "myLink")
myLink.AddToParent(pnlHost, 12dip, 20dip, 200dip, 30dip)
' 3. Configure the link properties
myLink.Text = "Click here to visit our site"
myLink.TextSize = "text-lg"
myLink.Link = True ' Renders as a clickable link
myLink.Underline = True ' Shows underline
myLink.Variant = "primary" ' Applies the semantic primary color
myLink.Url = "https://www.b4x.com"
' 4. Handle the click event!
Private Sub myLink_Click (Tag As Object)
Log("The link was clicked! Tag: " & Tag)
#If B4A
ToastMessageShow("Navigating to: " & myLink.Url, False)
#End If
End Sub
Let me know what you think of this component and how you plan to use it in your projects. Happy coding!
Related Content
[B4X] [B4A] B4XDaisy UI Kit - Native Components inspired by DaisyUI & Tailwind
Hi Fam Download from GitHub Download from Google Drive Track the Project Ask NotebookLLM about B4XDaisyUI I am proud to present the B4X Daisy UI Kit, a suite of native custom views designed to bring the modern aesthetic and utility of the DaisyUI (Tailwind CSS) framework to B4X...