title: Disabling ripple effect on buttons jetpack compose
body: <p>I have seen that we can disable the ripple effect of a view with the <code>clickable(interactionSource, indication)</code> inside for example a row or column but my question is that if we can disable it from a  <code>Button</code> or <code>FloatingActionButton</code></p>
  <p>I see that <code>FloatingActionButton</code> has an interactionSource attribute and I have tried this</p>
  <pre><code>FloatingActionButton(
          modifier = Modifier
              .size(40.dp),
          onClick = {
              buttonState = when (buttonState) {
                  ButtonState.PRESSED -&gt; ButtonState.UNPRESSED
                  ButtonState.UNPRESSED -&gt; ButtonState.PRESSED
              }
          },
          interactionSource = remember {
              MutableInteractionSource()
          })
  </code></pre>
  <p>this is not working to disable the ripple effect.</p>
  <p>Then I have tried with the <code>indication</code> modifier like this</p>
  <pre><code>FloatingActionButton(
          modifier = Modifier
              .size(40.dp)
              .indication(
                  interactionSource = remember {
                      MutableInteractionSource()
                  },
                  indication = null
              ),
          onClick = {
              buttonState = when (buttonState) {
                  ButtonState.PRESSED -&gt; ButtonState.UNPRESSED
                  ButtonState.UNPRESSED -&gt; ButtonState.PRESSED
              }
          })
  </code></pre>
  <p>also is not working, and then last thing I tried is adding the <code>.clickable(...)</code> in the modifier of the Fab button but I think that is pointless since the button has its own onClick event.</p>
  <p>All the cases above yields to this</p>
  <p><a href="https://i.stack.imgur.com/W80jt.gif" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/W80jt.gif" alt="enter image description here" /></a></p>
  <p>Is there anyway from any Button to disable its ripple effect without adding a <code>Column</code> or <code>Box</code> with a clickable attribute into its modifier ?</p>