lxsmnsyc/terracotta
소개
SolidJS용 헤드리스 UI
웹 및 앱 개발측정된 스타 증가
- in 24h
- 0
- in 7 days
- -1
- in 15 days
- -1
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
OriginalTerracotta
Headless UI components for SolidJS. Terracotta handles state, keyboard
interaction, focus and ARIA wiring. It adds no styles and no class names.
Component state reaches your CSS through tc- attributes.
The components follow the WAI-ARIA Authoring Practices.
Install
pnpm add terracotta
# or
npm i terracotta
# or
yarn add terracotta
Terracotta 2 targets Solid 2 (^2.0.0). solid-js and @solidjs/web are peer
dependencies. For Solid 1, install terracotta@1 from the
1.x branch.
Usage
Every component has its own entry point and is built from parts you compose:
import { Disclosure, DisclosureButton, DisclosurePanel } from 'terracotta/disclosure';
function Details() {
return (
<Disclosure defaultOpen={false}>
<DisclosureButton class="trigger">Details</DisclosureButton>
<DisclosurePanel class="panel">Everything worth knowing.</DisclosurePanel>
</Disclosure>
);
}
Style it by selecting on state:
.trigger[tc-expanded] {
font-weight: 600;
}
Documentation
- Getting started
- Guides: rendering, state, styling, keyboard and focus, server-side rendering
- State primitives
Components
Claude Code plugin
The repository is also a Claude Code plugin marketplace. Its skill teaches an agent the component parts, imports, state and styling attributes:
/plugin marketplace add lxsmnsyc/terracotta
/plugin install terracotta@terracotta
Development
The documentation site in docs/ uses the library from the
workspace, so build the library first:
pnpm install
pnpm --filter terracotta build
pnpm --filter @terracotta/docs dev
FAQ
Is this the official Headless UI for SolidJS?
No. Terracotta started as a port of Headless UI, but it is not an official port, and it has since grown to cover the WAI-ARIA widgets that Headless UI does not.
Is it API-compatible with Headless UI?
No. SolidJS and React work differently, so the component APIs differ, and some Headless UI features have no equivalent here.
License
MIT © lxsmnsyc
관련 프로젝트 살펴보기
불러오는 중…