# `useThemedVariants()` — resolve theme-aware cva variants _(no submodules)_ ## Purpose Resolves the active theme's variant overrides for a named component and returns a memoised cva resolver. Components that compose with the chassis theme system call this hook rather than importing a component's `buttonVariants` directly so a downstream theme can swap or extend the cva config without forking the source. The hook implements the **type-safety trade-off** documented in the cross- cutting design §4.2 — default-typed calls return base variants only; narrowed calls allow brand-new variants with a documented runtime fall-through. ## Features - Reads the active `` context for the live theme - Merges `theme.variantOverrides[componentName]` on top of the base cva resolver supplied as the second argument - Memoised per `(themeName, componentName)` so repeated renders share one resolver reference - OTel histogram `react_ui.themed_variants.resolve_duration_ms{component}` on cache miss - Default-typed call returns the base cva surface - Narrowed call (`useThemedVariants<'dracula', 'Button'>('Button')`) exposes brand-new theme-specific variants at the type level ## Usage: Basic example ```tsx import { useThemedVariants } from "@suaveplan/react-ui/theme/use-themed-variants"; import { cva } from "class-variance-authority"; const buttonVariants = cva("inline-flex h-9 items-center", { variants: { size: { sm: "px-3", md: "px-4" } }, defaultVariants: { size: "md" }, }); function MyButton() { const variants = useThemedVariants("Button", buttonVariants); return