SPB Git

spb/vquant Public MIT

VibeQuant — AI-powered institutional-grade financial intelligence platform.

TypeScript 84.3% Python 11.7% JavaScript 1.6% CSS 1.5% HTML 0.7%
1.7 KB · 44 lines tsx
Raw Blame History
1/*2 * =============================================================================3 *  VibeQuant (vquant) — AI-Powered Financial Intelligence Platform4 * -----------------------------------------------------------------------------5 *  File:      client/src/components/ui/switch.tsx6 *7 *  Author:    Simon-Pierre Boucher8 *  Contact:   contact@spboucher.ai9 *  Website:   https://www.spboucher.ai10 *  Demo:      https://www.vquant.ai11 *  License:   MIT (see LICENSE)12 *13 *  Copyright © 2026 Simon-Pierre Boucher. All rights reserved.14 * =============================================================================15 */1617import * as React from "react"18import * as SwitchPrimitives from "@radix-ui/react-switch"1920import { cn } from "@/lib/utils"2122const Switch = React.forwardRef<23  React.ElementRef<typeof SwitchPrimitives.Root>,24  React.ComponentPropsWithoutRef<typeof SwitchPrimitives.Root>25>(({ className, ...props }, ref) => (26  <SwitchPrimitives.Root27    className={cn(28      "peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",29      className30    )}31    {...props}32    ref={ref}33  >34    <SwitchPrimitives.Thumb35      className={cn(36        "pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0"37      )}38    />39  </SwitchPrimitives.Root>40))41Switch.displayName = SwitchPrimitives.Root.displayName4243export { Switch }44