Interface: SvgTileLayoutProps
Extends
Omit<SVGProps<SVGSVGElement>,"children"|"fill"|"stroke"|"strokeWidth">
Properties
backdrop?
optional backdrop?: string;One image across all the cells (a URL), cropped to cover the layout and clipped to the cells. The default cell rendering then skips fill; per-cell images go on top.
background?
optional background?: string;Color painted across the whole region, behind the cells.
choose?
optional choose?: "placement" | "shape";With imageAspects: "shape" also picks which cells get images by their shape.
containWithin?
optional containWithin?: "tile" | "visible";With imageFit: "contain", for cells an edges: "window" layout cuts: fit the image in the whole tile ("tile", the default) or in the part that shows ("visible").
contentCells?
optional contentCells?: ContentCells;Which cells may hold an image from the images array: "all" (default), "whole" or a test.
fill?
optional fill?: FillSource;Cell color under (or instead of) images. Defaults to defaultPalette.
fit?
optional fit?: FitProp;Size the tiles to the images array (counted by contentCells): true/"atLeast" or "nearest". Ignored with layout, repeatImages or an images function.
imageAlts?
optional imageAlts?: readonly string[];Text alternative per image in images: those cells become labeled images; the rest decoration.
imageAspects?
optional imageAspects?: readonly number[];Width / height of each image, to put images in cells of similar shape (see matchSlots).
imageFit?
optional imageFit?: "cover" | "contain";"cover" (default) fills each cell's bounding box, cropped to its shape; "contain" shows each image whole inside the cell's safe area (see safeArea), at its imageAspects shape.
imageFocus?
optional imageFocus?: readonly (Focus | undefined)[];Focal point of each image (by position; fractions of its width and height, see estimateFocus), kept in view when "cover" crops it (see coverRect). Needs each image's shape, from imageAspects or the focus's aspect.
images?
optional images?: ImageSource;imageWeights?
optional imageWeights?: readonly number[];How many tiles each image in images spans (1 for most): heavier images get featured tiles where they fall in reading order (see weightedLayout). Needs options.
layout?
optional layout?: Layout;options?
optional options?: LayoutOptions;Layout options; or pass a precomputed layout instead.
placement?
optional placement?: ContentPlacement;Where images go when there are fewer than cells: "reading" (default), "center" or "spread".
relief?
optional relief?: boolean | ReliefOptions;Raised tiles: a lit bevel over each cell, and optionally a shadow cast into the grout. true for the defaults. See ReliefOptions. Drawn over renderCell content too.
renderCell?
optional renderCell?: (cell, ctx) => ReactNode;Replace the default cell rendering with SVG content. Rendered inside a <g> per cell.
Parameters
| Parameter | Type |
|---|---|
cell | Cell |
ctx | SvgCellRenderContext |
Returns
ReactNode
repeatImages?
optional repeatImages?: boolean;stroke?
optional stroke?: string;strokeWidth?
optional strokeWidth?: number;title?
optional title?: string;Accessible title.