;
-};
+export type SwitchThumbProps = SwitchThumbPropsWithoutHTML & PrimitiveSpanAttributes;
diff --git a/packages/bits-ui/src/lib/internal/attrs.ts b/packages/bits-ui/src/lib/internal/attrs.ts
index 091bedf02..5bb6c8c64 100644
--- a/packages/bits-ui/src/lib/internal/attrs.ts
+++ b/packages/bits-ui/src/lib/internal/attrs.ts
@@ -60,6 +60,10 @@ export function getDataOpenClosed(condition: boolean): "open" | "closed" {
return condition ? "open" : "closed";
}
+export function getDataChecked(condition: boolean): "checked" | "unchecked" {
+ return condition ? "checked" : "unchecked";
+}
+
export function dataDisabledAttrs(condition: boolean): "" | undefined {
return condition ? "" : undefined;
}
@@ -102,3 +106,7 @@ export function getDataOrientation(
): "horizontal" | "vertical" {
return orientation;
}
+
+export function getDataRequired(condition: boolean): "" | undefined {
+ return condition ? "" : undefined;
+}
diff --git a/sites/docs/src/lib/components/demos/switch-demo.svelte b/sites/docs/src/lib/components/demos/switch-demo.svelte
index dab33f822..b2fb9c625 100644
--- a/sites/docs/src/lib/components/demos/switch-demo.svelte
+++ b/sites/docs/src/lib/components/demos/switch-demo.svelte
@@ -4,12 +4,12 @@
- Do not disturb
+ Do not disturb