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/*2 * =============================================================================3 * VibeQuant (vquant) — AI-Powered Financial Intelligence Platform4 * -----------------------------------------------------------------------------5 * File: client/src/components/ui/toggle.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 TogglePrimitive from "@radix-ui/react-toggle"19import { cva, type VariantProps } from "class-variance-authority"2021import { cn } from "@/lib/utils"2223const toggleVariants = cva(24 "inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 gap-2",25 {26 variants: {27 variant: {28 default: "bg-transparent",29 outline:30 "border border-input bg-transparent hover:bg-accent hover:text-accent-foreground",31 },32 size: {33 default: "h-10 px-3 min-w-10",34 sm: "h-9 px-2.5 min-w-9",35 lg: "h-11 px-5 min-w-11",36 },37 },38 defaultVariants: {39 variant: "default",40 size: "default",41 },42 }43)4445const Toggle = React.forwardRef<46 React.ElementRef<typeof TogglePrimitive.Root>,47 React.ComponentPropsWithoutRef<typeof TogglePrimitive.Root> &48 VariantProps<typeof toggleVariants>49>(({ className, variant, size, ...props }, ref) => (50 <TogglePrimitive.Root51 ref={ref}52 className={cn(toggleVariants({ variant, size, className }))}53 {...props}54 />55))5657Toggle.displayName = TogglePrimitive.Root.displayName5859export { Toggle, toggleVariants }60