0

I have certain contents under body, but as the contents increases a scrollbar starts to appear as expected. But is there a way to hide it and still the modal is scrollable? If there's any or anything similar please let me know. Thanks

<lightning-modal-header></<lightning-modal-header>
<lightning-modal-body></<lightning-modal-body>
<lightning-modal-footer></<lightning-modal-footer>

1 Answer 1

1

You can hide scroll bar of lightning-modal-body but keep scrollable inside it.

Let me provide sample code:

// It will works for chrome, safari and edge
lightning-modal-body::-webkit-scrollbar {
  width: 0px;
  background: transparent;
}

// It will works for Firefox
lightning-modal-body {
  scrollbar-width: none;
}

// It will keep scrollable inside lightning-modal-body
lightning-modal-body {
  overflow-y: scroll;
}
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.