function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Sandeep TechAffinitySandeep TechAffinity 

How to do Alignment for this Aura component?

Hi Guys,
 
I have developed one Aura component which is like the Input text and "Send" button. Now I want to place SEND button beside the input text.  
Like this
<aura:component controller="ChatThreadHelper" implements="flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,forceCommunity:availableForAllPageTypes" access="global" >
    <aura:attribute name="Send" type="String" default="SEND"/>
    <aura:attribute name="textvalue" type="String"  default="" />
    <aura:attribute name="messageList" type="List"/>
    <aura:attribute name="recordId" type="string"/>
    <!--<aura:handler name="init" value="{!this}" action="{!c.doInit}"/>-->
    <!--<lightning:card>-->
    <div class="slds-form-element">
        <label class="slds-form-element__label" for="textarea-id-01"></label>
        <div class="slds-form-element__control">
            <span onkeypress="{!c.keyCheck}">
                <lightning:input name="input8" value="{! v.textvalue }" placeholder="type here" label="Message" />
            </span>
        </div>
        <div>
           <div class="slds-clearfix">
                <lightning:buttonIcon iconName="utility:send" variant="bare" iconClass="dark" size="large" onclick="{! c.handleClick }" alternativeText="Send" title="Send" class="slds-float_right"/>
            </div>
        </div>
    </div>
    
    <!--</lightning:card>-->
</aura:component>

Please Help me.

Thank you
Sandeep.

 
Best Answer chosen by Sandeep TechAffinity
mukesh guptamukesh gupta
Hi Sandeep,



User-added image

please use below tested code:-
 
<aura:component implements="flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,forceCommunity:availableForAllPageTypes" access="global" >
    <aura:attribute name="Send" type="String" default="SEND"/>
    <aura:attribute name="textvalue" type="String"  default="" />
    <aura:attribute name="messageList" type="List"/>
    <aura:attribute name="recordId" type="string"/>
    <!--<aura:handler name="init" value="{!this}" action="{!c.doInit}"/>-->
    <!--<lightning:card>-->
    <div class="slds-form-element">
        <label class="slds-form-element__label" for="textarea-id-01"></label>
        <div style ="width: 90%;    float: left;">
            <span onkeypress="{!c.keyCheck}">
                <lightning:input name="input8" value="{! v.textvalue }" placeholder="type here" label="Message" />
            </span>
        </div>
        <div>
           <div class="slds-clearfix" style ="margin-top: 6px;">
                <lightning:buttonIcon iconName="utility:send" variant="bare" iconClass="dark" size="large" onclick="{! c.handleClick }" alternativeText="Send" title="Send" class="slds-float_right"/>
            </div>
        </div>
    </div>
    
    <!--</lightning:card>-->
</aura:component>



if you need any assistanse, Please let me know!!

Kindly mark my solution as the best answer if it helps you.

Thanks
Mukesh

 

All Answers

mukesh guptamukesh gupta
Hi Sandeep,



User-added image

please use below tested code:-
 
<aura:component implements="flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,forceCommunity:availableForAllPageTypes" access="global" >
    <aura:attribute name="Send" type="String" default="SEND"/>
    <aura:attribute name="textvalue" type="String"  default="" />
    <aura:attribute name="messageList" type="List"/>
    <aura:attribute name="recordId" type="string"/>
    <!--<aura:handler name="init" value="{!this}" action="{!c.doInit}"/>-->
    <!--<lightning:card>-->
    <div class="slds-form-element">
        <label class="slds-form-element__label" for="textarea-id-01"></label>
        <div style ="width: 90%;    float: left;">
            <span onkeypress="{!c.keyCheck}">
                <lightning:input name="input8" value="{! v.textvalue }" placeholder="type here" label="Message" />
            </span>
        </div>
        <div>
           <div class="slds-clearfix" style ="margin-top: 6px;">
                <lightning:buttonIcon iconName="utility:send" variant="bare" iconClass="dark" size="large" onclick="{! c.handleClick }" alternativeText="Send" title="Send" class="slds-float_right"/>
            </div>
        </div>
    </div>
    
    <!--</lightning:card>-->
</aura:component>



if you need any assistanse, Please let me know!!

Kindly mark my solution as the best answer if it helps you.

Thanks
Mukesh

 
This was selected as the best answer
Sandeep TechAffinitySandeep TechAffinity
Thank you.