Skip to content

🐼 Customizable tooltips 🐼 Android Jetpack Compose

Notifications You must be signed in to change notification settings

ridvanozcan/PandaTooltip

Repository files navigation

PandaTooltip | Customizable Tooltips


🐼 Customizable Tooltips on Android Jetpack Compose.


LinkedIn Medium
License API Kotlin Weekly

Demo Image

Usage

  var pandaState by remember { mutableStateOf(false) }

 Panda(modifier = Modifier,
       pandaState = pandaState,
       backgroundColor = Color.Gray,
       content = {modifier -> Text(modifier = modifier.background(Color.LightGray).padding(12.dp),
            text = "Click - Tooltip Bottom")},
       tooltipContent = {
            Text(modifier = Modifier.padding(horizontal = 12.dp)
                      .padding(vertical = 8.dp),
                 text = "Tooltip Example",
                 style = TextStyle(
                              fontSize = 16.sp,
                              lineHeight = 18.sp,
                              fontWeight = FontWeight.Medium,
                              color = Color.White)
                         )
        },
        onDismissRequest = {pandaState = it}
)

Customize

  modifier -> Arrange your view
  pandaState -> Show tooltip
  backgroundColor -> Tooltip background color
  content -> The item where the tooltip will appear
  tooltipContent -> Tooltip content
  onDismissRequest -> Tooltip hide action

Download

Latest Version : 1.0.6 material3 is required.

Groovy

settings.gradle

maven { url 'https://jitpack.io' }

build.gradle

implementation 'androidx.compose.material3:material3:1.1.0'
implementation 'com.github.ridvanozcan:PandaTooltip:<latest-version>'
Kotlin DSL

settings.gradle

maven(url = "https://jitpack.io")

build.gradle

implementation("androidx.compose.material3:material3:1.1.0")
implementation("com.github.ridvanozcan:PandaTooltip:<latest-version>")

License

Copyright 2023 ridvanozcan.

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:https://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.

About

🐼 Customizable tooltips 🐼 Android Jetpack Compose

Resources

Stars

Watchers

Forks

Packages

 
 
 

Languages