@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.
127 lines (126 loc) • 4.74 kB
TypeScript
import type { BaseProps } from '../../BaseProps';
import type { LinkTileAlign, SelectedAriaAttributes, LinkTileAriaAttribute, BreakpointCustomizable, LinkTileAspectRatio, LinkTileSize, LinkTileTarget, LinkTileWeight } from '../types';
export type PLinkTileProps = BaseProps & {
/**
* Controls the vertical placement of the description and link — `top` or `bottom`.
* @default 'bottom'
*/
align?: LinkTileAlign;
/**
* Sets ARIA attributes on the tile's anchor element to improve accessibility for screen readers.
*/
aria?: SelectedAriaAttributes<LinkTileAriaAttribute>;
/**
* Sets the width-to-height ratio of the tile media area. Supports responsive breakpoint values.
* @default '4/3'
*/
aspectRatio?: BreakpointCustomizable<LinkTileAspectRatio>;
/**
* Renders only the icon link without the full label. Supports responsive breakpoint values.
* @default false
*/
compact?: BreakpointCustomizable<boolean>;
/**
* Sets the description text displayed in the tile's content area.
*/
description: string;
/**
* Sets the native `download` attribute to trigger a file download.
*/
download?: string;
/**
* Shows a gradient overlay over the media slot to improve text legibility on bright images or videos.
* @default false
*/
gradient?: boolean;
/**
* Sets the URL the tile's anchor element navigates to when clicked.
*/
href: string;
/**
* Sets the accessible label text of the link rendered inside the tile.
*/
label: string;
/**
* Sets the `rel` attribute on the link (e.g. `noopener`).
*/
rel?: string;
/**
* Sets the font size of the description text in the tile content area. Supports responsive breakpoint values.
* @default 'medium'
*/
size?: BreakpointCustomizable<LinkTileSize>;
/**
* Specifies where to open the linked URL (e.g. `_self`, `_blank`).
* @default '_self'
*/
target?: LinkTileTarget;
/**
* Sets the font weight of the description text in the tile content area. Supports responsive breakpoint values.
* @default 'semi-bold'
*/
weight?: BreakpointCustomizable<LinkTileWeight>;
};
export declare const PLinkTile: 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"> & {
/**
* Controls the vertical placement of the description and link — `top` or `bottom`.
* @default 'bottom'
*/
align?: LinkTileAlign;
/**
* Sets ARIA attributes on the tile's anchor element to improve accessibility for screen readers.
*/
aria?: SelectedAriaAttributes<LinkTileAriaAttribute>;
/**
* Sets the width-to-height ratio of the tile media area. Supports responsive breakpoint values.
* @default '4/3'
*/
aspectRatio?: BreakpointCustomizable<LinkTileAspectRatio>;
/**
* Renders only the icon link without the full label. Supports responsive breakpoint values.
* @default false
*/
compact?: BreakpointCustomizable<boolean>;
/**
* Sets the description text displayed in the tile's content area.
*/
description: string;
/**
* Sets the native `download` attribute to trigger a file download.
*/
download?: string;
/**
* Shows a gradient overlay over the media slot to improve text legibility on bright images or videos.
* @default false
*/
gradient?: boolean;
/**
* Sets the URL the tile's anchor element navigates to when clicked.
*/
href: string;
/**
* Sets the accessible label text of the link rendered inside the tile.
*/
label: string;
/**
* Sets the `rel` attribute on the link (e.g. `noopener`).
*/
rel?: string;
/**
* Sets the font size of the description text in the tile content area. Supports responsive breakpoint values.
* @default 'medium'
*/
size?: BreakpointCustomizable<LinkTileSize>;
/**
* Specifies where to open the linked URL (e.g. `_self`, `_blank`).
* @default '_self'
*/
target?: LinkTileTarget;
/**
* Sets the font weight of the description text in the tile content area. Supports responsive breakpoint values.
* @default 'semi-bold'
*/
weight?: BreakpointCustomizable<LinkTileWeight>;
} & {
children?: import("react").ReactNode | undefined;
} & import("react").RefAttributes<HTMLElement>>;