# Need to set button side by side in ionic action sheet?

**URL:** <https://forum.ionicframework.com/t/need-to-set-button-side-by-side-in-ionic-action-sheet/45812>\
**Category:** ionic-v1\
**Created:** [March 8, 2016, 1:18pm UTC](https://forum.ionicframework.com/t/need-to-set-button-side-by-side-in-ionic-action-sheet/45812 "2016-03-08T13:18:08Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![jariwalabhavesh](https://avatars.discourse-cdn.com/v4/letter/j/b3f665/32.png) [@jariwalabhavesh](https://forum.ionicframework.com/u/jariwalabhavesh)\
**Post date:** [March 8, 2016, 1:18pm UTC](https://forum.ionicframework.com/t/need-to-set-button-side-by-side-in-ionic-action-sheet/45812/1 "2016-03-08T13:18:08Z")

</div>

I am developing Cordova mobile application using ionic framework.

I need something more in action sheet. I need 6 button in action sheet as you can see in image and all button should call separate function on ng-click.

so how can i achieve this?

![image](https://global.discourse-cdn.com/ionicframework/original/3X/5/8/58d5ac8bb4d5c5d752b200f27e75a8f23c2a51a5.png)

---

<div class="post-metadata">

**Author:** ![mhartington](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/mhartington/32/137757_2.png) [@mhartington](https://forum.ionicframework.com/u/mhartington)\
**Post date:** [March 8, 2016, 1:50pm UTC](https://forum.ionicframework.com/t/need-to-set-button-side-by-side-in-ionic-action-sheet/45812/2 "2016-03-08T13:50:04Z")

</div>

For something like this, you might want to consider creating a custom component. Action sheet follows the ios/material design guidelines.

---

<div class="post-metadata">

**Author:** ![jariwalabhavesh](https://avatars.discourse-cdn.com/v4/letter/j/b3f665/32.png) [@jariwalabhavesh](https://forum.ionicframework.com/u/jariwalabhavesh)\
**Post date:** [March 9, 2016, 4:53am UTC](https://forum.ionicframework.com/t/need-to-set-button-side-by-side-in-ionic-action-sheet/45812/3 "2016-03-09T04:53:34Z")

</div>

Thanks @mhartington For response

I had already arranged it. it is not possible to arrange six button in action sheet button, so i had arranged it in action sheet title by providing html string in title template including ng-click.

```
$scope.renderHtml = function(html) {
    return $sce.trustAsHtml(html);
  };

$scope.showActionSheet = function() {
      // Show the action sheet:
      $ionicActionSheet.show({
        buttons: [{
          text: 'More'
        }],
        titleText: $scope.renderHtml('<div class="row actionsheet-row"><div class="col text-center" ng-click="alert(123);"><span class="custom-actionsheet-icon ion-email"></span></div><div class="col text-center" ng-click="shareTwitter(card)"><span class="custom-actionsheet-icon ion-social-twitter"></span></div><div class="col text-center"><span class="custom-actionsheet-icon ion-social-facebook" ng-click="shareFacebook(card)"></span></div></div><div class="row actionsheet-row"><div class="col text-center" ng-click="shareText(card)"><span class="custom-actionsheet-icon ion-social-googleplus-outline"></span></div><div class="col text-center" ng-click="shareText(card)"><span class="custom-actionsheet-icon ion-social-linkedin"></span></div><div class="col text-center" ng-click="shareText(card)"><span class="custom-actionsheet-icon ion-social-pinterest"></span></div></div>'),
        cancelText: 'Cancel',
        cancel: function() {
          //alert("Clicked Cancel");
        },
        cssClass: 'customActionsheet',
        buttonClicked: function(index, buttonObj) {
             switch (index) {
               case 0:
                 //alert("Clicked Share");
                 return false;
               case 1:
                 //alert("Clicked More");
                 return false;
             }
            }
      });
     };

```

But ng-click is no triggering at all. have u any idea why it is not triggering

---

<div class="post-metadata">

**Author:** ![mhartington](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/mhartington/32/137757_2.png) [@mhartington](https://forum.ionicframework.com/u/mhartington)\
**Post date:** [March 10, 2016, 8:41pm UTC](https://forum.ionicframework.com/t/need-to-set-button-side-by-side-in-ionic-action-sheet/45812/4 "2016-03-10T20:41:53Z")

</div>

Again for something like this, you probably want to make your own custom component, one that does not use the actionsheet code. The way you have it setup currently is going to be problematic. It’s fighting against what actionsheet was designed to do 😄

---

<div class="post-metadata">

**Author:** ![jariwalabhavesh](https://avatars.discourse-cdn.com/v4/letter/j/b3f665/32.png) [@jariwalabhavesh](https://forum.ionicframework.com/u/jariwalabhavesh)\
**Post date:** [March 11, 2016, 9:24am UTC](https://forum.ionicframework.com/t/need-to-set-button-side-by-side-in-ionic-action-sheet/45812/5 "2016-03-11T09:24:49Z")

</div>

> [@mhartington](#):
>
> probably want to make your own custom compon

Thanks for reply, I will go for custom component 😂

---

<div class="post-metadata">

**Author:** ![alitalaee](https://avatars.discourse-cdn.com/v4/letter/a/c5a1d2/32.png) [@alitalaee](https://forum.ionicframework.com/u/alitalaee)\
**Post date:** [June 12, 2021, 6:17am UTC](https://forum.ionicframework.com/t/need-to-set-button-side-by-side-in-ionic-action-sheet/45812/6 "2021-06-12T06:17:21Z")

</div>

I did Try a way to made it in ionic, hope it can help this code in ionic version \>= 5

in my global.scss file

> // layout product action sheet  
> .bottom-action-sheet .action-sheet-group {  
> div.action-sheet-title {  
> font-size : 1rem;  
> text-transform: capitalize;  
> margin-bottom : 55px;  
> }

```
button {
    border: 1px solid var(--actions-background);
    border-radius: 9px;
    position: absolute;
    width: 44.5%;
    bottom: 10px;
    height: 48px;
    font-family: var(--fontfamilyBold) !important;
}

button>span.action-sheet-button-inner {
    color : var(--actions-background);
    justify-content: center;
    font-size: .8rem;
}

button.left {
    left: 16px;
}

button.right {
    right: 16px;
}

```

}

in my example.ts file

> // Show Sheet to remove or cancle  
> async doYouWantRemove(product) {  
> const actionSheet = await this.actionSheetController.create({  
> cssClass: ‘bottom-action-sheet’,  
> header: this.translate.instant(‘do\_you\_want\_to\_remove\_it’),  
> buttons: [  
> {  
> text: this.translate.instant(‘Delete’),  
> role: ‘destructive’,  
> cssClass: ‘right’,  
> handler: () =\> {  
> this.removeProductsFromWishList(product.id);  
> }  
> },  
> {  
> text: this.translate.instant(‘cancel’),  
> cssClass: ‘left’,  
> handler: () =\> {  
> this.removeProductsFromWishList(product.id);  
> }  
> }]  
> });  
> await actionSheet.present();  
> }

my output

 ![Screen Shot 1400-03-22 at 10.46.57](https://global.discourse-cdn.com/ionicframework/original/3X/e/e/eed9ffcc4f91ee21c5aa5bab280f27680605a870.png)

thanks and hope be helpful

---

<div class="post-metadata">

**Author:** ![mhartington](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/mhartington/32/137757_2.png) [@mhartington](https://forum.ionicframework.com/u/mhartington)\
**Post date:** [July 19, 2021, 8:51pm UTC](https://forum.ionicframework.com/t/need-to-set-button-side-by-side-in-ionic-action-sheet/45812/7 "2021-07-19T20:51:46Z")

</div>

Closed on July 19, 2021, 8:51pm UTC


