Title

Portals a page title into the app bar's <TitlePortal> slot.

Installation

pnpm dlx shadcn@latest add @chelone/title

Portals a page title into the app bar's <TitlePortal> slot.

Props

PropTypeDefaultDescription
classNamestring—Optional CSS class applied to the rendered title element.
defaultTitlestring | ReactElement<unknown, string | JSXElementConstructor<any>>—Fallback title used when `title` is undefined. Translated if a string.
titlestring | ReactElement<unknown, string | JSXElementConstructor<any>>—The title to display. If a string, it is translated using the i18n provider. Pass a React element to render a custom title.