fps-demo

PreviousNext
Docs
diceuiexample

Preview

Loading preview…
examples/fps-demo.tsx
import { Fps } from "@/registry/default/ui/fps";

export default function FpsDemo() {
  return (
    <div className="relative h-80 w-full rounded-lg border bg-muted/50">
      <Fps strategy="absolute" position="top-right" />
      <div className="flex size-full flex-col items-center justify-center gap-1">
        <div>Absolute positioning</div>
        <div className="text-muted-foreground text-sm">
          Relative to this container without a portal
        </div>
      </div>
    </div>
  );
}

Installation

npx shadcn@latest add @diceui/fps-demo

Usage

import { FpsDemo } from "@/components/fps-demo"
<FpsDemo />