Skip to main content
Version: 2.0.0-alpha.19

Components

Components are the basic graphical building blocks of Vico.

Types

There are several built-in Components. These cover most use cases.

TextComponent

TextComponent draws text. It supports font customization, line breaks, text rotation, backgrounds, and more.

rememberTextComponent(...)

ShapeComponent

ShapeComponents draw Shapes, for which you can define a color, a stroke, and more.

rememberShapeComponent(...)

LineComponent

LineComponents, which are a type of ShapeComponent, draw horizontal and vertical lines.

rememberLineComponent(...)

LayeredComponent

A LayeredComponents draws two Components on top of each other and lets you specify their spacing.

rememberLayeredComponent(...)

Shape

Most Components accept Shapes, directly or indirectly. Use the following APIs to create instances:

DynamicShader

DynamicShaders, which are accepted by selected APIs, let you create complex fills. Use the following APIs to create instances: