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
import { Drawer, CardPlaceholder, Button, Label, Textarea } from "flowbite-svelte";
248
245
import { InfoCircleSolid, ArrowRightOutline } from "flowbite-svelte-icons";
249
246
250
247
let open5 = $state(false);
@@ -278,7 +275,7 @@ Set the `transitionParams` variable to new variables.
278
275
279
276
```svelte example
280
277
<script>
281
-
import { Drawer, CardPlaceholder, Button, CloseButton } from "flowbite-svelte";
278
+
import { Drawer, CardPlaceholder, Button } from "flowbite-svelte";
282
279
import { InfoCircleSolid, ArrowRightOutline } from "flowbite-svelte-icons";
283
280
import { sineIn } from "svelte/easing";
284
281
@@ -316,7 +313,7 @@ Use this example to show the drawer on the top side of the page.
316
313
317
314
```svelte example
318
315
<script>
319
-
import { Drawer, CardPlaceholder, Button, CloseButton, A } from "flowbite-svelte";
316
+
import { Drawer, CardPlaceholder, Button, A } from "flowbite-svelte";
320
317
import { InfoCircleSolid, ArrowRightOutline } from "flowbite-svelte-icons";
321
318
import { sineIn } from "svelte/easing";
322
319
@@ -351,7 +348,7 @@ Use this example to show the drawer on the bottom side of the page.
351
348
352
349
```svelte example
353
350
<script>
354
-
import { Drawer, CardPlaceholder, Button, CloseButton, A } from "flowbite-svelte";
351
+
import { Drawer, CardPlaceholder, Button, A } from "flowbite-svelte";
355
352
import { InfoCircleSolid, ArrowRightOutline } from "flowbite-svelte-icons";
356
353
import { sineIn } from "svelte/easing";
357
354
@@ -385,15 +382,21 @@ Use this example to show the drawer on the bottom side of the page.
385
382
386
383
The backdrop element can be used to dim out the background elements when the drawer is visible and also automatically hide the component when clicking outside of it.
387
384
388
-
Use the drawer's `backdrop:xxx` class to manage it's look.
385
+
Use Tailwind's `backdrop:` variant classes (e.g., `backdrop:bg-black/50`) to style the dialog backdrop. For example:
386
+
387
+
```svelte
388
+
<Drawer class="backdrop:bg-black/50">
389
+
<!-- content -->
390
+
</Drawer>
391
+
```
389
392
390
393
## Non-modal
391
394
392
-
Drawer by default is `modal` (see `dialog`). You can set prop `modal={false}` to open `Drawer` in non-modal mode, that means with no backdrop. Note howerver, that you will need managed the `Drawer` position, z-indexand `Esc` button manually.
395
+
Drawer is `modal`by default (see `dialog`). You can set `modal={false}` to open `Drawer` in non-modal mode (no backdrop). However, you will need to manage the `Drawer` position, z-index, closing outside and `ESC` key behavior manually.
393
396
394
397
```svelte example
395
398
<script>
396
-
import { Drawer, CardPlaceholder, Button, CloseButton, A } from "flowbite-svelte";
399
+
import { Drawer, CardPlaceholder, Button, A } from "flowbite-svelte";
397
400
import { InfoCircleSolid, ArrowRightOutline } from "flowbite-svelte-icons";
398
401
399
402
let openNonModal = $state(false);
@@ -425,7 +428,7 @@ As the default, the drawer closes when you click the outside of the drawer. Howe
425
428
426
429
```svelte example
427
430
<script>
428
-
import { Drawer, CardPlaceholder, Button, CloseButton } from "flowbite-svelte";
431
+
import { Drawer, CardPlaceholder, Button } from "flowbite-svelte";
429
432
import { InfoCircleSolid, ArrowRightOutline } from "flowbite-svelte-icons";
430
433
431
434
let openDisablingOnlyOutsideClick = $state(false);
0 commit comments