Compose for Desktop is modern toolkit for building native declarative UI made by JetBrains. It's based on Google's Jetpack Compose
Questions tagged [compose-desktop]
147 questions
13
votes
3 answers
How can I implement a timer in a portable way in Jetpack Compose?
There's applications I'd like to write where I'd like some things to occur on a schedule.
Polling a URL for updates every few minutes seems to be a fairly common use case. In this particular case, though, I'm just trying to implement a clock.
This…

Hakanai
- 12,010
- 10
- 62
- 132
13
votes
2 answers
How to use webview in jetpack compose for desktop-App
I am writing a desktop application using desktop compose.
But unable to find any suggestion on how to use web-view like in android we are supposed to use.
For desktop-app, we can not use android web-view any help and suggestion will be highly…

Vinay Shankar Gupta
- 131
- 1
- 3
11
votes
3 answers
How to load Fonts in Jetpack Compose Desktop?
In Jetpack Compose for android you can do this:
val fontFamily = FontFamily(
Font(
resId = R.font.my_font_400_regular,
weight = FontWeight.W400,
style = FontStyle.Normal
),
Font(
resId =…

Luxusproblem
- 1,913
- 11
- 23
11
votes
7 answers
How to load image in Kotlin Compose desktop?
How to load images from the hard disk when using Kotlin compose on the desktop?

Haseeb Pavaratty
- 554
- 3
- 17
10
votes
2 answers
How to use .svg file in Jetpack Compose for Desktop?
I am trying to use a .svg (vector file) to show an image but I am stuck and not able to do it. Is there any way I can use it, I tried to use it like this
Image(imageFromResource("svg_file_name.svg"),contentDescription="")
But it throws an error…

AgentP
- 6,261
- 2
- 31
- 52
8
votes
1 answer
How to get the application version programmatically in Compose Desktop?
I know it's possible to set the version in build.gradle → nativeDistributions.packageVersion ...
but how does one read that version in the source code of the app, for example to print it in the application composable?
On macOs the about screen is…

Ovi Trif
- 394
- 4
- 11
7
votes
3 answers
How to prevent unnecessary recompositions in Jetpack Compose
I have a TextField for a search query and a Button that will execute the search and the results are shown in a column. Since the search takes a few seconds to run I want it to be executed on button press and not on text change.
Here is a simplified…

nima
- 6,566
- 4
- 45
- 57
7
votes
4 answers
How to load image from remote url in Kotlin Compose desktop?
How to load image from remote url in Kotlin Compose desktop?
in Android it use coli as official sample
@Composable
fun NetworkImage(
url: String,
modifier: Modifier = Modifier,
contentScale: ContentScale = ContentScale.Crop,
…

Thomas Liao
- 215
- 3
- 12
6
votes
2 answers
How to store data in Jetpack Compose Desktop?
I am creating an application in Jetpack Compose Desktop which will take user input and after user reopens the application that input value should be there. I mean a user given data should be there after user reopens the application.
remember {…
user16564976
5
votes
0 answers
Styling Compose for Desktop Tray Composable
I've been playing around with Compose for Desktop, and I am trying to figure out how Jetbrain styled the Tray Composable. I am assuming that's what they used to build the Jetbrains Toolbox since they wrote a post about how they migrated the Toolbox…

Carlos Paulino
- 736
- 6
- 9
5
votes
2 answers
Bundle files with Compose for Desktop (Compose Multiplatform)
I am an Android developer and I have experience with Jetpack Compose. Now, I am trying to build desktop apps, so I found this Compose for Desktop project. I want to store a JSON file with my desktop app so that I can read the file from my desktop…

Jeeva
- 3,975
- 3
- 23
- 47
5
votes
1 answer
Compose for Desktop LazyRow/LazyColumn not scrolling with mouse click
For some reason LazyColumns do not scroll with a mouse click and move gesture. It only works with the mouse wheel so far. For LazyRows it is also not possible to scroll with the mouse wheel. It seems that lazy row is useless for Compose for…

tscheppe
- 588
- 5
- 18
5
votes
1 answer
How can I remove windows title bar or customize it in compose desktop?
I want to remove windows default title bar so I can create my own that matches my application. I searched around but couldn't find anything.
Thanks

Porush Manjhi
- 135
- 12
5
votes
1 answer
How can I detect a click with the view behind a Jetpack Compose Button?
The below code is for Jetbrains Desktop Compose. It shows a card with a button on it, right now if you click the card "clicked card" will be echoed to console. If you click the button it will echo "Clicked button"
However, I'm looking for a way for…

willow512
- 122
- 1
- 7
5
votes
3 answers
Open a link in browser using Compose for Desktop
How to open a link in the browser if I click on a button. I am using Compose for Desktop for it.
Button(onClick = {
// What I have to write here..
}) {
Text(
text = "Open a link",
color = Color.Black
)
}
Thanks in…

Avijit Karmakar
- 8,890
- 6
- 44
- 59