Home > @tridion-sites/extensions > BlockProps
Signature:
export interface BlockProps extends RefAttributes<HTMLElement>, SpaceProps, SizeProps, ClickableProps, BackgroundColorProps, OpacityProps, TooltipProps, FocusBehaviorProps
Extends: RefAttributes<HTMLElement>, SpaceProps, SizeProps, ClickableProps, BackgroundColorProps, OpacityProps, TooltipProps, FocusBehaviorProps
Property | Modifiers | Type | Description |
---|---|---|---|
aria? | Partial<AriaProps> | (Optional) Accessibility-related props. | |
children? | ReactNode | (Optional) The Block’s content. | |
className? | string | (Optional) Custom CSS class that should be passed to the node. Should be used for custom styling that is not covered by other properties. | |
cssStyle? | CSSProperties | (Optional) Custom CSS style that would be applied to the node directly. Useful for frequently changing styles, e.g., animation. In the case of less frequent updates it is preferable to use ‘className’ prop. | |
hasScroll? | boolean | (Optional) Should content be scrollable? Scrollbar will not appear if content doesn’t overflow Block (i.e: if Block’s size is not restricted). | |
onBlur? | (event: FocusEvent<HTMLElement>) => void | (Optional) | |
onContextMenu? | (event: MouseEvent<HTMLElement>) => void | (Optional) | |
onDoubleClick? | (event: MouseEvent<HTMLElement>) => void | (Optional) | |
onDragEnter? | (event: DragEvent<HTMLElement>) => void | (Optional) | |
onDragLeave? | (event: DragEvent<HTMLElement>) => void | (Optional) | |
onDragOver? | (event: DragEvent<HTMLElement>) => void | (Optional) | |
onDrop? | (event: DragEvent<HTMLElement>) => void | (Optional) | |
onFocus? | (event: FocusEvent<HTMLElement>) => void | (Optional) | |
onKeyDown? | (event: KeyboardEvent<HTMLElement>) => void | (Optional) | |
onMouseDown? | (event: MouseEvent<HTMLElement>) => void | (Optional) | |
onMouseEnter? | (event: MouseEvent<HTMLElement>) => void | (Optional) | |
onMouseLeave? | (event: MouseEvent<HTMLElement>) => void | (Optional) | |
tag? | Tag | (Optional) The HTML tag that should be used for this component. |