Skip to content

Figure ​

Figure is a frame for a picture that draws itself: a canvas, an SVG, an image or a live preview.

When to use ​

Use it to give a picture an edge. The picture keeps its own colors and lines. A picture that reaches the edges of the screen, such as the stage, has no line and does not go in a Figure. Nothing else (text, list items) goes in a Figure.

Props ​

PropDefaultDescription
heightThe height of the frame as a length (12rem)
labelThe picture's name, when the picture has none
childrenrequiredThe picture

Contract ​

Figure has no padding, one line in --kata-color-line, square corners and no shadow, and it clips what overflows. Without height, the picture sets the height.

Example ​

Figure

Released under the Apache-2.0 license.