shadimage
slidecn
uifit-textsource: ok · refreshed

Fit Text

Automatically resizes text to fill the available space using r-fit-text.

npx shadcn add "https://slidecn.vercel.app/r/fit-text.json"
free

No selection tags yet — empty means no evidence, not lack of support.

Dependencies

Bundle weight · light
@revealjs/reactreveal.js

Files1 · source cached 10/8/2026, 2:52:06 AM

registry/slidecn/ui/fit-text.tsx
"use client";

import type { JSX } from "react";

interface FitTextProps {
  children: string;
  as?: keyof JSX.IntrinsicElements;
}

const FitText = ({ children, as: As = "h2" }: FitTextProps) => {
  const Component = As as keyof JSX.IntrinsicElements;

  return <Component className="r-fit-text">{children}</Component>;
};

export { FitText };

More from slidecn

Browse all components in this library →