UNPKG

react-smooth-sheet

Version:

A customizable bottom sheet component for React applications.

84 lines (77 loc) 1.45 kB
.bottomSheet { position: fixed; bottom: 0; left: 0; opacity: 0; width: 100%; height: 100vh; display: none; flex-direction: column; align-items: center; z-index: 14; touch-action: none; transition: 0.5s; transform: translateY(0vh); } .bottomSheet .emptiness { position: absolute; top: 0; left: 0; opacity: 0.5; background-color: rgba(0, 0, 0, 0.661); width: 100%; height: 100%; transition: 0.5s; } .bottomSheet .container { position: absolute; bottom: -30vh; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; width: 95%; padding: 5% 2.5%; gap: 10%; height: 50%; background: gray; border-top-right-radius: 20px; border-top-left-radius: 20px; transition: 0.5s; } .bottomSheet .dragable { position: absolute; top: 0vh; display: flex; justify-content: center; align-items: center; width: 100%; height: 7.5vh; border-radius: 10px; } .bottomSheet .dragable span { background-color: aliceblue; position: absolute; top: 3vh; width: 15%; height: 1vh; border-radius: 10px; } .bottomSheet .content-area { width: 100%; height: 90%; display: flex; flex-direction: column; align-items: flex-start; gap: 2.5vh; } .bottomSheet .content-area .content { width: 100%; height: 100%; padding: 2% 0; display: flex; align-items: center; justify-content: flex-start; overflow: hidden; overflow: auto; }