Re: [kivy-users] Re: how to change TextInput border color

Skip to first unread message
Message has been deleted
Message has been deleted

Apr 1, 2024, 10:17:33 AMApr 1
to Kivy users support
The box drawn is an image.  The image is set by the attribute 'background_active'.  You could change the image when focus is True, or use the canvas to draw a Line around the TextInput and change the color.

Here is an example:

from import App
from kivy.lang import Builder
from kivy.uix.textinput import TextInput
from import ColorProperty

kv = """
            rgba: self.focus_color if self.focus else (0, 0, 0, 0)
            rectangle: (*self.pos, *self.size)
            width: dp(2)

        size_hint: None, None
        size: '200dp', '30dp'
        focus_color: 'lightgreen'

class OutlineTextInput(TextInput):
    focus_color = ColorProperty('green')

class OutlineTextInputApp(App):
    def build(self):
        return Builder.load_string(kv)


From: <> on behalf of Anton Chivchalov <>
Sent: Monday, April 1, 2024 3:26 AM
To: Kivy users support <>
Subject: [kivy-users] Re: how to change TextInput border color
I mean when it's focused. 

понедельник, 1 апреля 2024 г. в 13:24:59 UTC+3, Anton Chivchalov:
Hi, how does one change the color of the border of TextInput? It's always blue-green (teal). It looks like the official docs on TextInput are silent on it.


You received this message because you are subscribed to the Google Groups "Kivy users support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit
Reply all
Reply to author
0 new messages