You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+83-2Lines changed: 83 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -8,12 +8,94 @@
8
8
9
9
**react-spring-bottom-sheet** is built on top of **[react-spring]** and **[react-use-gesture]**. It busts the myth that accessibility and supporting keyboard navigation and screen readers are allegedly at odds with delightful, beautiful, and highly animated UIs. Every animation and transition use CSS custom properties instead of manipulating them directly, allowing complete control over the experience from CSS alone.
These are all the variables available to customize the look and feel when using the [provided](/src/style.css) CSS.
70
+
71
+
```css
72
+
:root {
73
+
--rsbs-backdrop-bg: rgba(0, 0, 0, 0.6);
74
+
--rsbs-bg: #fff;
75
+
--rsbs-handle-bg: hsla(0, 0%, 0%, 0.14);
76
+
--rsbs-max-w: auto;
77
+
--rsbs-ml: env(safe-area-inset-left);
78
+
--rsbs-mr: env(safe-area-inset-right);
79
+
--rsbs-overlay-rounded: 16px;
80
+
}
81
+
```
82
+
83
+
### Custom CSS
84
+
85
+
It's recommended that you copy from [style.css](/src/style.css) into your own project, and add this to your `postcss.config.js` setup (`npm i postcss-custom-properties-fallback`):
@@ -40,7 +122,6 @@ If you provide either a `header` or `footer` prop you'll enable the special beha
40
122
41
123
In most cases you use a bottom sheet the same way you do with a dialog: you want it to overlay the page and block out distractions. But there are times when you want a bottom sheet but without it taking all the attention and overlaying the entire page. Providing `blocking={false}` helps this use case. By doing so you disable a couple of behaviors that are there for accessibility (focus-locking and more) that prevents a screen reader or a keyboard user from accidentally leaving the bottom sheet.
0 commit comments