| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Re-usable server-side components based on shadcn/ui. Built with JinjaX, Alpine.js, and Tailwind CSS, with support for htmx.
JinjaX is required.
# install jinjax
uvx add jinjaxYou can use the CLI directly without installing the package.
# Add components
uvx --from basic-components components add buttonYou 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.
Install only the utility functions for JinjaX and tailwind.
# With utility functions
uv add "basic-components[utils]"Setup instructions and examples:
Use components directly in your templates, similar to React. Use Tailwind CSS classes for styles, htmx friendly also!
<!-- 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.
Visit https://components.basicmachines.co to view the documentation.
Please read the contributing guide.
Licensed under the MIT license.
19/48
Extended
| Back | FazBrowse Home | New Git URL |