BasecoatUI components for htmy.

Centered

Example:

Nice to see you!


Code example:

from htmy import ComponentType, html

from htmui.tailwind.centered import centered


def example() -> ComponentType:
    return centered(html.h3("Nice to see you!", class_="text-lg font-bold"))

Component implementation:

For more details, see the TailwindCSS documentation.

from htmy import ComponentType, html, join_classes

__version__ = "0.1.0"
__framework__ = "TailwindCSS"
__framework_version__ = "4"
__framework_url__ = "https://tailwindcss.com"


def centered(*children: ComponentType, class_: str | None = None) -> ComponentType:
    return html.div(
        *children,
        class_=join_classes("flex flex-col items-center justify-center", class_),
    )