Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Jetpack Compose + design systems
Search
François Blavoet
May 03, 2022
Programming
450
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Jetpack Compose + design systems
François Blavoet
May 03, 2022
More Decks by François Blavoet
See All by François Blavoet
Accessibility made Easy
francois_blavoet
0
130
Vectorial Victories - Android Makers 2018 - Paris
francois_blavoet
0
840
New York Accessibility Hackathon - Accessibility on Android
francois_blavoet
1
130
SVG
francois_blavoet
0
130
And then my phone became smarter - A journey into the Awareness API - MobileEra 2016
francois_blavoet
0
740
And then my phone became smarter - A journey into the Awareness API
francois_blavoet
2
1.5k
Let's Sprinkle some #PerfMatters on your ViewGroups - Droidcon Turin 2016
francois_blavoet
10
1.6k
Let's Sprinkle some #PerfMatters on your ViewGroups - Droidcon Paris 2015
francois_blavoet
13
1.7k
Other Decks in Programming
See All in Programming
高専キャリア LT 発表内容
crysta1221
6
5.5k
AIの中の人になってみる
htkym
0
160
20260828_品質と開発生産性を両立させる、AI時代のE2Eテストの考え方
magicpod
0
140
Building an Out-of-Order CPU
latte72
0
660
高専、大学編入、そして未踏へ〜プロダクト開発とキャリアの歩み - Technical College, University Transfer, and On to “Mitou” / My Journey in Product Development and Career
pkmiya
0
130
FDEとは、何者なのか?
masapyon1212
0
140
{ Android | Kotlin } Gradle Plugin in 2026
ryunen344
1
280
Discordを用いたラボオートメーション関連情報収集の自動化
noguhiro2002
0
500
PyO3 で既存 Python 評価器を Rust core 化する ー wasm-bindgen でブラウザにも配るための設計
kdash
1
360
MySQLとPostgreSQLって何が違うの?
akagami
PRO
0
160
Kiroで創り、AgentCoreで繋ぐ!AWSで実践する「AI-DLC」から「AIエージェント統合」までの最新地図
licux
2
300
iOS開発×AI駆動開発 〜最近使って便利だったスキルの話〜
nogu66
0
140
Featured
See All Featured
How STYLIGHT went responsive
nonsquared
100
6.3k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.6k
Prompt Engineering for Job Search
mfonobong
0
440
GitHub's CSS Performance
jonrohan
1033
470k
Documentation Writing (for coders)
carmenintech
77
5.5k
Game over? The fight for quality and originality in the time of robots
wayneb77
1
260
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
240
Building Flexible Design Systems
yeseniaperezcruz
330
41k
New Earth Scene 8
popppiees
3
2.5k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
1k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
990
Designing Experiences People Love
moore
143
24k
Transcript
Jetpack Compose + Design Systems François Blavoet
Jetpack Compose • Compose is the future of Android UI
development • When is the best time to start adopting it ?
Design systems What is a Design system ? -> it
is a complete set of standards intended to manage design at scale using reusable components and patterns.
Design systems @GET("/addresses") fun getAddresses(): Single<GetAddressesResponse> @PUT("/addresses/{address_id}") fun updateAddress(@Path("address_id") id:
String, @Body body: Map<String, Any>): Single<AddressResponse>
Let’s have a look at one component
Let’s have a look at one component
Let’s have a look at one component
Let’s have a look at one component
Let’s have a look at one component Row.Content { leading(
label = "Order Changes Preferences", label2 = "Suggest replacements ...", ) trailing( label = "Edit", option = Row.TrailingOption.Clickable(onPreferenceClick) ) }
Let’s have a look at one component Row.Content { leading(
label = "Tue Jun 2, 4–5pm", option = LeadingOption.Icon(Icon.Time), ) }
One design system
Material Design
Material Design Button( onClick: () -> Unit, modifier: Modifier =
Modifier, enabled: Boolean = true, interactionSource: MutableInteractionSource = remember {..}, elevation: ButtonElevation? = ButtonDefaults.elevation(), shape: Shape = MaterialTheme.shapes.small, border: BorderStroke? = null, colors: ButtonColors = ButtonDefaults.buttonColors(), contentPadding: PaddingValues = ButtonDefaults.ContentPadding, content: @Composable RowScope.() -> Unit, )
Material Design?
Material Design? ?
None
Let’s implement our own system
Atoms
Atoms Requirements: • Day/night • Customizable for white label apps
• As easy to use as possible • Have an abstract representation outside of the composition
Atoms interface ColorSpec { @Composable fun value(): Color }
Atoms interface ColorSpec { @Composable fun value(): Color companion object
{ val SystemGrayscale70: ColorSpec = … val SystemGrayscale50: ColorSpec = … … } }
Atoms interface ColorSpec { @Composable fun value(): Color companion object
{ val SystemGrayscale70: ColorSpec = … val SystemGrayscale50: ColorSpec = … … fun fromColor(color: Color): ColorSpec { return StaticColor(color) } } }
Atoms @Composable fun DesignTheme( configuration: ThemeConfig? = null, content: @Composable
() -> Unit, ) { … } object DesignTheme { val colors: Colors @Composable @ReadOnlyComposable get() = LocalColors.current }
Atoms
Atoms interface IconSlot { @Composable fun Content(contentColor: Color) }
Atoms interface IconSlot { @Composable fun Content(contentColor: Color) companion object
{ fun fromResource( @DrawableRes res: Int, contentDescription: TextSpec?, ): IconSlot { return ResIcon(res, contentDescription) } } }
Atoms enum class Icons(@DrawableRes internal val resId: Int) : IconSlot
{ Accessibility(R.drawable.cp_accessibility), Account(R.drawable.cp_account), Add(R.drawable.cp_add), … }
Molecules
Molecules data class PillSpec( val label: TextSpec, val onClick: (()
-> Unit)?, val selected: Boolean = false, ) @Composable fun Pill( spec: PillSpec, modifier: Modifier = Modifier, )
Molecules data class PillSpec( val label: TextSpec, val onClick: (()
-> Unit)?, val selected: Boolean = false, ) @Composable fun Pill( spec: PillSpec, modifier: Modifier = Modifier, ) @Composable fun BasePill( selected: Boolean, onClick: (() -> Unit)?, modifier: Modifier = Modifier, … content: @Composable BoxScope.(contentColor: Color) -> Unit, )
Going Further import androidx.compose.material.Text @Composable fun Text( text: AnnotatedString, modifier:
Modifier = Modifier, style: TextStyle = LocalTextStyle.current, … ) {
Going Further import com.instacart.compote.foundation.Text @Composable fun Text( text: RichTextSpec, modifier:
Modifier = Modifier, style: TextStyle = TextStyleSpec.Default, … )
33
Thank you! François Blavoet