Skip to main content

Air + BasecoatUI + TailwindCSS made easy.

Project description

AirDragon

Air + BasecoatUI + TailwindCSS made easy.

AirDragon combines the capabilities of Air with the simplicity of BasecoatUI and the deep power of Tailwind, allowing developers to create stunning user interfaces with ease. Whether you're building web applications, mobile apps, or desktop software, AirDragon provides the tools you need to bring your vision to life.

Mandate

  1. Provide a simple way to use BasecoatUI and Tailwind with Air.
  2. Offer pre-built components and layouts that leverage BasecoatUI's design principles.
  3. Ensure seamless integration with Air's existing features and functionalities and design theme.
  4. No need to learn any Tailwind classes, just use AirDragon components.
  5. Make it easy to customize and extend the components to fit specific project needs.

Installation

To install AirDragon's Python component, run the following command in your terminal:

uv add airdragon

AirDragon with a Jinja base template

AirDragon's layout() function handles the JS dependencies for you, but if you need to include them in Jinja, use the following HTML snippets:

<!-- Jinja base template, for Air Tags use airdragon.layout() -->
<!doctype html>
<html>
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/basecoat-css@0.3.6/dist/basecoat.cdn.min.css">
    <script src="https://cdn.jsdelivr.net/npm/basecoat-css@0.3.6/dist/js/all.min.js" defer></script>
    <script src="https://unpkg.com/lucide@latest"></script>    
    <script src="https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4"></script>
  </head>
  <body>
    <!-- Your content goes here -->
  </body>
</html>

Usage

To use AirDragon in your Air application, simply import the airdragon module and use the provided components and layout function. Here's a basic example:

import air
import airdragon as ad

app = air.Air()

@app.page
def index():
    return ad.layout(
        # Adding a class_ to an AirDragon tag appends it to the list of
        # tailwind classes applied to that tag by AirDragon.
        # So this will be 
        # <h1 class="text-3xl sm:text-4xl font-semibold leading-tight Dragons">
        ad.H1('Hello, world', class_='Dragons'),
        ad.Card(
            air.Header(
                air.H2('Card title'),
                air.P('I am a handy paragraph.')
            ),
            air.Section(
                ad.ButtonGroup(
                    ad.Button('Click me'),
                    ad.Button("Don't click me", modifier=ad.ButtonMods.destructive)
                )
            )
        )        
    )

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

airdragon-0.2.0.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

airdragon-0.2.0-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file airdragon-0.2.0.tar.gz.

File metadata

  • Download URL: airdragon-0.2.0.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.12 {"installer":{"name":"uv","version":"0.9.12"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for airdragon-0.2.0.tar.gz
Algorithm Hash digest
SHA256 74a469e11bdc414ff89aa5e9f561035deb03cb9b5fa47df91c3b0f9dbcbf2a2d
MD5 c5ebe4cbfb3f280c9c64d80a06377e8e
BLAKE2b-256 d3a07f8cf36e09f6811f9cd0ab34378a4aea8c5c4fa01c792e884a1ec57b4e86

See more details on using hashes here.

File details

Details for the file airdragon-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: airdragon-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 4.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.12 {"installer":{"name":"uv","version":"0.9.12"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for airdragon-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6580255dbe02833855e3ffeccebce5588e0c9ccbac532682dc84c7402f05859a
MD5 aee346c2476643e8a5f13c31db04cb99
BLAKE2b-256 d1494080685adf6ab10d97cd128fe2b7417d26de4e35f93e4169b1b1b2f8a127

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page