UNPKG

@porsche-design-system/components-react

Version:

Porsche Design System is a component library designed to help developers create the best experience for software or services distributed by Dr. Ing. h.c. F. Porsche AG.

77 lines (76 loc) 3.1 kB
import type { BaseProps } from '../../BaseProps'; import type { HeadingAlign, HeadingColor, HeadingHyphens, BreakpointCustomizable, HeadingSize, HeadingTag, HeadingWeight } from '../types'; export type PHeadingProps = BaseProps & { /** * Sets the horizontal text alignment (`start`, `center`, `end`, or `inherit`). * @default 'start' */ align?: HeadingAlign; /** * Sets the text color using PDS color tokens. * @default 'primary' */ color?: HeadingColor; /** * Truncates the text with an ellipsis when it overflows the container on a single line. Cannot be combined with multi-line content. * @default false */ ellipsis?: boolean; /** * Controls hyphenation behavior — `auto` lets the browser decide, `manual` only breaks at `&shy;`, `none` disables it entirely. * @default 'none' */ hyphens?: HeadingHyphens; /** * Sets the visual size of the heading. Use `inherit` to derive size from the parent. Supports responsive breakpoint values. * @default '2xl' */ size?: BreakpointCustomizable<HeadingSize>; /** * Sets the HTML heading tag (h1–h6) for correct document outline placement. When omitted, the tag is inferred from `size`. */ tag?: HeadingTag; /** * Sets the font weight — `normal`, `semibold`, or `bold`. * @default 'normal' */ weight?: HeadingWeight; }; export declare const PHeading: import("react").ForwardRefExoticComponent<Omit<import("react").DOMAttributes<{}>, "onChange" | "onInput" | "onToggle"> & Pick<import("react").HTMLAttributes<{}>, "suppressHydrationWarning" | "autoFocus" | "className" | "dir" | "hidden" | "id" | "inert" | "inputMode" | "lang" | "slot" | "style" | "tabIndex" | "title" | "translate" | "role"> & { /** * Sets the horizontal text alignment (`start`, `center`, `end`, or `inherit`). * @default 'start' */ align?: HeadingAlign; /** * Sets the text color using PDS color tokens. * @default 'primary' */ color?: HeadingColor; /** * Truncates the text with an ellipsis when it overflows the container on a single line. Cannot be combined with multi-line content. * @default false */ ellipsis?: boolean; /** * Controls hyphenation behavior — `auto` lets the browser decide, `manual` only breaks at `&shy;`, `none` disables it entirely. * @default 'none' */ hyphens?: HeadingHyphens; /** * Sets the visual size of the heading. Use `inherit` to derive size from the parent. Supports responsive breakpoint values. * @default '2xl' */ size?: BreakpointCustomizable<HeadingSize>; /** * Sets the HTML heading tag (h1–h6) for correct document outline placement. When omitted, the tag is inferred from `size`. */ tag?: HeadingTag; /** * Sets the font weight — `normal`, `semibold`, or `bold`. * @default 'normal' */ weight?: HeadingWeight; } & { children?: import("react").ReactNode | undefined; } & import("react").RefAttributes<HTMLElement>>;