<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Anele Mbanga on Medium]]></title>
        <description><![CDATA[Stories by Anele Mbanga on Medium]]></description>
        <link>https://medium.com/@mbanga-anele?source=rss-211b73c62681------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*_Bk2tOu2cyOeSefnMjAYeQ.jpeg</url>
            <title>Stories by Anele Mbanga on Medium</title>
            <link>https://medium.com/@mbanga-anele?source=rss-211b73c62681------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 14 Nov 2026 02:31:40 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@mbanga-anele/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[How to create an AutoComplete input in Ionic 7?]]></title>
            <link>https://mbanga-anele.medium.com/how-to-create-an-autocomplete-input-in-ionic-7-57c611646ea2?source=rss-211b73c62681------2</link>
            <guid isPermaLink="false">https://medium.com/p/57c611646ea2</guid>
            <category><![CDATA[ionic-app-development]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[ionic]]></category>
            <category><![CDATA[ionic-framework]]></category>
            <category><![CDATA[autocomplete]]></category>
            <dc:creator><![CDATA[Anele Mbanga]]></dc:creator>
            <pubDate>Thu, 15 Feb 2024 02:30:38 GMT</pubDate>
            <atom:updated>2024-02-15T02:30:38.632Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*scfy4AeeNG4bVVjPvdDFbg.png" /><figcaption>Figure 1: SithasoIonic7 Wireframes</figcaption></figure><p>I’ve been looking for a way to create an auto-complete input in Ionic 7. This I needed for my bespoke CLI (command line interface) for the wireframing application I’m developing.</p><p>A week or so ago, I added voice command to this Ionic Application, which enables one to dictate commands to the app and then it executes whatever is needed. You can see these videos on Youtube, <a href="https://youtu.be/XaEJj72ixCI">Part 1</a> and <a href="https://youtu.be/whDMfS7puJU">Part 2</a>.</p><p>The ion-input component does not expose the native input component, thus adding a “list” attribute and a &lt;datalist&gt; component to ion-input does not work. One needs another solution.</p><p>The CLI functionality I want to add must have a list of available commands so that when one types in the input, auto-complete is fired and one can then choose a command and press enter. This is depicted in Figure 2 below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OvZ3lHyS9LjrnKoErKt5-w.png" /><figcaption>Figure 2: SithasoIONIC7 Wireframes — AutoComplete List</figcaption></figure><p>As one has noted, some of the items in the auto-complete list are “3”, “3 view”, “all properties” etc. A user will type a command in the section depicted in Figure 3.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*M9f2byzYGKf0bsjHCJ_Ltg.png" /><figcaption>Figure 3: SithasoIONIC7 Wireframes — AutoComplete Input.</figcaption></figure><p>To create this component, we used an ion-item, input, ion-button and ion-icon. The HTML code for this looks like this.</p><p>We used an ion-item to host the input component. In the input component we set an attribute called “list” to “txtautocompletelist”. To properly format the input, we added the <strong><em>“native-input sc-ion-input-md”</em></strong> class. This makes the input to be like any other normal ion-input component.</p><pre>&lt;ion-item id=&quot;itemautocomplete&quot; detail=&quot;false&quot;<br> fill=&quot;outline&quot; shape=&quot;round&quot; <br>style=&quot;padding-left:0px;padding-right:0px&quot;&gt;<br>&lt;input id=&quot;txtautocomplete&quot; class=&quot;native-input sc-ion-input-md&quot; <br>list=&quot;txtautocompletelist&quot;&gt;<br>&lt;ion-button id=&quot;button1&quot; fill=&quot;clear&quot; mode=&quot;ios&quot; slot=&quot;end&quot; <br>style=&quot;--padding-start: 0px; --padding-bottom: 0px; <br>--padding-end: 0px; --padding-top: 0px;&quot;&gt;<br>  &lt;ion-icon id=&quot;button1_icon&quot; slot=&quot;icon-only&quot; name=&quot;send-outline&quot;&gt;&lt;/ion-icon&gt;<br>&lt;datalist id=&quot;txtautocompletelist&quot;&gt;<br>    &lt;option&gt;b4x&lt;/option&gt;<br>    &lt;option&gt;SithasoIONIC7&lt;/option&gt;<br>    &lt;option&gt;Made with Love&lt;/option&gt;<br>    &lt;option&gt;WebApps&lt;/option&gt;<br>&lt;/datalist&gt;<br>&lt;/ion-button&gt;<br>&lt;/ion-item&gt;</pre><p>The list is then created with the <strong>datalist </strong>tag and we use a collection of option tags to specify the list items.</p><p>The ion-item has a button icon in the end slot. This enables one to have a click event, which can then read the value of the input and process further.</p><p>One can then use JavaScript to clear the datalist options and add new ones according to their needs.</p><p>Happy coding.</p><p>Check me out on <a href="https://github.com/Mashiane">Github</a> and on my <a href="https://www.youtube.com/channel/UC3AZ61zr6I4rLAUmLNa3pRA">YT Channel</a> for more content.</p><p>Check out my other thread about <a href="https://medium.com/@mbanga-anele/sithasoionic7-wireframes-a-step-by-step-guide-to-professional-ionic-7-mobile-apps-designs-e51f571dd4c7">Ionic7 Wireframes</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=57c611646ea2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to create a Numeric Keypad in Ionic 7]]></title>
            <link>https://blog.stackademic.com/how-to-create-a-numeric-keypad-in-ionic-7-1528b2554bf0?source=rss-211b73c62681------2</link>
            <guid isPermaLink="false">https://medium.com/p/1528b2554bf0</guid>
            <category><![CDATA[html]]></category>
            <category><![CDATA[mobile-app-development]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[ionic-framework]]></category>
            <category><![CDATA[ionic]]></category>
            <dc:creator><![CDATA[Anele Mbanga]]></dc:creator>
            <pubDate>Tue, 16 Jan 2024 07:17:32 GMT</pubDate>
            <atom:updated>2024-01-16T07:17:32.016Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*y29q_U87GZIMYGpObpOcPQ.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@shs521?utm_content=creditCopyText&amp;utm_medium=referral&amp;utm_source=unsplash">Susan Holt Simpson</a> on <a href="https://unsplash.com/photos/brown-wooden-toy-blocks-GQ327RPuxhI?utm_content=creditCopyText&amp;utm_medium=referral&amp;utm_source=unsplash">Unsplash</a></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/368/1*a2Us8aFjEQ_ccFcTheJC2Q.png" /><figcaption>Figure 1: Numeric Keypad</figcaption></figure><p>By the end of this article, you would have learned how to create a numeric keypad like the one depicted in Figure 1.</p><p>To be able to create this numeric keypad, we use the ion-grid, ion-row, a collection of ion-col and ion-button components. We will make the size of each ion-col to be 4, so that we have 3 buttons on each “row”. We will also make our buttons round. There is one button with an ion-icon which will act as back-button, this is like the backspace button in the keyboard.</p><p>The Ok, button is assumed to return every value that has been entered when a user clicks any of the buttons. Let’s look at the HTML code to design this numeric keypad.</p><pre>&lt;ion-grid id=&quot;button1&quot; mode=&quot;ios&quot; class=&quot;ion-text-center&quot;&gt;&lt;ion-row<br>        id=&quot;button1row1&quot; mode=&quot;ios&quot;&gt;&lt;ion-col id=&quot;button1col1&quot; mode=&quot;ios&quot;<br>            size=&quot;4&quot;&gt;&lt;ion-button id=&quot;button1btn1&quot; mode=&quot;ios&quot; shape=&quot;round&quot;<br>                style=&quot;--border-radius:50%;aspect-ratio:1/1;height:62px;width:62px&quot;&gt;1&lt;/ion-button&gt;&lt;/ion-col&gt;&lt;ion-col<br>            id=&quot;button1col2&quot; mode=&quot;ios&quot; size=&quot;4&quot;&gt;&lt;ion-button id=&quot;button1btn2&quot;<br>                mode=&quot;ios&quot; shape=&quot;round&quot;<br>                style=&quot;--border-radius:50%;aspect-ratio:1/1;height:62px;width:62px&quot;&gt;2&lt;/ion-button&gt;&lt;/ion-col&gt;&lt;ion-col<br>            id=&quot;button1col3&quot; mode=&quot;ios&quot; size=&quot;4&quot;&gt;&lt;ion-button id=&quot;button1btn3&quot;<br>                mode=&quot;ios&quot; shape=&quot;round&quot;<br>                style=&quot;--border-radius:50%;aspect-ratio:1/1;height:62px;width:62px&quot;&gt;3&lt;/ion-button&gt;&lt;/ion-col&gt;&lt;ion-col<br>            id=&quot;button1col4&quot; mode=&quot;ios&quot; size=&quot;4&quot;&gt;&lt;ion-button id=&quot;button1btn4&quot;<br>                mode=&quot;ios&quot; shape=&quot;round&quot;<br>                style=&quot;--border-radius:50%;aspect-ratio:1/1;height:62px;width:62px&quot;&gt;4&lt;/ion-button&gt;&lt;/ion-col&gt;&lt;ion-col<br>            id=&quot;button1col5&quot; mode=&quot;ios&quot; size=&quot;4&quot;&gt;&lt;ion-button id=&quot;button1btn5&quot;<br>                mode=&quot;ios&quot; shape=&quot;round&quot;<br>                style=&quot;--border-radius:50%;aspect-ratio:1/1;height:62px;width:62px&quot;&gt;5&lt;/ion-button&gt;&lt;/ion-col&gt;&lt;ion-col<br>            id=&quot;button1col6&quot; mode=&quot;ios&quot; size=&quot;4&quot;&gt;&lt;ion-button id=&quot;button1btn6&quot;<br>                mode=&quot;ios&quot; shape=&quot;round&quot;<br>                style=&quot;--border-radius:50%;aspect-ratio:1/1;height:62px;width:62px&quot;&gt;6&lt;/ion-button&gt;&lt;/ion-col&gt;&lt;ion-col<br>            id=&quot;button1col7&quot; mode=&quot;ios&quot; size=&quot;4&quot;&gt;&lt;ion-button id=&quot;button1btn7&quot;<br>                mode=&quot;ios&quot; shape=&quot;round&quot;<br>                style=&quot;--border-radius:50%;aspect-ratio:1/1;height:62px;width:62px&quot;&gt;7&lt;/ion-button&gt;&lt;/ion-col&gt;&lt;ion-col<br>            id=&quot;button1col8&quot; mode=&quot;ios&quot; size=&quot;4&quot;&gt;&lt;ion-button id=&quot;button1btn8&quot;<br>                mode=&quot;ios&quot; shape=&quot;round&quot;<br>                style=&quot;--border-radius:50%;aspect-ratio:1/1;height:62px;width:62px&quot;&gt;8&lt;/ion-button&gt;&lt;/ion-col&gt;&lt;ion-col<br>            id=&quot;button1col9&quot; mode=&quot;ios&quot; size=&quot;4&quot;&gt;&lt;ion-button id=&quot;button1btn9&quot;<br>                mode=&quot;ios&quot; shape=&quot;round&quot;<br>                style=&quot;--border-radius:50%;aspect-ratio:1/1;height:62px;width:62px&quot;&gt;9&lt;/ion-button&gt;&lt;/ion-col&gt;&lt;ion-col<br>            id=&quot;button1col10&quot; mode=&quot;ios&quot; size=&quot;4&quot;&gt;&lt;ion-button<br>                id=&quot;button1btnminus&quot; mode=&quot;ios&quot; shape=&quot;round&quot;<br>                style=&quot;--border-radius:50%;aspect-ratio:1/1;height:62px;width:62px&quot;&gt;-&lt;/ion-button&gt;&lt;/ion-col&gt;&lt;ion-col<br>            id=&quot;button1col11&quot; mode=&quot;ios&quot; size=&quot;4&quot;&gt;&lt;ion-button id=&quot;button1btn0&quot;<br>                mode=&quot;ios&quot; shape=&quot;round&quot;<br>                style=&quot;--border-radius:50%;aspect-ratio:1/1;height:62px;width:62px&quot;&gt;0&lt;/ion-button&gt;&lt;/ion-col&gt;&lt;ion-col<br>            id=&quot;button1col12&quot; mode=&quot;ios&quot; size=&quot;4&quot;&gt;&lt;ion-button id=&quot;button1btndot&quot;<br>                mode=&quot;ios&quot; shape=&quot;round&quot;<br>                style=&quot;--border-radius:50%;aspect-ratio:1/1;height:62px;width:62px&quot;&gt;.&lt;/ion-button&gt;&lt;/ion-col&gt;&lt;ion-col<br>            id=&quot;button1col13&quot; mode=&quot;ios&quot; size=&quot;4&quot;&gt;&lt;ion-button<br>                id=&quot;button1btnback&quot; mode=&quot;ios&quot; shape=&quot;round&quot;<br>                style=&quot;--border-radius:50%;aspect-ratio:1/1;height:62px;width:62px;--padding-start:0px;--padding-bottom:0px;--padding-end:0px;--padding-top:0px;&quot;&gt;&lt;ion-icon<br>                    id=&quot;button1btnback_icon&quot; mode=&quot;ios&quot; slot=&quot;icon-only&quot;<br>                    name=&quot;backspace-outline&quot;&gt;&lt;/ion-icon&gt;&lt;/ion-button&gt;&lt;/ion-col&gt;&lt;ion-col<br>            id=&quot;button1col14&quot; mode=&quot;ios&quot; size=&quot;8&quot;&gt;&lt;ion-button id=&quot;button1btnok&quot;<br>                expand=&quot;block&quot; mode=&quot;ios&quot; shape=&quot;round&quot;<br>                style=&quot;height:62px&quot;&gt;Ok&lt;/ion-button&gt;&lt;/ion-col&gt;&lt;/ion-row&gt;&lt;/ion-grid&gt;</pre><p>The parent element for the numeric keypad is a grid with centered text. To center the text we use the class ion-text-center. We then add a single ion-row which will host all the ion-col + ion-button combinations.</p><p>We set the size of each ion-col to be 4. 4x3 = 12, which makes each “row” to span 12 spaces in the grid, making each column to be wrapped beneath each “12 spaces row”.</p><p>You will note that for each button we have set the shape attribute to round. I discovered that as much as this is set, it makes our buttons “oval” shaped, so I needed to apply styles to each button.</p><p>To make the buttons a perfect round shape, we added styles, a border-radius of 50%, aspect-ratio of 1/1 and then set a fixed width and height of 62 pixels.</p><p>The other interesting button is the back button. This button has an icon. The trick here was increasing the size of the icon. If one sets the font-size on the ion-icon, it does not work. I discovered that setting the padding on the button to 0px, on all sizes, fixes the ion-icon perfectly in place.</p><p>The best approach to increase the ion-icon font size is setting the <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/zoom">zoom</a> style attribute, discovered on stack overflow. I didn’t play enough with the font-size to see the cases it worked or didn’t work.</p><p>The Ok, button is a block button which takes up 8 spaces. This is done to add emphasis on the button.</p><p>One can then add events to the buttons and process the values clicked on each button. We won&#39;t expand on that here.</p><p>Happy coding.</p><p>Check me out on <a href="https://github.com/Mashiane">Github</a> and on my <a href="https://www.youtube.com/channel/UC3AZ61zr6I4rLAUmLNa3pRA">YT Channel</a> for more content.</p><p>Check out my other thread about <a href="https://medium.com/@mbanga-anele/sithasoionic7-wireframes-a-step-by-step-guide-to-professional-ionic-7-mobile-apps-designs-e51f571dd4c7">Ionic7 Wireframes</a></p><h3>Stackademic</h3><p>Thank you for reading until the end. Before you go:</p><ul><li>Please consider <strong>clapping</strong> and <strong>following</strong> the writer! 👏</li><li>Follow us <a href="https://twitter.com/stackademichq">X</a> | <a href="https://www.linkedin.com/company/stackademic"><strong>LinkedIn</strong></a><strong> |</strong> <a href="https://www.youtube.com/c/stackademic"><strong>YouTube</strong></a><strong> | </strong><a href="https://discord.gg/in-plain-english-709094664682340443"><strong>Discord</strong></a></li><li>Visit our other platforms: <a href="https://plainenglish.io/"><strong>In Plain English</strong></a><strong> | </strong><a href="https://cofeed.app/"><strong>CoFeed</strong></a><strong> | </strong><a href="https://venturemagazine.net/"><strong>Venture</strong></a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1528b2554bf0" width="1" height="1" alt=""><hr><p><a href="https://blog.stackademic.com/how-to-create-a-numeric-keypad-in-ionic-7-1528b2554bf0">How to create a Numeric Keypad in Ionic 7</a> was originally published in <a href="https://blog.stackademic.com/">Stackademic</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to create Numeric or Password or Text OTP Input in Ionic 7]]></title>
            <link>https://blog.stackademic.com/how-to-create-numeric-or-password-or-text-otp-input-in-ionic-7-0e5788b4a42f?source=rss-211b73c62681------2</link>
            <guid isPermaLink="false">https://medium.com/p/0e5788b4a42f</guid>
            <category><![CDATA[ionic]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[otp-verification]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[mobile-app-development]]></category>
            <dc:creator><![CDATA[Anele Mbanga]]></dc:creator>
            <pubDate>Tue, 16 Jan 2024 05:16:47 GMT</pubDate>
            <atom:updated>2024-01-16T05:16:47.361Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*V662zqiC-HPYxKN4D52yKg.jpeg" /><figcaption>Source: <a href="https://www.vecteezy.com/free-vector/verification-code">Vecteezy</a></figcaption></figure><p>By the end of this you would have grasped how to create OTP input using Ionic 7. We will create three different types of OTPs. One for numbers, another for password and another for normal text. Our OTP can be of variable lengths, being 4, 5 or 6 characters as depicted in Figure 1 below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/368/1*56cGbonP2Ek2e_m2PNimtw.png" /><figcaption>Figure 1: OTP Input</figcaption></figure><p>We will look at the HTML to create this OTP input. To create our OTP, we use a ion-grid, ion-row, ion-col and some ion-inputs. The minimum and maximum length of each input has been set to be 1, to only allow 1 character. The size of each column has been set to 2.</p><ol><li><strong>The Numeric OTP</strong></li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/342/1*elzBQCH32fPMhsJRAgHDzQ.png" /><figcaption>Figure 2: Numeric OTP</figcaption></figure><p>The fist OTP is composed of 1 ion-grid, 1 ion-row, 4 ion-col and 4 ion-input components. The size of each ion-col has been set to 2. The type attribute for each of the ion-input inside the ion-col has been set to “tel”, this will allow for a numeric keypad to be shown on mobile devices. The HTML design of this OTP is depicted below.</p><pre>&lt;ion-grid id=&quot;myotp&quot; mode=&quot;ios&quot; class=&quot;ion-text-center&quot;&gt;<br>    &lt;ion-row id=&quot;myotpgridrow&quot; mode=&quot;ios&quot;&gt;<br>        &lt;ion-col id=&quot;myotpgridrowcol1&quot; mode=&quot;ios&quot; size=&quot;2&quot;&gt;<br>            &lt;ion-input id=&quot;myotpotp1&quot; fill=&quot;outline&quot; maxlength=&quot;1&quot; minlength=&quot;1&quot; mode=&quot;md&quot; type=&quot;tel&quot; class=&quot;myotpotp&quot; style=&quot;--border-radius:10px&quot;&gt;<br>            &lt;/ion-input&gt;<br>        &lt;/ion-col&gt;<br>        &lt;ion-col id=&quot;myotpgridrowcol2&quot; mode=&quot;ios&quot; size=&quot;2&quot;&gt;<br>            &lt;ion-input id=&quot;myotpotp2&quot; fill=&quot;outline&quot; maxlength=&quot;1&quot; minlength=&quot;1&quot; mode=&quot;md&quot; type=&quot;tel&quot; class=&quot;myotpotp&quot; style=&quot;--border-radius:10px&quot;&gt;<br>            &lt;/ion-input&gt;<br>        &lt;/ion-col&gt;<br>        &lt;ion-col id=&quot;myotpgridrowcol3&quot; mode=&quot;ios&quot; size=&quot;2&quot;&gt;<br>            &lt;ion-input id=&quot;myotpotp3&quot; fill=&quot;outline&quot; maxlength=&quot;1&quot; minlength=&quot;1&quot; mode=&quot;md&quot; type=&quot;tel&quot; class=&quot;myotpotp&quot; style=&quot;--border-radius:10px&quot;&gt;<br>            &lt;/ion-input&gt;<br>        &lt;/ion-col&gt;<br>        &lt;ion-col id=&quot;myotpgridrowcol4&quot; mode=&quot;ios&quot; size=&quot;2&quot;&gt;<br>            &lt;ion-input id=&quot;myotpotp4&quot; fill=&quot;outline&quot; maxlength=&quot;1&quot; minlength=&quot;1&quot; mode=&quot;md&quot; type=&quot;tel&quot; class=&quot;myotpotp&quot; style=&quot;--border-radius:10px&quot;&gt;<br>            &lt;/ion-input&gt;<br>        &lt;/ion-col&gt;<br>    &lt;/ion-row&gt;<br>&lt;/ion-grid&gt;</pre><p>By setting our ion-input mode to “md” and the fill to “outline” we are able to have a border around the ion-inputs. We have however adjusted the border radius style of the ion-inputs to make it more rounder.</p><p><strong>2. The Password OTP</strong></p><p>Our password OTP hides the text entered because each of the ion-input “type” attributes has been set to input. In the example above we created 4 inputs, this example has 1 additional input, making our OTP length to be 5 characters.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/410/1*NK5fhCB989aOtIbktMK9Ew.png" /><figcaption>Figure 2: Password OTP</figcaption></figure><p>Let’s look at the HTML structure of the password OTP as depicted in Figure 2.</p><pre>&lt;ion-grid id=&quot;input1&quot; mode=&quot;ios&quot; class=&quot;ion-text-center&quot;&gt;<br>    &lt;ion-row id=&quot;input1gridrow&quot; mode=&quot;ios&quot;&gt;<br>        &lt;ion-col id=&quot;input1gridrowcol1&quot; mode=&quot;ios&quot; size=&quot;2&quot;&gt;<br>            &lt;ion-input id=&quot;input1otp1&quot; fill=&quot;outline&quot; maxlength=&quot;1&quot; minlength=&quot;1&quot; mode=&quot;md&quot; type=&quot;password&quot; class=&quot;input1otp&quot; style=&quot;--border-radius:10px&quot;&gt;<br>            &lt;/ion-input&gt;<br>        &lt;/ion-col&gt;<br>        &lt;ion-col id=&quot;input1gridrowcol2&quot; mode=&quot;ios&quot; size=&quot;2&quot;&gt;<br>            &lt;ion-input id=&quot;input1otp2&quot; fill=&quot;outline&quot; maxlength=&quot;1&quot; minlength=&quot;1&quot; mode=&quot;md&quot; type=&quot;password&quot; class=&quot;input1otp&quot; style=&quot;--border-radius:10px&quot;&gt;<br>            &lt;/ion-input&gt;<br>        &lt;/ion-col&gt;<br>        &lt;ion-col id=&quot;input1gridrowcol3&quot; mode=&quot;ios&quot; size=&quot;2&quot;&gt;<br>            &lt;ion-input id=&quot;input1otp3&quot; fill=&quot;outline&quot; maxlength=&quot;1&quot; minlength=&quot;1&quot; mode=&quot;md&quot; type=&quot;password&quot; class=&quot;input1otp&quot; style=&quot;--border-radius:10px&quot;&gt;<br>            &lt;/ion-input&gt;<br>        &lt;/ion-col&gt;<br>        &lt;ion-col id=&quot;input1gridrowcol4&quot; mode=&quot;ios&quot; size=&quot;2&quot;&gt;<br>            &lt;ion-input id=&quot;input1otp4&quot; fill=&quot;outline&quot; maxlength=&quot;1&quot; minlength=&quot;1&quot; mode=&quot;md&quot; type=&quot;password&quot; class=&quot;input1otp&quot; style=&quot;--border-radius:10px&quot;&gt;<br>            &lt;/ion-input&gt;<br>        &lt;/ion-col&gt;<br>        &lt;ion-col id=&quot;input1gridrowcol5&quot; mode=&quot;ios&quot; size=&quot;2&quot;&gt;<br>            &lt;ion-input id=&quot;input1otp5&quot; fill=&quot;outline&quot; maxlength=&quot;1&quot; minlength=&quot;1&quot; mode=&quot;md&quot; type=&quot;password&quot; class=&quot;input1otp&quot; style=&quot;--border-radius:10px&quot;&gt;<br>            &lt;/ion-input&gt;<br>        &lt;/ion-col&gt;<br>    &lt;/ion-row&gt;<br>&lt;/ion-grid&gt;</pre><p>You will note that this HTML code is not very different from the one above. In this instance we have an additional ion-col with an ion-input component. The type attribute for each of the ion-inputs has been set to password, completing our mission.</p><p><strong>3. The Text OTP</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/490/1*tNOFDCSgDpAyGG0bIWSTeA.png" /><figcaption>Figure 3: Text OTP</figcaption></figure><p>You guessed it right, the text OTP, means that each of the ion-input components will receive an attribute value of “text” for the “type” attribute. Let’s take a look in the HTML below.</p><pre>&lt;ion-grid id=&quot;input2&quot; mode=&quot;ios&quot; class=&quot;ion-text-center&quot;&gt;<br>    &lt;ion-row id=&quot;input2gridrow&quot; mode=&quot;ios&quot;&gt;<br>        &lt;ion-col id=&quot;input2gridrowcol1&quot; mode=&quot;ios&quot; size=&quot;2&quot;&gt;<br>            &lt;ion-input id=&quot;input2otp1&quot; fill=&quot;outline&quot; maxlength=&quot;1&quot; minlength=&quot;1&quot; mode=&quot;md&quot; type=&quot;text&quot; class=&quot;input2otp&quot; style=&quot;--border-radius:10px&quot;&gt;<br>            &lt;/ion-input&gt;<br>        &lt;/ion-col&gt;<br>        &lt;ion-col id=&quot;input2gridrowcol2&quot; mode=&quot;ios&quot; size=&quot;2&quot;&gt;<br>            &lt;ion-input id=&quot;input2otp2&quot; fill=&quot;outline&quot; maxlength=&quot;1&quot; minlength=&quot;1&quot; mode=&quot;md&quot; type=&quot;text&quot; class=&quot;input2otp&quot; style=&quot;--border-radius:10px&quot;&gt;<br>            &lt;/ion-input&gt;<br>        &lt;/ion-col&gt;<br>        &lt;ion-col id=&quot;input2gridrowcol3&quot; mode=&quot;ios&quot; size=&quot;2&quot;&gt;<br>            &lt;ion-input id=&quot;input2otp3&quot; fill=&quot;outline&quot; maxlength=&quot;1&quot; minlength=&quot;1&quot; mode=&quot;md&quot; type=&quot;text&quot; class=&quot;input2otp&quot; style=&quot;--border-radius:10px&quot;&gt;<br>            &lt;/ion-input&gt;<br>        &lt;/ion-col&gt;<br>        &lt;ion-col id=&quot;input2gridrowcol4&quot; mode=&quot;ios&quot; size=&quot;2&quot;&gt;<br>            &lt;ion-input id=&quot;input2otp4&quot; fill=&quot;outline&quot; maxlength=&quot;1&quot; minlength=&quot;1&quot; mode=&quot;md&quot; type=&quot;text&quot; class=&quot;input2otp&quot; style=&quot;--border-radius:10px&quot;&gt;<br>            &lt;/ion-input&gt;<br>        &lt;/ion-col&gt;<br>        &lt;ion-col id=&quot;input2gridrowcol5&quot; mode=&quot;ios&quot; size=&quot;2&quot;&gt;<br>            &lt;ion-input id=&quot;input2otp5&quot; fill=&quot;outline&quot; maxlength=&quot;1&quot; minlength=&quot;1&quot; mode=&quot;md&quot; type=&quot;text&quot; class=&quot;input2otp&quot; style=&quot;--border-radius:10px&quot;&gt;<br>            &lt;/ion-input&gt;<br>        &lt;/ion-col&gt;<br>        &lt;ion-col id=&quot;input2gridrowcol6&quot; mode=&quot;ios&quot; size=&quot;2&quot;&gt;<br>            &lt;ion-input id=&quot;input2otp6&quot; fill=&quot;outline&quot; maxlength=&quot;1&quot; minlength=&quot;1&quot; mode=&quot;md&quot; type=&quot;text&quot; class=&quot;input2otp&quot; style=&quot;--border-radius:10px&quot;&gt;<br>            &lt;/ion-input&gt;<br>        &lt;/ion-col&gt;<br>    &lt;/ion-row&gt;<br>&lt;/ion-grid&gt;</pre><p>In this example, we have created 6 rows and 6 input components. Each input component type attribute has been set to text, so that it can allow text.</p><p>Congratulations, we have just successfully created our 3 types of OTP inputs, one to take numbers, one to take a password and another one to take any text. All of these accept 1 character per input component.</p><p>Happy coding.</p><p>Check me out on <a href="https://github.com/Mashiane">Github</a> and on my <a href="https://www.youtube.com/channel/UC3AZ61zr6I4rLAUmLNa3pRA">YT Channel</a> for more content.</p><p>Check out my other thread about <a href="https://medium.com/@mbanga-anele/sithasoionic7-wireframes-a-step-by-step-guide-to-professional-ionic-7-mobile-apps-designs-e51f571dd4c7">Ionic7 Wireframes</a></p><h3>Stackademic</h3><p>Thank you for reading until the end. Before you go:</p><ul><li>Please consider <strong>clapping</strong> and <strong>following</strong> the writer! 👏</li><li>Follow us <a href="https://twitter.com/stackademichq">X</a> | <a href="https://www.linkedin.com/company/stackademic"><strong>LinkedIn</strong></a><strong> |</strong> <a href="https://www.youtube.com/c/stackademic"><strong>YouTube</strong></a><strong> | </strong><a href="https://discord.gg/in-plain-english-709094664682340443"><strong>Discord</strong></a></li><li>Visit our other platforms: <a href="https://plainenglish.io/"><strong>In Plain English</strong></a><strong> | </strong><a href="https://cofeed.app/"><strong>CoFeed</strong></a><strong> | </strong><a href="https://venturemagazine.net/"><strong>Venture</strong></a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0e5788b4a42f" width="1" height="1" alt=""><hr><p><a href="https://blog.stackademic.com/how-to-create-numeric-or-password-or-text-otp-input-in-ionic-7-0e5788b4a42f">How to create Numeric or Password or Text OTP Input in Ionic 7</a> was originally published in <a href="https://blog.stackademic.com/">Stackademic</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Create “Instagram” Stories in Ionic7 with SwiperJS —The Vanilla JavaScript Approach]]></title>
            <link>https://javascript.plainenglish.io/how-to-create-instagram-stories-in-ionic7-with-swiperjs-the-vanilla-javascript-approach-f0f92b41621f?source=rss-211b73c62681------2</link>
            <guid isPermaLink="false">https://medium.com/p/f0f92b41621f</guid>
            <category><![CDATA[swiper-js]]></category>
            <category><![CDATA[app-development]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[ionic]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Anele Mbanga]]></dc:creator>
            <pubDate>Mon, 08 Jan 2024 08:17:29 GMT</pubDate>
            <atom:updated>2024-01-08T08:17:29.069Z</atom:updated>
            <content:encoded><![CDATA[<p>You can check out the Demo App on <a href="https://sithaso-ionic-7-instagram-stories.vercel.app/#/">Vercel</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/551/1*AlIOGy0gCR7NtQDPmWBvew.png" /><figcaption>Figure 1: Stories with SwiperJS</figcaption></figure><p>By the end of this, you will have learned how to make the ion-badge round and also center the ion-icon inside it. You will also learn how to put a ion-badge inside an ion-avatar, add padding to the avatar and also add a border to it. You will also learn how to use SwiperJS instead of ion-slides, but using JavaScript. Our approach is just looking at the HTML.</p><p>The current version of Ionic 7 does not have <strong>ion-slides</strong> anymore. One is able to use <a href="https://swiperjs.com/">SwiperJS</a> to create amazing slider applications. You can see the migration guide <a href="https://ionicframework.com/docs/vue/slides">here</a>.</p><p>In my learning curve about Ionic7, I decided to follow the vanilla JavaScript approach. I am well vested with Vue, but just did not want to learn Angular as yet. We will see with time though about that love and hate relationship. Ha ha ha. For this thread, I’m going to make a silly assumption that you know a thing or two about JavaScript, using the script tag, etc.</p><p>Anyway, the SwiperJS documentation has details in terms of how to get started installing Swiper in your project, so we won’t address that here. You can see the Get Started section <a href="https://swiperjs.com/get-started">here</a>.</p><p>In the implementation above, each slide has an ion-avatar with padding and a border. The first slides’ avatar has an <a href="https://ionicframework.com/docs/api/badge">ion-badge</a> with an <a href="https://ionicframework.com/docs/api/icon">ion-icon</a> inside. The badge itself was trickier to make round, however we used css styling to ensure success, like this.</p><pre>&lt;ion-avatar id=&quot;avatar1&quot; style=&quot;border-color: rgb(34, 156, 226); border-style: solid; border-width: 2px; margin-bottom: 15px; margin-right: 15px; padding: 2px; overflow: visible; position: relative;&quot;&gt;&lt;img id=&quot;avatar1_img&quot; alt=&quot;&quot; src=&quot;https://images.unsplash.com/photo-1507003211169-0a1dd7228f2d?ixlib=rb-1.2.1&amp;amp;ixid=eyJhcHBfaWQiOjEyMDd9&amp;amp;auto=format&amp;amp;fit=facearea&amp;amp;w=128&amp;amp;h=128&amp;amp;q=60&amp;amp;facepad=1.5&quot;&gt;<br>                &lt;ion-badge id=&quot;avatar1_badge&quot;<br>                    mode=&quot;ios&quot; style=&quot;aspect-ratio:1/1;border-radius:100%;display:flex;align-items:center;justify-content:center;background-color:#229ce2;bottom:-10px;right:-10px;position:absolute&quot;&gt;<br>                    &lt;ion-icon id=&quot;avatar1_badge_icon&quot; name=&quot;add&quot;&gt;&lt;/ion-icon&gt;<br>                &lt;/ion-badge&gt;<br>            &lt;/ion-avatar&gt;</pre><p>Using absolute positioning on the badge, we have set its bottom and right style properties to -10px. You can change these to suit your needs to place the badge on either TL, BL, TR, BR, the example above is for BR (Bottom Right). Due to the “badge-icon” being on the bottom right, we also set the margins of the avatar to be increased so that the badge can show.</p><p>If you happen to place the badge on either position, be sure to increase the margins also.</p><p>What I also found helpful was this TypeScript <a href="https://github.com/ionic-team/ionic-framework/blob/main/core/src/components/slides/IonicSlides.ts">source code</a> from the Ionic Framework documentation about <strong>ion-slides</strong> about the settings that were used before.</p><p>To make the swiper work, as above, the <strong>SlidesPerView </strong>property was set to <strong>4.5.</strong> Below is the complete slider html source code as depicted in Figure 1.</p><pre>&lt;div id=&quot;swiper1&quot; class=&quot;swiper ion-padding&quot; style=&quot;width:100%&quot;&gt;<br>    &lt;div id=&quot;swiper1slides&quot; class=&quot;swiper-wrapper&quot;&gt;<br>        &lt;div id=&quot;swiperslide1&quot; class=&quot;swiper-slide&quot;&gt;<br>            &lt;ion-avatar id=&quot;avatar1&quot; style=&quot;border-color: rgb(34, 156, 226); border-style: solid; border-width: 2px; margin-bottom: 15px; margin-right: 15px; padding: 2px; overflow: visible; position: relative;&quot;&gt;&lt;img id=&quot;avatar1_img&quot; alt=&quot;&quot; src=&quot;https://images.unsplash.com/photo-1507003211169-0a1dd7228f2d?ixlib=rb-1.2.1&amp;amp;ixid=eyJhcHBfaWQiOjEyMDd9&amp;amp;auto=format&amp;amp;fit=facearea&amp;amp;w=128&amp;amp;h=128&amp;amp;q=60&amp;amp;facepad=1.5&quot;&gt;<br>                &lt;ion-badge id=&quot;avatar1_badge&quot;<br>                    mode=&quot;ios&quot; style=&quot;aspect-ratio:1/1;border-radius:100%;display:flex;align-items:center;justify-content:center;background-color:#229ce2;bottom:-10px;right:-10px;position:absolute&quot;&gt;<br>                    &lt;ion-icon id=&quot;avatar1_badge_icon&quot; name=&quot;add&quot;&gt;&lt;/ion-icon&gt;<br>                &lt;/ion-badge&gt;<br>            &lt;/ion-avatar&gt;<br>        &lt;/div&gt;<br>        &lt;div id=&quot;swiperslide2&quot; class=&quot;swiper-slide&quot;&gt;<br>            &lt;ion-avatar id=&quot;avatar3&quot; style=&quot;border:2px solid #97cdec;padding:2px&quot;&gt;&lt;img id=&quot;avatar3_img&quot; alt=&quot;&quot; src=&quot;https://images.unsplash.com/photo-1568967729548-e3dbad3d37e0?ixlib=rb-1.2.1&amp;amp;ixid=eyJhcHBfaWQiOjEyMDd9&amp;amp;auto=format&amp;amp;fit=facearea&amp;amp;w=128&amp;amp;h=128&amp;amp;q=60&amp;amp;facepad=1.5&quot;&gt;&lt;/ion-avatar&gt;<br>        &lt;/div&gt;<br>        &lt;div id=&quot;swiperslide3&quot; class=&quot;swiper-slide&quot;&gt;<br>            &lt;ion-avatar id=&quot;avatar4&quot; style=&quot;border:2px solid #97cdec;padding:2px&quot;&gt;&lt;img id=&quot;avatar4_img&quot; alt=&quot;&quot; src=&quot;https://images.unsplash.com/photo-1494790108377-be9c29b29330?ixlib=rb-1.2.1&amp;amp;ixid=eyJhcHBfaWQiOjEyMDd9&amp;amp;auto=format&amp;amp;fit=facearea&amp;amp;w=128&amp;amp;h=128&amp;amp;q=60&amp;amp;facepad=1.5&quot;&gt;&lt;/ion-avatar&gt;<br>        &lt;/div&gt;<br>        &lt;div id=&quot;swiperslide4&quot; class=&quot;swiper-slide&quot;&gt;<br>            &lt;ion-avatar id=&quot;avatar2&quot; style=&quot;border:2px solid #97cdec;padding:2px&quot;&gt;&lt;img id=&quot;avatar2_img&quot; alt=&quot;&quot; src=&quot;https://images.unsplash.com/photo-1557296387-5358ad7997bb?ixlib=rb-1.2.1&amp;amp;ixid=eyJhcHBfaWQiOjEyMDd9&amp;amp;auto=format&amp;amp;fit=facearea&amp;amp;w=128&amp;amp;h=128&amp;amp;q=60&amp;amp;facepad=1.5&quot;&gt;&lt;/ion-avatar&gt;<br>        &lt;/div&gt;<br>        &lt;div id=&quot;swiperslide5&quot; class=&quot;swiper-slide&quot;&gt;<br>            &lt;ion-avatar id=&quot;avatar5&quot; style=&quot;border:2px solid #97cdec;padding:2px&quot;&gt;&lt;img id=&quot;avatar5_img&quot; alt=&quot;&quot; src=&quot;https://images.unsplash.com/photo-1489424731084-a5d8b219a5bb?ixlib=rb-1.2.1&amp;amp;ixid=eyJhcHBfaWQiOjEyMDd9&amp;amp;auto=format&amp;amp;fit=facearea&amp;amp;w=128&amp;amp;h=128&amp;amp;q=60&amp;amp;facepad=1.5&quot;&gt;&lt;/ion-avatar&gt;<br>        &lt;/div&gt;<br>        &lt;div id=&quot;swiperslide6&quot; class=&quot;swiper-slide&quot;&gt;<br>            &lt;ion-avatar id=&quot;avatar6&quot; style=&quot;border:2px solid #97cdec;padding:2px&quot;&gt;&lt;img id=&quot;avatar6_img&quot; alt=&quot;&quot; src=&quot;https://images.unsplash.com/photo-1554151228-14d9def656e4?ixlib=rb-1.2.1&amp;amp;ixid=eyJhcHBfaWQiOjEyMDd9&amp;amp;auto=format&amp;amp;fit=facearea&amp;amp;w=128&amp;amp;h=128&amp;amp;q=60&amp;amp;facepad=1.5&quot;&gt;&lt;/ion-avatar&gt;<br>        &lt;/div&gt;<br>    &lt;/div&gt;<br>&lt;/div&gt;</pre><p>Ohh yes, instead of inline styling, you can use css class names and put the styles there and just pass the class name instead of using the “style” attribute in the HTML. That will also eliminate the duplicated styles everywhere. Gosh, using TailwindCSS methodologies I see. Besides, we all have different coding styles.</p><p>For an Angular Perspective, Simon has written a well documented approach <a href="https://ionicacademy.com/swiper-ionic-7-ion-slides/">here</a>. You might find it very useful.</p><p>As noted above, by seeing from the attached HTML, we have learned how to create a swiper with slides. Each slide has an avatar with a border and padding. The first avatar has an ion-badge, which has an ion-icon. We saw how styles were applied to center the ion-badge ion-icon and make the badge round.</p><p>Happy coding.</p><p>Check me out on <a href="https://github.com/Mashiane">Github</a> and on my <a href="https://www.youtube.com/channel/UC3AZ61zr6I4rLAUmLNa3pRA">YT Channel</a> for more content.</p><p>Check out my other thread about <a href="https://medium.com/@mbanga-anele/sithasoionic7-wireframes-a-step-by-step-guide-to-professional-ionic-7-mobile-apps-designs-e51f571dd4c7">Ionic7 Wireframes</a></p><h3><a href="https://plainenglish.io/">PlainEnglish.io</a> 🚀</h3><p><em>Thank you for being a part of the In Plain English community! Before you go:</em></p><ul><li><em>Be sure to </em><strong><em>clap</em></strong><em> and </em><strong><em>follow</em></strong><em> the writer</em><strong>️</strong></li><li><em>Learn how you can also </em><a href="https://plainenglish.io/blog/how-to-write-for-in-plain-english"><strong><em>write for In Plain English</em></strong></a><em>️</em></li><li><em>Follow us: </em><a href="https://twitter.com/inPlainEngHQ"><strong><em>X</em></strong></a><strong><em> | </em></strong><a href="https://www.linkedin.com/company/inplainenglish/"><strong><em>LinkedIn</em></strong></a><strong><em> | </em></strong><a href="https://www.youtube.com/channel/UCtipWUghju290NWcn8jhyAw"><strong><em>YouTube</em></strong></a><strong><em> | </em></strong><a href="https://discord.gg/in-plain-english-709094664682340443"><strong><em>Discord</em></strong></a><strong><em> | </em></strong><a href="https://newsletter.plainenglish.io/"><strong><em>Newsletter</em></strong></a></li><li><em>Visit our other platforms: </em><a href="https://stackademic.com/"><strong><em>Stackademic</em></strong></a><strong><em> | </em></strong><a href="https://cofeed.app/"><strong><em>CoFeed</em></strong></a><strong><em> | </em></strong><a href="https://venturemagazine.net/"><strong><em>Venture</em></strong></a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f0f92b41621f" width="1" height="1" alt=""><hr><p><a href="https://javascript.plainenglish.io/how-to-create-instagram-stories-in-ionic7-with-swiperjs-the-vanilla-javascript-approach-f0f92b41621f">How to Create “Instagram” Stories in Ionic7 with SwiperJS —The Vanilla JavaScript Approach</a> was originally published in <a href="https://javascript.plainenglish.io/">JavaScript in Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to add a badge to a button in Ionic 7]]></title>
            <link>https://blog.stackademic.com/how-to-add-a-badge-to-a-button-in-ionic-7-621d17bee3da?source=rss-211b73c62681------2</link>
            <guid isPermaLink="false">https://medium.com/p/621d17bee3da</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[ionic-framework]]></category>
            <category><![CDATA[ionic-app-development]]></category>
            <category><![CDATA[javascript-tips]]></category>
            <category><![CDATA[ionic]]></category>
            <dc:creator><![CDATA[Anele Mbanga]]></dc:creator>
            <pubDate>Sat, 06 Jan 2024 22:16:46 GMT</pubDate>
            <atom:updated>2024-01-16T01:58:52.774Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IF-qoXEi3ROuiytDj83zqA.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@jtzanno?utm_content=creditCopyText&amp;utm_medium=referral&amp;utm_source=unsplash">Joao Tzanno</a> on <a href="https://unsplash.com/photos/assorted-logo-lot-G9_Euqxpu4k?utm_content=creditCopyText&amp;utm_medium=referral&amp;utm_source=unsplash">Unsplash</a></figcaption></figure><blockquote>Let’s add a badge to a button, and place it on the top right corner of the button in Ionic 7.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/182/1*LB7sDz1jiVAsLQryRpmq9w.png" /><figcaption>Figure 1: Button with Badge</figcaption></figure><p>I wanted to add a badge to a button on either side, whether top left, top right, bottom left or bottom right. This is how I did it.</p><p>With some tweaking and enabling <strong>overflow:visible</strong> style on the (native) button, I was able to see the badge.</p><p>I have defined my button-badge HTML code like this, with some inline styling.</p><pre><br>&lt;ion-button id=&quot;button1&quot; mode=&quot;ios&quot; style=&quot;position: relative;&quot;&gt;<br>    &lt;span id=&quot;button1_text&quot;&gt;Button&lt;/span&gt;<br>    &lt;ion-icon id=&quot;button1_icon&quot; slot=&quot;start&quot; name=&quot;logo-ionic&quot;&gt;&lt;/ion-icon&gt;<br>    &lt;ion-badge id=&quot;button1_badge&quot; mode=&quot;ios&quot; <br>style=&quot;aspect-ratio:1/1;border-radius:100%;display:flex;align-items:center;justify-content:center;background-color:#AF08F5;font-size:0.8em;height:30px;width:30px;right:-30px;position:absolute;top:-30px&quot;&gt;<br>20&lt;/ion-badge&gt;<br>&lt;/ion-button&gt;</pre><p>With Ionic, due to the button using “shadow”-ing, applying overflow:visible style directly on the button itself won’t work. Part of the badge will be shown and the rest cut off. To fix this proble, the overflow style needs to be applied to the native button internal to ion-button.</p><p>As per documentation for the <a href="https://ionicframework.com/docs/api/button">ion-button</a>, the shadow part for the button is called “native”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/869/1*Y1kjhnRYIDFdF5e-JYRP1A.png" /><figcaption>Figure 2. Button Native Part</figcaption></figure><p>So to apply the overflow:visible, so that the badge shows properly, we add this css rule.</p><pre>#button1::part(native) {overflow:visible}</pre><p>There you have it. Happy coding.</p><p>Check me out on <a href="https://github.com/Mashiane">Github</a> and on my <a href="https://www.youtube.com/channel/UC3AZ61zr6I4rLAUmLNa3pRA">YT Channel</a> for more content.</p><p>Check out my other thread about <a href="https://medium.com/@mbanga-anele/sithasoionic7-wireframes-a-step-by-step-guide-to-professional-ionic-7-mobile-apps-designs-e51f571dd4c7">Ionic7 Wireframes</a>.</p><h3>Stackademic</h3><p>Thank you for reading until the end. Before you go:</p><ul><li>Please consider <strong>clapping</strong> and <strong>following</strong> the writer! 👏</li><li>Follow us <a href="https://twitter.com/stackademichq">X</a> | <a href="https://www.linkedin.com/company/stackademic"><strong>LinkedIn</strong></a><strong> |</strong> <a href="https://www.youtube.com/c/stackademic"><strong>YouTube</strong></a><strong> | </strong><a href="https://discord.gg/in-plain-english-709094664682340443"><strong>Discord</strong></a></li><li>Visit our other platforms: <a href="https://plainenglish.io/"><strong>In Plain English</strong></a><strong> | </strong><a href="https://cofeed.app/"><strong>CoFeed</strong></a><strong> | </strong><a href="https://venturemagazine.net/"><strong>Venture</strong></a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=621d17bee3da" width="1" height="1" alt=""><hr><p><a href="https://blog.stackademic.com/how-to-add-a-badge-to-a-button-in-ionic-7-621d17bee3da">How to add a badge to a button in Ionic 7</a> was originally published in <a href="https://blog.stackademic.com/">Stackademic</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[SithasoIONIC7 Wireframes: A Step-by-Step Guide to Professional Ionic 7 Mobile Apps Designs]]></title>
            <link>https://mbanga-anele.medium.com/sithasoionic7-wireframes-a-step-by-step-guide-to-professional-ionic-7-mobile-apps-designs-e51f571dd4c7?source=rss-211b73c62681------2</link>
            <guid isPermaLink="false">https://medium.com/p/e51f571dd4c7</guid>
            <category><![CDATA[ionic-tutorial]]></category>
            <category><![CDATA[mobile-app-development]]></category>
            <category><![CDATA[rapid-prototyping]]></category>
            <category><![CDATA[ionic-for-beginners]]></category>
            <category><![CDATA[mobile-app-wireframes]]></category>
            <dc:creator><![CDATA[Anele Mbanga]]></dc:creator>
            <pubDate>Mon, 27 Nov 2023 10:35:51 GMT</pubDate>
            <atom:updated>2023-11-27T10:35:51.145Z</atom:updated>
            <content:encoded><![CDATA[<p>Some time ago I spoke about <a href="https://medium.com/javascript-in-plain-english/unboxing-sithasoionic7-wireframes-app-the-ion-component-c07db0701a46">Unboxing SithasoIONIC7 Wireframes</a>, a Web App that I have been working on that runs inside <a href="https://pocketbase.io/">PocketBase</a> to create wireframes / mock ups for <a href="https://ionicframework.com/">Ionic</a>7 mobile apps.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NB9ENNggoX72JM97WYeKSA.png" /><figcaption>Figure 1: SithasoIONIC7 Wireframes</figcaption></figure><p>The SithasoIONIC7 Wireframes WebApp is free to use and you can download it <a href="https://drive.google.com/file/d/10l2zqJVs5_CLB_5omanVom8TJW28od_4/view?usp=drive_link">here</a>. After you download it, unzip the file and double click the file named <strong>run_server_9090.bat</strong>. You will also need to ensure that port 9090 is not firewall blocked.</p><p>This will start PocketBase and then open your default web browser. If all goes well, you will see the Figure 1 depicted above in your browser.</p><p>Figure 1 above shows a reproduction of the ion-tabs example from the ionic documentation <a href="https://ionicframework.com/docs/api/tabs">here</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/510/1*5L4o3O7m8S0X5tJDE0Z5NA.png" /><figcaption>Figure 2: ion-tabs (Source: Ionic Documentation)</figcaption></figure><p>The wireframes webapp is being built to help anyone who wants to build their Ionic wireframes. One can be a beginner who is learning Ionic. The app itself is built using vanilla javascript, using the best of ionic framework components.</p><p>One can also download their wireframes as images for later use and also is able to get a custom view guide for using SithasoIONIC, a b4x library to develop Ionic mobile apps using the b4x rapid application development framework. The b4x rapid application development framework allows anyone to develop Android, iOS, Arduo, Desktop Apps (Java) using a simple programming language called b4x, which is similar to visual basic and very powerful. All the code you write is transpiled to native code i.e. java, xcode and or javascript depending on what you are doing.</p><p>Due to this WebApp evolving, we have now included a guiding document for starters. This can be used with the Abstract Designer and is also applicable to use on the SithasoIONIC7 Wireframes app.</p><p><strong>Instructions </strong>in the document are as simple as…</p><p><strong>1. maincontent</strong></p><p>The <strong>maincontent</strong> (ion-content) element will host your whole application. It will contain the ion-menu and ion-page (div with ion-page) class. This component is not visible to the eye.</p><p>1. In the B4J IDE, click the ‘Designer’ menu option.</p><p>2. Click ‘Open Internal Designer.</p><p>3. Close the ‘Form (WYSIWYG Designer)’ if its open.</p><p>4. Right click on the layout and click ‘Add View’.</p><p>5. Select ‘Custom View’. This is the menu item that you will use to add the components defined below. Clicking an item will place the component in the layout.</p><p>6. When adding components to the layout designer, you might need to resize them to fit or shrink. Usually the first item should be enlarged to fit the area where more components will be added.</p><p>7. Now, let’s start adding the components to the layout. To add each component, you will use ‘Add View’ &gt; ‘Custom View’ and then select the component from the menu.</p><p>8. NB: It’s not compulsory to specify the ‘ParentID’ property. It has been added for very specific few cases.</p><p>********** 1 **********</p><p>Right click ‘Add View’, then ‘Custom View’, then click ‘SHIonContent’.</p><p>Change the following properties for the ‘SHIonContent.maincontent’ component.</p><p>Name -&gt; maincontent</p><p>Ion Page -&gt; false</p><p>Please note that the instructions above might not make a lot of sense as yet, however, if you have read my article about using the b4x Abstract Designer, you might be on familiar ground. You can however quicky dive into this old article: <a href="https://mbanga-anele.medium.com/introduction-develop-cross-platform-apps-using-b4x-cf335a751d0d">Introduction: Develop Cross Platform Apps using B4X</a> for reference.</p><p>There are 2 videos that I have completed to take you through how to start creating your wireframes for Ionic.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FRFRdyGjXwRU%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DRFRdyGjXwRU&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FRFRdyGjXwRU%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="640" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/69baa3bec81ebfb2e8a60e23a002a5de/href">https://medium.com/media/69baa3bec81ebfb2e8a60e23a002a5de/href</a></iframe><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FX6FaZSgRFj4%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DX6FaZSgRFj4&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FX6FaZSgRFj4%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="640" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/683b8adf4560ce2e3242a02bf85b6e32/href">https://medium.com/media/683b8adf4560ce2e3242a02bf85b6e32/href</a></iframe><p>Thank you so much for taking time to read the article. If you are using Ionic Framework, please give the tool a try and send me your feedback. I appreciate any kind of feedback that’s helpful.</p><p>Check me out on <a href="https://github.com/Mashiane">Github</a> and on my <a href="https://www.youtube.com/channel/UC3AZ61zr6I4rLAUmLNa3pRA">YT Channel</a> for more content.</p><p>Happy Ionic coding!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e51f571dd4c7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Unboxing SithasoIonic7 Wireframes App— The ion-component]]></title>
            <link>https://javascript.plainenglish.io/unboxing-sithasoionic7-wireframes-app-the-ion-component-c07db0701a46?source=rss-211b73c62681------2</link>
            <guid isPermaLink="false">https://medium.com/p/c07db0701a46</guid>
            <category><![CDATA[wireframe]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[ionic-framework]]></category>
            <category><![CDATA[prototyping]]></category>
            <category><![CDATA[ionic]]></category>
            <dc:creator><![CDATA[Anele Mbanga]]></dc:creator>
            <pubDate>Thu, 09 Nov 2023 14:16:43 GMT</pubDate>
            <atom:updated>2023-11-09T14:16:43.054Z</atom:updated>
            <content:encoded><![CDATA[<p>Good day. We want to demonstrate how our bespoke wireframe application works. This app has been built with the <a href="https://ionicframework.com/">Ionic Framework</a>, using Vanilla Javascript. We will recreate demos from the <a href="https://ionicframework.com/docs/api/content">Ionic Documentation</a>. We will start with the <strong>ion-content </strong>component and built it with the demo using our wireframe application.</p><p>The content component provides an easy to use content area with some useful methods to control the scrollable area. There should only be one content in a single view.</p><p>You can check this reel out about what we are trying to do here.</p><p><a href="https://youtu.be/opY5GmO6GQ0">https://youtu.be/opY5GmO6GQ0</a></p><p>Here we go, we want to create this UI using our wireframe app.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/641/1*TZFuKUFH8-W0S27Ifcogrw.png" /><figcaption>Figure 1: ion-content from Ionic Framework website</figcaption></figure><p>Our application has been built from the ground up using Ionic 7 framework and is powered by <a href="https://www.b4x.com/">b4x</a>, which later <a href="https://medium.com/@mbanga-anele/we-all-use-transpilers-and-mine-is-e5b9598cf08d">transpiles</a> it to javascript.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iKsITyUiaKFmBU07J9m0gg.png" /><figcaption>Figure 2: SithasoIonic7 Wireframes App</figcaption></figure><p>The application is split into 3 sections, these are navigation on the left, view area in the middle and on the right, the properties area.</p><p>Lets create the ion-content component, we go to pages and then select content. This will activate the properties of the component for us to change them.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/524/1*hZhaag-ANBTFFFqcJt2oiQ.png" /><figcaption>Figure 3: Navigation &gt; Pages &gt; Content</figcaption></figure><p>In the properties section, we can update the ion-content name, color and other settings.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/455/1*lewVQsbka5GtfxlbWZZLxQ.png" /><figcaption>Figure 4: ion-content properties / settings</figcaption></figure><p>As this is the first component on the layout, we will set the Parent Component to — none — . We want this to be displayed on the device preview, so we also check that.</p><p>We can also change the color of the component, by choosing a color from the provided list.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/405/1*Ht8QR0zJCI5hDo7QEz2l3g.png" /><figcaption>Figure 5: Changing the color property.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/405/1*EScm9FdFEYZLq89qCwDfpQ.png" /><figcaption>Figure 6: Color set to “success”</figcaption></figure><p>We want this component to have ion-padding and ion-page classes added to it, so we check these properties on the settings bag.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/607/1*suCYaNwf1SwEeAWEVuQ2sA.png" /><figcaption>Figure 7: ion-padding &amp; ion-page classes</figcaption></figure><p>The toolbar, provides a way to save, clone and delete any component we have added. After updating the settings, we save the component.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/636/1*nDR9X1z9n-lIB4sjK2YMPA.png" /><figcaption>Figure 8: Saving the component</figcaption></figure><p>We have finished with the ion-content, let’s now add the headings and paragraphs. To do that we go to Typography and choose the heading we want. We ensure that the parent component is the ion-content component we created before, and then change the text to be heading 1.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/648/1*gNJ-mN7QUglKgqwOcKpDbw.png" /><figcaption>Figure 9: Heading 1</figcaption></figure><p>We will then continue adding the rest of the headings like this one. All the components created will be added to the device preview so that we can see how our wireframe looks like. I will change the device to see how the currently added components will look like on another device, an ipad-mini.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/528/1*vE2pxZvvTQ25zgD9XrhpKw.png" /><figcaption>Figure 10: Wireframe in another device</figcaption></figure><p>For our last component, the paragraph, we set Lorem Ipsum and Wrap Content to true. We want out paragraph text to be a lorem ipsum text and it should be wrapped.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/573/1*zdPfWccwZeMMx3nmR7fhWQ.png" /><figcaption>Figure 11: Settings for paragraph.</figcaption></figure><p>For <strong>child </strong>components, the <strong>Parent Device</strong> property should always be <strong>false </strong>and only true for the main parent component. We save our component and then refresh our wireframe.</p><p>To view the wireframe on different devices, we go to Devices and choose the device we want.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/527/1*p3qvXB7dX9ntwV3eVJlQPQ.png" /><figcaption>Figure 12: Devices</figcaption></figure><p>Thank you for reaching the end of this article. Appreciated.</p><p>You can…</p><p>Read, <a href="https://medium.com/javascript-in-plain-english/how-to-create-ionic-7-apps-in-vanilla-javascript-with-no-frameworks-f734d35b4916">How to Create Ionic 7 Apps in Vanilla JavaScript with No Frameworks.</a></p><p>Reach me on <a href="https://github.com/Mashiane">GitHub</a></p><p>Check out <a href="https://www.b4x.com/android/forum/threads/web-sithasoionic7-ionic7-framework-powered-by-b4x-and-banano.149902/">SithasoIONIC7 </a>on the b4x forum</p><h3>In Plain English</h3><p><em>Thank you for being a part of our community! Before you go:</em></p><ul><li><em>Be sure to </em><strong><em>clap</em></strong><em> and </em><strong><em>follow</em></strong><em> the writer! 👏</em></li><li><em>You can find even more content at </em><a href="https://plainenglish.io/"><strong><em>PlainEnglish.io</em></strong></a><strong><em> 🚀</em></strong></li><li><em>Sign up for our </em><a href="http://newsletter.plainenglish.io/"><strong><em>free weekly newsletter</em></strong></a><em>. 🗞️</em></li><li><em>Follow us: </em><a href="https://twitter.com/inPlainEngHQ"><strong><em>Twitter</em></strong></a><strong><em>(X</em></strong>), <a href="https://www.linkedin.com/company/inplainenglish/"><strong><em>LinkedIn</em></strong></a>, <a href="https://www.youtube.com/channel/UCtipWUghju290NWcn8jhyAw"><strong><em>YouTube</em></strong></a>, <a href="https://discord.gg/in-plain-english-709094664682340443"><strong><em>Discord</em></strong></a><strong><em>.</em></strong></li><li><em>Check out our other platforms: </em><a href="https://stackademic.com/"><strong><em>Stackademic</em></strong></a>, <a href="https://cofeed.app/"><strong><em>CoFeed</em></strong></a>, <a href="https://venturemagazine.net/"><strong><em>Venture</em></strong></a>.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c07db0701a46" width="1" height="1" alt=""><hr><p><a href="https://javascript.plainenglish.io/unboxing-sithasoionic7-wireframes-app-the-ion-component-c07db0701a46">Unboxing SithasoIonic7 Wireframes App— The ion-component</a> was originally published in <a href="https://javascript.plainenglish.io/">JavaScript in Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Create Ionic 7 Apps in Vanilla JavaScript with No Frameworks.]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://javascript.plainenglish.io/how-to-create-ionic-7-apps-in-vanilla-javascript-with-no-frameworks-f734d35b4916?source=rss-211b73c62681------2"><img src="https://cdn-images-1.medium.com/max/811/1*cpVvTQnozopPacbPfgGBKQ.jpeg" width="811"></a></p><p class="medium-feed-snippet">No Angular, no Vue, no React, and no TypeScript&#x200A;&#x2014;&#x200A;Header</p><p class="medium-feed-link"><a href="https://javascript.plainenglish.io/how-to-create-ionic-7-apps-in-vanilla-javascript-with-no-frameworks-f734d35b4916?source=rss-211b73c62681------2">Continue reading on JavaScript in Plain English »</a></p></div>]]></description>
            <link>https://javascript.plainenglish.io/how-to-create-ionic-7-apps-in-vanilla-javascript-with-no-frameworks-f734d35b4916?source=rss-211b73c62681------2</link>
            <guid isPermaLink="false">https://medium.com/p/f734d35b4916</guid>
            <category><![CDATA[b4x]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[ionic-framework]]></category>
            <category><![CDATA[ionic]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Anele Mbanga]]></dc:creator>
            <pubDate>Mon, 25 Sep 2023 08:17:31 GMT</pubDate>
            <atom:updated>2023-09-25T08:17:31.549Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Let’s create a full-stack Mini CRM WebApp with TailwindCSS CSS and MySQL — Part 1]]></title>
            <link>https://javascript.plainenglish.io/lets-create-a-full-stack-mini-crm-webapp-with-tailwindcss-css-and-mysql-part-1-944c254a6c26?source=rss-211b73c62681------2</link>
            <guid isPermaLink="false">https://medium.com/p/944c254a6c26</guid>
            <category><![CDATA[single-page-applications]]></category>
            <category><![CDATA[b4x]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[tailwind-css]]></category>
            <category><![CDATA[full-stack]]></category>
            <dc:creator><![CDATA[Anele Mbanga]]></dc:creator>
            <pubDate>Tue, 01 Aug 2023 06:16:31 GMT</pubDate>
            <atom:updated>2023-08-01T06:16:31.433Z</atom:updated>
            <content:encoded><![CDATA[<h3>Create a Full-Stack Mini CRM WebApp with TailwindCSS, CSS and MySQL</h3><h4>Part 1</h4><p>The purpose of our CRM app is simple, as demonstrated in the dashboard below. This includes the following:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bKYKsNTYC9i7Dfpm-V0m4w.jpeg" /><figcaption>Figure 1: Dashboard</figcaption></figure><ol><li>Customer Details: name, email addresses, telephone numbers, etc</li><li>Reminders: things to be reminded about pertaining to customers</li><li>Communication: communication done with customers</li><li>Emails: emails sent to customers. We use <a href="https://www.emailjs.com/">EmailJS</a> for sending the emails using fetch</li><li>Appointments: meetings held or to be held with customers</li><li>Tasks: tasks done or to be done</li><li>Documents: documents can be uploaded and shared</li><li>Email Templates: templates used to generate emails sent to customers</li></ol><p>Personally, I am using the same application, which I conceptualized and created, and my version uses a <a href="https://pocketbase.io/">PocketBase</a> back-end and Web Server.</p><p>To develop this WebApp, we will follow the same approach we used when we created the <a href="https://medium.com/javascript-in-plain-english/lets-create-a-vehicle-expense-tracking-app-with-a-sqlite-web-server-and-tailwind-css-9f77a9460e96">Vehicle Expense Tracking WebApp</a>.</p><p>Before we delve deeper into this topic, perhaps let&#39;s look at the toolset we are using on this reel titled: <strong>Installing SithasoDaisy and creating you first TailwindCSS &amp; DaisyUI WebApp using b4x</strong></p><p><a href="https://youtu.be/LOMSJ_lkg0Y">https://youtu.be/LOMSJ_lkg0Y</a></p><p>Now, let’s take a look at the various sections of the WebApp. We will start with the Side Drawer so that you can see the basic building blocks of our application. These are the (a) abstract/visual designer and (b) b4x code. Both are later <a href="https://medium.com/@mbanga-anele/we-all-use-transpilers-and-mine-is-e5b9598cf08d">transpiled</a> to JavaScript, HTML, and CSS. These will help us create the amazing CRM WebApp we want.</p><p><strong>Side Drawer</strong></p><p>The side drawer is meant for one to access modules of the app from any screen.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/866/1*lQL6vbZWs2m-BBENaRPAcg.png" /><figcaption>Figure 2: Side Drawer</figcaption></figure><p>As seen in Figure 3, we have a base layout that has a navigation bar and a side drawer. When we navigate to other pages, the “view” or &lt;main&gt; component within the body of the page is used. To create this view, we have used an abstract designer and dragged and dropped the components we need.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ti_59atTf1st7UytCvo4LA.png" /><figcaption>Figure 3: Base Layout</figcaption></figure><p>Each component that we put in the Abstract Designer is then updated using a property bag, as demonstrated in Figure 4 below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dQDuV2FFm20TlBIJhNWnfA.png" /><figcaption>Figure 4: Side Drawer Property Bag</figcaption></figure><p>The name of the side drawer is <strong>appdrawer,</strong> and is the unique id that identifies it. It will be placed inside the <strong>body</strong> element of our HTML page.</p><p>In Figure 5 below, we have run ‘inspect element’ from our web browser when our app is running to see the placement of the drawer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/972/1*ZFHPx9qxOQ2JzkfkcFmnEQ.png" /><figcaption>Figure 5: Inspecting the Side Drawer from the browser</figcaption></figure><p>The code to build the Side Drawer menu items is rather easy to follow, as seen in Figure 6. It is written in a coding language called <a href="https://medium.com/@mbanga-anele/visual-basic-is-dead-long-live-b4x-61200b8ea0e7">B4x</a>. Yes, some internal code runs when we add each page link to the drawer, like getting the page name, icon and then establishing how to show the page when its selected. The end result of this code is what one sees in Figure 7.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/965/1*s5yaJLOOh24tuyOmQ2KFHw.png" /><figcaption>Figure 6: Side Drawer Code to add menu items</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/967/1*hX6xfwSOfOePXKoCkC6tVA.png" /><figcaption>Figure 7: Side Drawer Menu</figcaption></figure><p>Above, we introduced you to the basic building blocks of our application. We have used the b4x abstract designer, written b4x code, and seen the end result of our code on the browser element inspection.</p><p>When building the rest of the application, we will follow the same approach to build these screens with CRUD functionality.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Cluhvhb0cnvOpAHdycn2qw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*soikwaDNznrjqP8CyteEZw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zkK3tSGCeNLQ4mT6lIVLYA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UsQ859p3xnwNIl_moIvvzQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pHfZCrNFPh-w2r2Xmp6cAg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*U-T2sPlYbX1mVHuxeUkEiw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3rAXihirJHhP6Zxx1MxP_w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KCQhrDBQRA0UTNRXcYZaxQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8bwl28D7VG1VJ75rqJBjWQ.png" /></figure><p>In Part 2, we will look at a step-by-step process of how we can easily create this beautiful TailwindCSS WebApp using the <a href="https://v2.daisyui.com/">DaisyUI</a> component framework.</p><p>We will also look at how to create these awesome product tours.</p><p><a href="https://youtu.be/5UIYYntO4As">https://youtu.be/5UIYYntO4As</a></p><p><strong>Related Content</strong></p><p><a href="https://medium.com/@mbanga-anele/introduction-develop-cross-platform-apps-using-b4x-cf335a751d0d">Introduction: Develop Cross Platform Apps using B4X</a></p><p><a href="https://medium.com/@mbanga-anele/tailwindcss-webapps-using-b4x-91e3ffe4a48c">TailwindCSS WebApps using b4x</a></p><p><a href="https://medium.com/javascript-in-plain-english/lets-create-a-vehicle-expense-tracking-app-with-a-sqlite-web-server-and-tailwind-css-9f77a9460e96">Let’s Create a Vehicle Expense Tracking App with a SQLite Web Server and Tailwind CSS</a></p><p><a href="https://medium.com/@mbanga-anele/cloning-the-expense-tracker-to-tailwindcss-daisyui-pocketbase-chartjs-f014d42b21cc">Cloning the Expense Tracker to TailwindCSS, DaisyUI, PocketBase &amp; ChartJS</a></p><p><a href="https://medium.com/@mbanga-anele/running-a-web-scraper-on-my-tailwindcss-website-dd0fd386d77b">Running a web-scraper on my TailwindCSS Website</a></p><p><a href="https://medium.com/@mbanga-anele/using-pocketbase-firebase-alternative-for-your-webapps-d19b5927a3bc">Using PocketBase (Firebase Alternative) for your WebApps.</a></p><p>You can catch me on <a href="https://github.com/Mashiane/SithasoDaisyUI">Github</a> and <a href="https://www.youtube.com/channel/UC3AZ61zr6I4rLAUmLNa3pRA">YouTube</a>.</p><p><em>More content at </em><a href="https://plainenglish.io/"><strong><em>PlainEnglish.io</em></strong></a><em>.</em></p><p><em>Sign up for our </em><a href="http://newsletter.plainenglish.io/"><strong><em>free weekly newsletter</em></strong></a><em>. Follow us on </em><a href="https://twitter.com/inPlainEngHQ"><strong><em>Twitter</em></strong></a>, <a href="https://www.linkedin.com/company/inplainenglish/"><strong><em>LinkedIn</em></strong></a><em>, </em><a href="https://www.youtube.com/channel/UCtipWUghju290NWcn8jhyAw"><strong><em>YouTube</em></strong></a><em>, and </em><a href="https://discord.gg/GtDtUAvyhW"><strong><em>Discord</em></strong></a><strong><em>.</em></strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=944c254a6c26" width="1" height="1" alt=""><hr><p><a href="https://javascript.plainenglish.io/lets-create-a-full-stack-mini-crm-webapp-with-tailwindcss-css-and-mysql-part-1-944c254a6c26">Let’s create a full-stack Mini CRM WebApp with TailwindCSS CSS and MySQL — Part 1</a> was originally published in <a href="https://javascript.plainenglish.io/">JavaScript in Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Let’s Create a Vehicle Expense Tracking App with a SQLite Web Server and Tailwind CSS]]></title>
            <link>https://javascript.plainenglish.io/lets-create-a-vehicle-expense-tracking-app-with-a-sqlite-web-server-and-tailwind-css-9f77a9460e96?source=rss-211b73c62681------2</link>
            <guid isPermaLink="false">https://medium.com/p/9f77a9460e96</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[tailwind-css]]></category>
            <category><![CDATA[pocketbase]]></category>
            <category><![CDATA[b4x]]></category>
            <dc:creator><![CDATA[Anele Mbanga]]></dc:creator>
            <pubDate>Thu, 11 May 2023 11:17:18 GMT</pubDate>
            <atom:updated>2023-07-30T09:10:39.807Z</atom:updated>
            <content:encoded><![CDATA[<p>See <a href="https://vehicleexpensetracking.netlify.app/">Netlify Demo hosted on PocketHost</a></p><p>A vehicle expense tracker app typically keeps track of expenses for your vehicles. This could be expenses like an oil change, repairs, tires, toll fees, fuel, etc. It can also keep track of meter readings for your vehicles.</p><p>A vehicle has a make, a model, and a type. It has a particular number of seats. A make can be a Toyota, a Honda, or a Mercedes, for example. The model could be the Camry (Toyota), the Ballade (Honda), or the C-Class (Mercedes).</p><p>We will keep a record of these makes, models, and vehicle types. These will be used to create our vehicle lists.</p><p>Let us watch the Demo of this WebApp in action.</p><p><a href="https://youtu.be/3kwF89O6sx8">https://youtu.be/3kwF89O6sx8</a></p><p><strong>Our IDE</strong></p><p>Before we delve deeper into this topic, perhaps lets look at the toolset we are using on this reel titled: <strong>Installing SithasoDaisy and creating you first TailwindCSS &amp; DaisyUI WebApp using b4x</strong></p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FLOMSJ_lkg0Y%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DLOMSJ_lkg0Y&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FLOMSJ_lkg0Y%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="640" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/908e3ed582146d168f79d52c8f0747c7/href">https://medium.com/media/908e3ed582146d168f79d52c8f0747c7/href</a></iframe><p>And then we can look at the app developing process.</p><p><strong>Vehicles</strong></p><p>Each vehicle on our list will have a picture. Figure 1 below depicts a typical form to capture the details of each vehicle.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/911/1*YoKyGMmlTJrAkTnJehiQBQ.png" /><figcaption>Figure 1: Vehicle Form</figcaption></figure><p><strong>Expenses</strong></p><p>To capture expenses, we will need the expense types. The expense types can be oil change, repairs, tires, toll fees, etc. These expense types help us classify our expenses and can be used to draw a chart of our expenses over time. Figure 2 depicts a form to capture vehicle expenses.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/906/1*uVIx9G0PAdZ8uOzNfq3oog.png" /><figcaption>Figure 2: Vehicle Expense Form</figcaption></figure><p><strong>Fuel Logs</strong></p><p>We want to record the quantity of fuel we are purchasing for each of our vehicles. To do this, we will create a form to capture our fuel purchases. We depict our fuel logs form below in Figure 3.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/902/1*yVanE7X1WgonqjWEZCAbFQ.png" /><figcaption>Figure 3: Fuel Logs Form</figcaption></figure><p><strong>Reminders</strong></p><p>We want to be reminded of milestones in our vehicles&#39; lives. This could be taking a vehicle for service, fluid checks, tire checks, etc. To do this, we will create a form like the one depicted in Figure 4.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/902/1*RynUD6O4JCYmWVtIuWX0Vg.png" /><figcaption>Figure 4: Reminders Form</figcaption></figure><p><strong>Meter Readings</strong></p><p>We can log the kilometers traveled per day for each vehicle too. The form will have a vehicle, a date, and start and end kilometers, as depicted in Figure 5 below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/903/1*0kPU0fCg6SyRumS-uh5Cpg.png" /><figcaption>Figure 5: Meter Reading Form</figcaption></figure><p><strong>Lists</strong></p><p>To ensure data integrity for our app, we will create lists. These lists will have details for our car models, car makes, car types, and expense types.</p><p>On each list, there will be a unique identifier and the name of each item. The identifiers will be hidden in our forms, and only the name will be required.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/905/1*UzpEBLTy6AVQmMbn9uuBNA.png" /><figcaption>Figure 6: Car Makes</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*a2Wd2X5jPxBGyqansExymw.png" /><figcaption>Figure 7: Car Models</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/901/1*iS-IAWTvEHYEcCIQRziobA.png" /><figcaption>Figure 8: Car Types</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/896/1*hrqq0vbMcB3zFGRi6_mVTw.png" /><figcaption>Figure 9: Expense Types</figcaption></figure><p><strong>SQLite WebServer—Backend</strong></p><p>The backend for our app, which we will use to store our records for our vehicle tracking app, will be a SQLite database. It is called <a href="https://pocketbase.io/">PocketBase</a>.</p><p>PocketBase is an open source backend consisting of an embedded database (SQLite) with real-time subscriptions, built-in auth management, a convenient dashboard UI, and a simple REST-ish API.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aA1IYAsUZZv-FrL2QdMgzw.png" /><figcaption>Figure 10: Pocketbase UI</figcaption></figure><p><strong>TailwindCSS — Frontend</strong></p><p>Our front end is being developed using a Tailwind CSS-based component framework called <a href="https://daisyui.com/">DaisyUI</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-xSGvmRSigDZQDLErsfikA.png" /><figcaption>Figure 11: DaisyUI Components</figcaption></figure><p><strong>Development Tools</strong></p><p>To develop our application, we will use an IDE called <a href="https://www.b4x.com/">B4J</a>. This IDE looks like this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ii0BjCHQZz1fdLOs.jpeg" /><figcaption>Figure 12: B4J IDE</figcaption></figure><p><strong>Designing the UI</strong></p><blockquote><em>I will use an existing project to explain how this will work.</em></blockquote><p>We will use a B4J abstract designer. We drag and drop components that later become our user interface. Each component can have events linked to it, for example, a click event for a button or a change event for a select component.</p><p>Our pages for each of the forms discussed above will have a table to list existing records and then a modal to capture the details.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2ijBN1Lp3c0tRLSuBrX3CQ.png" /><figcaption>Figure 13: B4J Abstract Designer Layout</figcaption></figure><p>The component “<strong>tblprojects</strong>” above becomes the table depicted in Figure 14 below when our web application executes. The table has <em>edit </em>and <em>delete </em>buttons in each row.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YBwwJlvoD6Jtlc_cjS7QmA.png" /><figcaption>Figure 14: Projects User Interface.</figcaption></figure><p><strong>Property Bag Forms</strong></p><p>The forms in the application are built using a property bag dialog approach. In Figure 13, the property bag component is “<strong>pbprojects</strong>”.</p><p>The various components are defined in a JSON file schema. Each component is defined like this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/890/1*w4icUVRKo-N0agAnUpJ9Yg.png" /><figcaption>Figure 14.1 : Email Input Component JSON Definition</figcaption></figure><p>This component builds the “Email” input component depicted in Figure 15.</p><p>I will explain how a typical process of adding, updating, and deleting records works below.</p><p><strong>Adding Records</strong></p><p>Above the table, we have an &quot;add&quot; button. Clicking this button will activate a dialog modal for data entry, as depicted in Figure 15 below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*fVQ780pkVlyCQbIix8hhNw.png" /><figcaption>Figure 15: Adding records</figcaption></figure><p>The modal above to add the records is activated by the code below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/769/1*ytjUnxy1wRVbmF8RRXh2YQ.png" /><figcaption>Figure 16: Add Source Code</figcaption></figure><p><strong>Updating Records</strong></p><p>When an edit button is clicked in each row on the table, the “<strong>tblprojects_edit</strong>” code is executed. This receives a row object of key-value pairs of column names and values for each record.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/948/1*mfInG9lLL8JXw6BAO92S4w.png" /><figcaption>Figure 17: Edit Source Code</figcaption></figure><p>This code also shows a modal dialog where our record is shown for updating. One can click &quot;Save&quot; or &quot;Cancel.&quot; Saving will update our backend with whatever changes have been made.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/917/1*xdDYfPrP1EGhXQM0S_fl0g.png" /><figcaption>Figure 18: Edit Modal Dialog</figcaption></figure><p><strong>Saving Records</strong></p><p>When one adds or edits an existing record, one is able to add it to the database by saving it. This validates the content entered when there is required content and then adds a new record or updates an existing record.</p><p>All saved records will then be listed in the table, as depicted in Figure 14.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*L8SvTbCsfLmyzR_rRcJk2A.png" /><figcaption>Figure 19: Save Source Code</figcaption></figure><p><strong>Deleting Records</strong></p><p>When one wants to delete a record from the database, one will click the delete button on the table corresponding to the record to be deleted. This activates a confirmation dialog.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/608/1*An1pCqEgaFFmeOSnSP-ipw.png" /><figcaption>Figure 20: Delete Conf<em>i</em>rm Dialog</figcaption></figure><p>This dialog is activated by this code. It receives the row to be processed and saves it for later processing.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*07jXS9yA8JRP3ewjbhbFtA.png" /><figcaption>Figure 21: Delete Confirm Source Code</figcaption></figure><p>The second part of this code is the actual code that then deletes the record in the database when “Yes” is clicked by the user.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*z0lLLWkNvVhTEroTFdAC0Q.png" /><figcaption>Figure 22: Delete Source Code</figcaption></figure><p>This code gets the record identifier and uses that to delete the record from the database.</p><p><strong>Summary</strong></p><p>In closing, we have summarized what each of the forms in our Vehicle Expense Tracking App will look like. We indicated which backend we will use, the IDE we will use, and how the source code to knit the application will work.</p><p>We also explained the various lists that will help with the data integrity of the application.</p><p>You can find more articles about this approach here.</p><p><a href="https://mbanga-anele.medium.com/introduction-develop-cross-platform-apps-using-b4x-cf335a751d0d">Introduction: Develop Cross Platform Apps using B4X</a></p><p><a href="https://medium.com/@mbanga-anele/tailwindcss-webapps-using-b4x-91e3ffe4a48c">TailwindCSS WebApps using b4x</a></p><p><a href="https://mbanga-anele.medium.com/using-pocketbase-firebase-alternative-for-your-webapps-d19b5927a3bc">Using PocketBase (Firebase Alternative) for your WebApps</a></p><p><a href="https://medium.com/@mbanga-anele/cloning-the-expense-tracker-to-tailwindcss-daisyui-pocketbase-chartjs-f014d42b21cc">Cloning the Expense Tracker to TailwindCSS, DaisyUI, PocketBase &amp; ChartJS</a></p><p><a href="https://medium.com/javascript-in-plain-english/how-to-sync-individual-pocketbase-collection-schemas-and-data-d7db1647d730">How to Sync Individual PocketBase Collection Schemas and Data</a></p><p>You can catch me on <a href="https://github.com/Mashiane/SithasoDaisyUI">Github</a>.</p><p><em>More content at </em><a href="https://plainenglish.io/"><strong><em>PlainEnglish.io</em></strong></a><em>.</em></p><p><em>Sign up for our </em><a href="http://newsletter.plainenglish.io/"><strong><em>free weekly newsletter</em></strong></a><em>. Follow us on </em><a href="https://twitter.com/inPlainEngHQ"><strong><em>Twitter</em></strong></a>, <a href="https://www.linkedin.com/company/inplainenglish/"><strong><em>LinkedIn</em></strong></a><em>, </em><a href="https://www.youtube.com/channel/UCtipWUghju290NWcn8jhyAw"><strong><em>YouTube</em></strong></a><em>, and </em><a href="https://discord.gg/GtDtUAvyhW"><strong><em>Discord</em></strong></a><strong><em>.</em></strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9f77a9460e96" width="1" height="1" alt=""><hr><p><a href="https://javascript.plainenglish.io/lets-create-a-vehicle-expense-tracking-app-with-a-sqlite-web-server-and-tailwind-css-9f77a9460e96">Let’s Create a Vehicle Expense Tracking App with a SQLite Web Server and Tailwind CSS</a> was originally published in <a href="https://javascript.plainenglish.io/">JavaScript in Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>