Skip to content

Commit ab02d44

Browse files
committed
1.0.7 release
Update dependencies
1 parent 2a7a08f commit ab02d44

10 files changed

Lines changed: 597 additions & 247 deletions

File tree

README.md

Lines changed: 115 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,21 @@
1111

1212
# Showcase Layout Compose
1313

14-
Create a beautiful animated showcase effect for your compose UIs easily !
14+
Create beautiful animated showcase effects for your compose UIs easily!
1515

16-
**Now with multiplatform support :D**
16+
**Now with multiplatform support and two different showcase layouts to choose from:**
17+
- **ShowcaseLayout**: Classic full-screen overlay with cutouts
18+
- **TargetShowcaseLayout**: Modern targeted highlighting with customizable shapes
1719

1820
## Web demo
1921
[Click here](https://tahaak67.github.io/ShowcaseLayoutCompose/index.html) to try showcase layout for web in your browser!
2022

2123
## Demo
2224

23-
<img src="metadata/gif/slc-light.gif" alt="Library demo GIF" width="300" />
25+
| ShowcaseLayout |
26+
|:---------------------------------------------------------------------------:|
27+
| <img src="metadata/gif/slc-light.gif" alt="Library demo GIF" width="300" /> |
28+
2429

2530
<img src="metadata/screenshots/screenshot-13.png" alt="Library demo GIF" width="300" />.<img src="metadata/screenshots/screenshot-14.png" alt="Library demo GIF" width="300" />
2631

@@ -76,7 +81,10 @@ Text(
7681
modifier = Modifier.showcase(
7782
// should start with 1 and increment with 1 for each time you use Modifier.showcase()
7883
index = 1,
79-
message =
84+
message = ShowcaseMsg(
85+
"This is a showcase message",
86+
textStyle = TextStyle(color = Color.White)
87+
)
8088
),
8189
text = "ShowcaseLayout Test 1"
8290
)
@@ -125,7 +133,96 @@ similarly you can show a greeting using <code>showGreeting</code> and passing th
125133
</details>
126134

127135

128-
Done, our text is now showcased!, customize it further with Additional parameters
136+
Done, our text is now showcased!, customize it further with Additional parameters.
137+
138+
## TargetShowcaseLayout (New!)
139+
140+
Starting from version 1.0.6, Showcase Layout Compose now offers a new layout option: `TargetShowcaseLayout`. This layout provides a different visual approach to showcasing UI elements by highlighting specific targets with customizable shapes rather than the full-screen approach of the original ShowcaseLayout.
141+
142+
### Key Features
143+
144+
- Highlights target elements with customizable shapes (circle, rectangle, or rounded rectangle)
145+
- Smooth animations between targets
146+
- Pulsing effect around the target for better visibility
147+
- All the same customization options as the original ShowcaseLayout
148+
149+
### Usage
150+
151+
You can use TargetShowcaseLayout directly:
152+
153+
```kotlin
154+
var isShowcasing by remember { mutableStateOf(true) }
155+
156+
TargetShowcaseLayout(
157+
isShowcasing = isShowcasing,
158+
onFinish = { isShowcasing = false },
159+
targetShape = TargetShape.ROUNDED_RECTANGLE, // CIRCLE, RECTANGLE, or ROUNDED_RECTANGLE
160+
cornerRadius = 8.dp, // Only used with ROUNDED_RECTANGLE
161+
animateToNextTarget = true, // Smooth animation between targets
162+
greeting = ShowcaseMsg(
163+
"Welcome to TargetShowcaseLayout!",
164+
textStyle = TextStyle(color = Color.White)
165+
)
166+
) {
167+
// Your UI content here
168+
Column {
169+
Text(
170+
modifier = Modifier.showcase(
171+
index = 1,
172+
message = ShowcaseMsg(
173+
"This element is highlighted with TargetShowcaseLayout",
174+
textStyle = TextStyle(color = Color.White)
175+
)
176+
),
177+
text = "Target Showcase Example"
178+
)
179+
}
180+
}
181+
```
182+
183+
| TargetShowcaseLayout with CIRCLE shape | TargetShowcaseLayout with RECTANGLE shape | TargetShowcaseLayout with ROUNDED_RECTANGLE shape |
184+
|:------------------------------------------------------------------------------------------------:|:--------------------------------------------------------------------------------------------:|:------------------------------------------------------------------------------------------------------:|
185+
| ![screenshot-targetshocase-circle.png](metadata/screenshots/screenshot-targetshocase-circle.png) | ![screenshot-targetshocase-rect.png](metadata/screenshots/screenshot-targetshocase-rect.png) | ![screenshot-targetshocase-roundrect.png](metadata/screenshots/screenshot-targetshocase-roundrect.png) |
186+
187+
### TargetShowcaseLayout vs ShowcaseLayout
188+
189+
| Feature | TargetShowcaseLayout | ShowcaseLayout |
190+
|---------|---------------------|----------------|
191+
| Visual style | Highlights specific targets with shapes | Full-screen overlay with cutouts |
192+
| Target shapes | Circle, Rectangle, Rounded Rectangle | Circle, Rectangle, Rounded Rectangle |
193+
| Animations | Smooth transitions between targets | Fade transitions |
194+
| Pulsing effect | Yes | No |
195+
| Use cases | Focused UI tours, precise element highlighting | General app tours, feature introductions |
196+
197+
### TargetShowcaseLayout Parameters
198+
199+
In addition to the parameters shared with ShowcaseLayout, TargetShowcaseLayout offers:
200+
201+
```kotlin
202+
TargetShowcaseLayout(
203+
// Common parameters (same as ShowcaseLayout)
204+
isShowcasing = isShowcasing,
205+
isDarkLayout = false,
206+
initIndex = 0,
207+
animationDuration = 1000,
208+
onFinish = { isShowcasing = false },
209+
greeting = ShowcaseMsg(
210+
"Welcome to TargetShowcaseLayout!",
211+
textStyle = TextStyle(color = Color.White)
212+
),
213+
lineThickness = 5.dp,
214+
215+
// TargetShowcaseLayout specific parameters
216+
targetShape = TargetShape.CIRCLE, // CIRCLE, RECTANGLE, or ROUNDED_RECTANGLE
217+
cornerRadius = 8.dp, // Only used with ROUNDED_RECTANGLE
218+
animateToNextTarget = true // Smooth animation between targets, otherwise shrink and expand on each target
219+
) {
220+
// Your UI content here
221+
}
222+
```
223+
224+
225+
<!-- SCREENSHOT PLACEHOLDER: Add a side-by-side comparison of the same UI with both layouts -->
129226

130227
#### Additional parameters
131228

@@ -297,11 +394,20 @@ In recent releases logs have been disabled by default, to print log statement of
297394
```
298395

299396

300-
## Complete Example
397+
## Complete Examples
398+
399+
### ShowcaseLayout Example
400+
For a complete example of the original ShowcaseLayout, check out [MainScreen.kt](https://github.com/tahaak67/ShowcaseLayoutCompose/blob/main/app/src/main/java/ly/com/tahaben/showcaselayoutcompose/ui/MainScreen.kt).
401+
402+
### TargetShowcaseLayout Example
403+
For an example of the new TargetShowcaseLayout, check out the [App.kt](https://github.com/tahaak67/ShowcaseLayoutCompose/blob/main/composeApp/src/commonMain/kotlin/App.kt) file in the composeApp module.
404+
405+
You can also clone/download this repository and run the demo app to see both layouts in action.
406+
301407

302-
For a complete example check
303-
out [MainScreen.kt](https://github.com/tahaak67/ShowcaseLayoutCompose/blob/main/app/src/main/java/ly/com/tahaben/showcaselayoutcompose/ui/MainScreen.kt) \
304-
or clone/download this repository and check the app module.
408+
| Comparison of both layouts |
409+
|:-------:|
410+
| [Add your comparison screenshot path here] |
305411

306412
## Contributing
307413

0 commit comments

Comments
 (0)