https://github.com/basicmachines-co/basic-components

Server-side components for your Python web framework that you can copy and paste into your apps, based on shadcn/ui. Made with JinjaX, htmx, Alpine.js and Tailwind CSS. Open source.

https://github.com/basicmachines-co/basic-components

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (14.6%) to scientific vocabulary

Keywords

alpine-js components django fastapi flask htmx jinja jinjax python server-side-rendering tailwind-css
Last synced: 5 months ago · JSON representation

Repository

Server-side components for your Python web framework that you can copy and paste into your apps, based on shadcn/ui. Made with JinjaX, htmx, Alpine.js and Tailwind CSS. Open source.

Basic Info
Statistics
  • Stars: 33
  • Watchers: 3
  • Forks: 1
  • Open Issues: 4
  • Releases: 0
Topics
alpine-js components django fastapi flask htmx jinja jinjax python server-side-rendering tailwind-css
Created over 1 year ago · Last pushed over 1 year ago
Metadata Files
Readme Changelog License

README.md

basic-components

Re-usable server-side components based on shadcn/ui. Built with JinjaX, Alpine.js, and Tailwind CSS, with support for htmx.

Installation & Usage

demo

Quick Start with uvx

JinjaX is required.

```bash

install jinjax

uvx add jinjax ````

You can use the CLI directly without installing the package.

```bash

Add components

uvx --from basic-components components add button ```

You will also need to configure your project to load components into the jinjax.Catalog and add a global cn function to the Jinja environment. See utilities.

Helpers for these are packed in the basic-components[utils] package.

Package Installation Options

Install only the utility functions for JinjaX and tailwind.

```bash

With utility functions

uv add "basic-components[utils]" ```

Setup instructions and examples: - FastAPI - Flask - Django

Example

Use components directly in your templates, similar to React. Use Tailwind CSS classes for styles, htmx friendly also!

html <!-- Card component example --> <Card className="w-[350px] mb-4"> <CardHeader className="pb-3"> <CardTitle>Components!</CardTitle> <CardDescription className="max-w-lg text-balance leading-relaxed"> Using components is fun. </CardDescription> </CardHeader> <CardContent> The button below is enabled with htmx. Click to update it. </CardContent> <CardFooter> <!-- use htmx --> <Button variant="outline" hx-get="/button" hx-trigger="click" hx-target="this" hx-swap="outerHTML">htmx is enabled</Button> </CardFooter> </Card> </div>

Components are rendered on the server via JinjaX (a Jinja component library) and returned as html for the browser.

demo

Installation Groups

  • utils: Utility functions for JinjaX setup and cn() tailwind class helper
  • docs: Requirements for the docs site
  • dev: Development tools for contributing
  • full: All features included

Documentation

Visit https://components.basicmachines.co to view the documentation.

Contributing

Please read the contributing guide.

License

Licensed under the MIT license.

Components

19/48

  • [x] accordion
  • [x] alert
  • [x] alert-dialog
  • [ ] aspect-ratio
  • [ ] avatar
  • [x] badge
  • [ ] breadcrumb
  • [x] button
  • [ ] calendar
  • [x] card
  • [ ] carousel
  • [ ] chart
  • [x] checkbox
  • [ ] collapsible
  • [ ] command
  • [ ] context-menu
  • [x] dialog
  • [ ] drawer
  • [x] dropdown-menu
  • [x] form
  • [ ] hover-card
  • [ ] input-otp
  • [x] input
  • [x] label
  • [x] link
  • [ ] menubar
  • [ ] navigation-menu
  • [ ] pagination
  • [x] popover
  • [ ] progress
  • [x] radio-group
  • [ ] resizable
  • [ ] scroll-area
  • [x] select
  • [ ] separator
  • [x] sheet
  • [ ] sidebar
  • [ ] skeleton
  • [ ] slider
  • [ ] sonner
  • [ ] switch
  • [x] table
  • [x] tabs
  • [x] textarea
  • [x] toast
  • [ ] toaster
  • [ ] toggle-group
  • [ ] toggle
  • [ ] tooltip

Extended - [ ] Prose

Owner

  • Name: basicmachines-co
  • Login: basicmachines-co
  • Kind: organization

GitHub Events

Total
  • Create event: 12
  • Release event: 11
  • Issues event: 8
  • Watch event: 33
  • Delete event: 3
  • Issue comment event: 2
  • Push event: 140
  • Pull request event: 7
  • Fork event: 3
Last Year
  • Create event: 12
  • Release event: 11
  • Issues event: 8
  • Watch event: 33
  • Delete event: 3
  • Issue comment event: 2
  • Push event: 140
  • Pull request event: 7
  • Fork event: 3

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 6
  • Total pull requests: 4
  • Average time to close issues: 2 days
  • Average time to close pull requests: about 11 hours
  • Total issue authors: 2
  • Total pull request authors: 1
  • Average comments per issue: 0.33
  • Average comments per pull request: 0.0
  • Merged pull requests: 4
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 6
  • Pull requests: 4
  • Average time to close issues: 2 days
  • Average time to close pull requests: about 11 hours
  • Issue authors: 2
  • Pull request authors: 1
  • Average comments per issue: 0.33
  • Average comments per pull request: 0.0
  • Merged pull requests: 4
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • phernandez (5)
  • Hybridhash (1)
Pull Request Authors
  • phernandez (8)
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 25 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 4
  • Total maintainers: 1
pypi.org: basic-components

Re-usable server-side components based on shadcn/ui with JinjaX, Alpine.js and Tailwind CSS

  • Versions: 4
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 25 Last month
Rankings
Dependent packages count: 10.0%
Average: 33.3%
Dependent repos count: 56.5%
Maintainers (1)
Last synced: 6 months ago