Skip to content
项目

关于

React components styled after Al Sadu, the Bedouin weaving. Built on Vercel UI SDK, in English and Arabic.

网站与应用开发

这些数字如何统计

实测星标增长

24小时
0
7天
0
15天
0
1个月
正在收集历史

各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。

README.md

原文

Sadu السدو

React components styled after Al Sadu, the Bedouin weaving, and built on Vercel UI SDK. UI SDK handles keyboard, focus and ARIA. Sadu draws every control as woven cloth, with a wood beater, warp threads and eye marks.

Live catalogue: sadu-ui.pages.dev

Sadu components: a motif select, a calendar range, a rug on the loom and an Arabic dialog

All 56 components are live on the site. Each one has a page with a props playground, its states, its keyboard map, the source, and a zip download.

Catalogue cards for the rug, motif select, skeins and loom slider

Install a component

Components install through the shadcn registry. Each item brings the shared foundation (sadu-core) and any items it depends on.

npx shadcn@latest add https://sadu-ui.pages.dev/r/sadu-switch.json

The site lists every item, and https://sadu-ui.pages.dev/r/registry.json has the full index. Files land in components/sadu/. You need React 19 and @ui-sdk/react, which shadcn adds for you.

Import the stylesheet once, then use the component:

import "@/components/sadu/sadu.css"
import { SaduSwitch } from "@/components/sadu/sadu-switch"

export function Settings() {
  return <SaduSwitch defaultChecked>Dyed wool</SaduSwitch>
}

Set data-theme="day" or data-theme="tent" on the root element. Add dir="rtl" and lang="ar" to pages that read right to left; the components switch their built-in labels to Arabic from lang.

To use the components with a coding agent, open the site and copy the "Installation prompt" from the top bar.

Themes and Arabic

Day is wool in daylight. Tent is the goat-hair tent at night. Every component also works right to left, with Arabic copy.

Tent theme Arabic, right to left
Catalogue in the tent theme Masthead in Arabic, right to left

Calendar page with a woven range band across two weeks

Work on the repo

npm install
npm run dev        # http://localhost:5191
npm test           # unit tests (Vitest)
npm run test:e2e   # browser tests (Playwright, local Chrome)
npm run build
npm run social     # redraws docs/images/social-*.png from the dev server
  • src/sadu/ holds the components. Each one is <name>.tsx with styles in styles/<name>.css. The weave renderer, motifs, palette and shared parts sit beside them, and the tokens are in sadu.css.
  • src/gallery/ holds the demo for every component. The site reads its cards and captions from these files, so a demo change shows up on the site too.
  • src/site/ is the catalogue site.
  • social/ draws the social images from the real components.
  • scripts/build-registry.mjs writes the shadcn registry to public/r/ before every dev and build run.
  • docs/design/ has the design rules (DESIGN.md), the Arabic glossary (ARABIC.md), the design direction and the design review.

npm run deploy builds the site and publishes it to Cloudflare Pages. It runs only for the owner's Cloudflare account; see scripts/deploy.sh.

Sources

The motifs and vocabulary come from the Al Sadu Society and Sadu House in Kuwait, UNESCO's listing of Al Sadu weaving, and the work of Crichton and Canavan. The motif grids are drawn from published descriptions, not copied from pieces. The Arabic copy still needs review by a native Kuwaiti reader.

探索相关项目

加载中…