https://kotlinlang.org logo
#compose
Title
# compose
f

francisco

02/01/2023, 4:40 AM
Hello! I am trying to use
FilterChip
compose component from
material3
library. My design system calls for a chip with
12.dp
horizontal padding and
8.dp
vertical padding. I see that the component itself has a private function
ChipContent
which sets a private property for
paddingValues
which hard codes padding at
8.dp
I’ve tried setting padding values via
Modifier
property, but that sets padding outside the chip, not within the content. Is my only solution to rollout my own custom chip component? Is there a way to ask for a feature request for m3 to allow us to have our own custom padding?
i

Ian Lake

02/01/2023, 6:01 AM
The Material3 library should match the Material3 specs exactly: https://m3.material.io/components/chips/specs#97696cf5-a6e3-40fa-ba56-641b4bcaad50 There's purposefully no customization from the specs, so yep, you'd need to write your own if you want to specifically break the Material3 specs
f

francisco

02/01/2023, 4:15 PM
thank you!
4 Views