mirror of
https://github.com/purrgrammer/grimoire.git
synced 2026-04-13 17:07:27 +02:00
16 lines
455 B
TypeScript
16 lines
455 B
TypeScript
import * as React from "react";
|
|
import { cn } from "@/lib/utils";
|
|
|
|
/**
|
|
* VisuallyHidden component for accessibility
|
|
* Hides content visually but keeps it available for screen readers
|
|
*/
|
|
export const VisuallyHidden = React.forwardRef<
|
|
HTMLSpanElement,
|
|
React.HTMLAttributes<HTMLSpanElement>
|
|
>(({ className, ...props }, ref) => (
|
|
<span ref={ref} className={cn("sr-only", className)} {...props} />
|
|
));
|
|
|
|
VisuallyHidden.displayName = "VisuallyHidden";
|