CircleView Compose ๐ŸŽจ

July 25, 2026 ยท View on GitHub

Jetpack Compose Kotlin Android Min SDK Maven Central License

A modern, highly customizable CircleView component for Android built 100% in Jetpack Compose and Kotlin. Easily build sleek progress circles, stat badges, dashboard widgets, and interactive circular UI elements.


๐Ÿ“ฑ Screenshots & Showcase

Interactive PlaygroundColor PresetsShowcase Widgets
PlaygroundColor PresetsShowcase Widgets

โœจ Features

  • โšก 100% Pure Jetpack Compose: Native @Composable implementation optimized for performance and smooth re-composition.
  • ๐ŸŽจ Fully Customizable: Control stroke width, inner fill radius, background color, stroke color, fill color, text styling, and spacing.
  • ๐Ÿ’ซ Built-in Smooth Animations: Parameter changes (colors, sizes, radius) automatically animate with smooth state transitions.
  • ๐Ÿ“ฑ Interactive Sample App: Explore live sliders, presets (Cyberpunk, Solar Gold, Neon Mint, Emerald), and showcase widgets.
  • ๐ŸŒ Maven Central Release: Official GPG-signed package published directly on Maven Central.

๐Ÿ“ฆ How to Include in Your Project

Maven Central Import

Add the dependency directly to your module's build.gradle.kts:

dependencies {
    implementation("io.github.pavlospt:circleview:2.0.0")
}

๐Ÿš€ Quick Start

Basic Usage in Compose

import androidx.compose.foundation.layout.size
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import io.github.pavlospt.circleview.CircleView

@Composable
fun FitnessWidget() {
    CircleView(
        modifier = Modifier.size(200.dp),
        titleText = "8,420",
        subtitleText = "STEPS",
        titleSize = 28.sp,
        subtitleSize = 14.sp
    )
}

Animated CircleView with Custom Colors

import androidx.compose.foundation.layout.size
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import io.github.pavlospt.circleview.CircleView

CircleView(
    modifier = Modifier.size(220.dp),
    titleText = "22.5ยฐC",
    subtitleText = "HEATING",
    titleColor = Color(0xFFFDBA74),
    subtitleColor = Color(0xFFFED7AA),
    strokeColor = Color(0xFFF97316),
    backgroundColor = Color(0xFF451A03),
    fillColor = Color(0xFF7C2D12),
    strokeWidth = 6.dp,
    fillRadius = 0.85f,
    titleSubtitleSpace = 6.dp,
    animated = true // Enables smooth color & geometry transitions when state changes
)

๐Ÿ“‹ Parameters Reference

ParameterTypeDefault ValueDescription
titleTextString"Title"Text displayed in the top row
subtitleTextString"Subtitle"Text displayed in the bottom row
titleSizeTextUnit25.spFont size of the title text
subtitleSizeTextUnit20.spFont size of the subtitle text
titleColorColorColor(0xFF00E5FF)Color of the title text
subtitleColorColorColor(0xFFFFFFFF)Color of the subtitle text
strokeColorColorColor(0xFF00E5FF)Color of the outer circle border stroke
backgroundColorColorColor(0xFFFFFFFF)Color of background circle between stroke & fill
fillColorColorColor(0xFF333333)Color of the inner filled circle
strokeWidthDp5.dpThickness of outer stroke ring
fillRadiusFloat0.9fRadius ratio of inner circle relative to outer circle (0.0 to 1.0)
titleSubtitleSpaceDp4.dpVertical space separating title and subtitle
showTitleBooleantrueVisibility toggle for title text
showSubtitleBooleantrueVisibility toggle for subtitle text
animatedBooleanfalseEnables smooth animation on attribute changes

๐Ÿ› ๏ธ Publishing Setup (Maven Central)

This repository uses com.vanniktech.maven.publish to publish signed artifacts (Kotlin sources, Dokka javadoc, and AAR/JAR binaries) directly to Sonatype Central Portal.

1. Publish to Maven Central

Deploy to Maven Central with your Sonatype credentials:

./gradlew publishAndReleaseToMavenCentral \
  -PmavenCentralUsername="YOUR_SONATYPE_USER_TOKEN" \
  -PmavenCentralPassword="YOUR_SONATYPE_USER_PASSWORD"

2. Publish Locally for Testing

./gradlew publishToMavenLocal

๐Ÿ‘ฅ Credits

Author: Pavlos-Petros Tournaris (p.tournaris@gmail.com)


๐Ÿ“„ License

Copyright 2014-2026 Pavlos-Petros Tournaris

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.