reagraph
Version:
WebGL Node-based Graph for React
83 lines (82 loc) • 1.65 kB
TypeScript
import { FC } from 'react';
import { ColorRepresentation, Euler } from 'three';
export interface LabelProps {
/**
* Text to render.
*/
text: string;
/**
* Font URL.
* Reference: https://github.com/reaviz/reagraph/issues/23
*/
fontUrl?: string;
/**
* Size of the font.
*
* @default 7
*/
fontSize?: number;
/**
* Color of the text.
*
* @default '#2A6475'
*/
color?: ColorRepresentation;
/**
* Stroke of the text.
*/
stroke?: ColorRepresentation;
/**
* Background color of the label.
*/
backgroundColor?: ColorRepresentation;
/**
* Opacity of the background.
*
* @default 1
*/
backgroundOpacity?: number;
/**
* Padding around the text for background sizing.
*
* @default 1
*/
padding?: number;
/**
* Color of the background stroke/border.
*/
strokeColor?: ColorRepresentation;
/**
* Size of the background stroke/border.
*
* @default 0
*/
strokeWidth?: number;
/**
* Corner radius of the background.
*
* @default 0.1
*/
radius?: number;
/**
* Opacity for the label.
*
* @default 1
*/
opacity?: number;
/**
* The lenth of which to start the ellipsis.
*
* @default 75
*/
ellipsis?: number;
/**
* Whether the label is active ( dragging, hover, focus ).
*/
active?: boolean;
/**
* Rotation of the label.
*/
rotation?: Euler | [number, number, number];
}
export declare const Label: FC<LabelProps>;