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

Zhelyazko Atanasov

02/07/2021, 2:52 PM
Hi all! We do have things like
TextField
and
BasicTextField
,
Text
and
BasicText
. But I can't seem to find the "Basic" version of a
Button
. That is - if I don't want to use the material buttons or library, is there a barebone composable for a button or I'd have to implement one myself?
👍 2
i

Ilias Zosimadis

02/07/2021, 3:28 PM
Hi! What is your use case that can't be accomplished using the material Button or a Surface?
k

Kirill Grouchnikov

02/07/2021, 3:31 PM
Material is a design system, not the design system. Plenty of use cases where apps on mobile or desktop don't want that particular design system.
☝🏻 4
z

Zhelyazko Atanasov

02/07/2021, 3:45 PM
I don't have a use case right now. I'm just preparing my Compose samples (for a talk I'll be doing for the local Android community) and I was wondering if there's something like a
BasicButton
🙂
👍 3
z

Zach Klippenstein (he/him) [MOD]

02/07/2021, 9:07 PM
Most components are simple enough you can make them from scratch, or just copy the material source and modify it. A button is basically a surface with some modifiers on it. The reason text fields have special versions is because text editing components are ridiculously complicated (I read somewhere that typically ~90% of a UI framework is just text editing logic) and it would be almost impossible to build working ones from scratch, and certainly unreasonable to expect app developers to do so for every app.
👍 2