What this family solves
Binary toggle family with a button-backed switch component, a canonical SwitchField path, and thin purpose-switch wrappers.
Marwes documentation
Binary toggle family with a button-backed switch component, a canonical SwitchField path, and thin purpose-switch wrappers.
Binary toggle family with a button-backed switch component, a canonical SwitchField path, and thin purpose-switch wrappers.
Choose the purpose wrapper that matches the meaning; use SwitchField as the deliberate primitive escape hatch.
Enable or disable a feature with explicit toggle semantics
Persisted user preference toggle
Grant or revoke a permission with explicit intent
Base switch for custom toggle contexts; the deliberate escape hatch
Choose an adapter in the verified examples. The inventory below reflects each framework package exactly.
@marwes-ui/reactFeatureToggle, PermissionSwitch, PreferenceSwitch, SwitchField
FeatureToggleProps, PermissionSwitchProps, PreferenceSwitchProps, SwitchFieldProps
SwitchSize
@marwes-ui/vueFeatureToggle, PermissionSwitch, PreferenceSwitch, SwitchField
FeatureToggleProps, PermissionSwitchProps, PreferenceSwitchProps, SwitchFieldProps
SwitchSize
@marwes-ui/svelteFeatureToggle, PermissionSwitch, PreferenceSwitch, SwitchField
FeatureToggleProps, PermissionSwitchProps, PreferenceSwitchProps, SwitchFieldProps
SwitchSize
These examples come from the same fixtures verified by the repository checks.
import { SwitchField } from "@marwes-ui/react"
import { useState } from "react"
export function Example() {
const [checked, setChecked] = useState(false)
return <SwitchField label="Label" switch={{ checked, onCheckedChange: setChecked }} />
}<script setup lang="ts">
import { ref } from "vue"
import { SwitchField } from "@marwes-ui/vue"
const checked = ref(false)
</script>
<template>
<SwitchField label="Label" :switch="{ checked, onCheckedChange: (v) => (checked = v) }" />
</template><script lang="ts">
import { SwitchField } from "@marwes-ui/svelte"
let checked = $state(false)
</script>
<SwitchField
label="Label"
switch={{ checked, oncheckedchange: (nextChecked) => (checked = nextChecked) }}
/>Switch uses Marwes preset CSS and theme variables. Customize it through the theme passed to MarwesProvider; do not add a second component stylesheet. See the theming guide for configuration and token details.