Hello Fam! 
Are you looking to easily modernize the user interfaces of your cross-platform projects? Allow me to introduce B4XDaisySelect!
Engineered as a standalone native view layer, B4XDaisySelect brings the highly sought-after, beautiful aesthetics of DaisyUI directly to your B4A, B4i, and B4J applications. It completely manages its own visual layer, meaning you get smooth, responsive trigger panels, chevron icons, and dropdown overlays without relying on extra dependencies.
Key Features:
Quick Start Example (Beginner Friendly!) Here is a super simple, step-by-step way to initialize the component, style it, and capture user selections in code:
Stop settling for standard OS default spinners and jump in to give your UI the beautiful upgrade it deserves! Let me know if you have any questions, feature requests, or bugs below!
#SharingTheGoodness
Are you looking to easily modernize the user interfaces of your cross-platform projects? Allow me to introduce B4XDaisySelect!
Engineered as a standalone native view layer, B4XDaisySelect brings the highly sought-after, beautiful aesthetics of DaisyUI directly to your B4A, B4i, and B4J applications. It completely manages its own visual layer, meaning you get smooth, responsive trigger panels, chevron icons, and dropdown overlays without relying on extra dependencies.
- Rich Color Variants: Switch effortlessly between none, ghost, neutral, primary, secondary, accent, info, success, warning, and error.
- Responsive Sizing: Fully supports md, lg, and xl sizes to automatically scale font sizes and paddings.
- Built-in Labels & Hints: Cleanly display a LabelAbove and HintText natively integrated into the component's layout.
- Smart Data Binding: Separate the user-facing text from the computer-facing value using AddItem(Value, Text) (perfect for database IDs!).
- Theme & Radius Support: Apply corner tokens from rounded-none all the way to rounded-full.
B4X:
Sub Globals
Private pnlHost As B4XView ' The layout panel where the select will be hosted
Private mySelect As B4XDaisySelect
End Sub
Sub Activity_Create(FirstTime As Boolean)
' 1. Initialize the component (Pass the Callback module and Event Prefix)
mySelect.Initialize(Me, "mySelect")
' 2. Add it dynamically to your parent view
' Parameters: Parent View, Left, Top, Width, Height
mySelect.AddToParent(pnlHost, 20dip, 50dip, 300dip, 50dip)
' 3. Apply DaisyUI-inspired styling
mySelect.Variant = "primary" ' Try "secondary", "success", "ghost", etc.
mySelect.Size = "lg" ' Scales height and text size (md, lg, xl)
mySelect.Radius = "rounded-lg" ' Set smooth corners
mySelect.LabelAbove = "Favorite Platform" ' Displays a title above the select
mySelect.HintText = "Select your preferred B4X tool." ' Helper text below
mySelect.Placeholder = "Choose an option..." ' Text shown when nothing is selected
' 4. Add items using Value / Text pairs.
' "Value" is what your code reads (e.g. database key), "Text" is what the user sees.
mySelect.AddItem("b4a", "B4A (Android)")
mySelect.AddItem("b4i", "B4i (iOS)")
mySelect.AddItem("b4j", "B4J (Desktop)")
End Sub
' 5. Trap the selection event!
' This triggers whenever the user picks an option from the dropdown overlay.
Private Sub mySelect_SelectedChanged(Index As Int, Value As String)
Log("User clicked item at index: " & Index)
Log("The underlying value selected is: " & Value)
' Example: If the user picks "B4A (Android)", Value will be "b4a"
#If B4A
ToastMessageShow("You selected: " & Value, False)
#End If
End Sub
Stop settling for standard OS default spinners and jump in to give your UI the beautiful upgrade it deserves! Let me know if you have any questions, feature requests, or bugs below!
#SharingTheGoodness