TailwindSQL
Like TailwindCSS, but for SQL.
className your way to database queries!
React Server ComponentsSQLiteZero Runtime
<DB className="db-users-name-where-id-1" />renders
Query error: no such table: users
Syntax Reference
db-{table}-{column}-where-{field}-{value}-limit-{n}-orderby-{field}-{asc|desc}db-tableThe table name
-columnColumns to select
-where-field-valueFilter condition
-limit-nLimit results
Interactive Playground
Type a TailwindSQL query and see results update in real-time
Try:
<DB className="" as=""/>Database Explorer
Browse tables and see sample data
More Examples
Different ways to query and render data with TailwindSQL
How to Use
import { DB, Join } from '@tailwind-stack/sql'// Simple query<DB className="db-users-name-where-id-1" />// With render format<DB className="db-products-title-limit-5" as="ul" />// With JOIN<DB className="db-users-name-limit-5" as="table"> <Join table="posts" on="id-author_id" select="title" /></DB>