title/DialogTitle.tsx

aksel · @navikt/core/react/src/dialog/title/DialogTitle.tsx · typescript · MIT
ui

DialogTitle.tsx from navikt/aksel

// Source: https://github.com/navikt/aksel | License: MIT | Copyright 2025 Nav (Arbeids- og velferdsdirektoratet) - The Norwegian Labour and Welfare Administration
// Provided via justclaw.it.com; keep this notice with the code.
import React, { forwardRef } from "react";
import { Heading } from "../../typography";
import { useClientLayoutEffect, useId } from "../../utils-external";
import { cl } from "../../utils/helpers";
import { useDialogContext } from "../root/DialogRoot.context";

type DialogTitleProps = React.HTMLAttributes<HTMLHeadingElement>;

/**
 * @see 🏷️ {@link DialogTitleProps}
 * @example
 * ```jsx
 *  <Dialog>
 *    <Dialog.Popup>
 *      <Dialog.Header>
 *        <Dialog.Title>Dialog title</Dialog.Title>
 *      </Dialog.Header>
 *    </Dialog.Popup>
 *  </Dialog>
 * ```
 *

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key