π Everything about drawing: A Compose-based drawing tool library, built with Kotlin Multiplatform. βοΈ
Supports drawing, erasing, selection and manipulation, laser undo/redo, and zoom functionality.
ποΈ Pen Tool | π§½ Stroke Eraser Tool | πͺ’ Lasso Tool | π¦ Laser Tool |
---|---|---|---|
![]() ![]() |
![]() ![]() |
![]() ![]() |
![]() ![]() |
Add the dependency below to your module's build.gradle
file:
commonMain.dependencies {
implementation("io.github.henni99:handwriting:<latest-version>")
}
HandwritingController for managing handwriting data, such as pen strokes, eraser actions, and lasso selection. It supports undo/redo functionality, tool modes, and manages the state for various elements like strokes, selected paths, and the lasso area.
val controller = rememberHandwritingController(
isZoomable = true,
isEraserPointShowed = true,
penColor = Color.Black,
penStrokeWidth = 14f,
eraserPointColor = Color.LightGray,
eraserPointRadius = 20f,
lassoColor = Color.Black,
lassoBoundBoxColor = Color.Black,
lassoBoundBoxPadding = Padding(20, 20, 20, 20),
laserColor = Color.Black,
contentBackgroundColor = Color.Transparent,
contentBackgroundImage = null,
contentBackgroundImageColor = Color.Transparent,
contentBackgroundImageContentScale = ContentScale.None
)
// For the laser function, it is optional
val laserState = animateLaserAlphaFloatAsState(controller)
HandWritingNote(
modifier = Modifier
.fillMaxSize()
.padding(innerPadding),
controller = controller,
laserState = laserState,
containerBackgroundColor = Color.LightGray,
contentWidthRatio = 0.9f,
contentHeightRatio = 0.9f,
)
You can also use the π zoom feature!


If you find any bugs or have suggestions for better features, please feel free to share your feedback. Contributions are always welcome!
Support it by joining stargazers for this repository. β
Also, follow me on GitHub for my next creations! π€©
For more details, you can check out the documentations