Skip to content

feat(elements): add Lit-based Web Components package#1730

Draft
te6-in wants to merge 1 commit into
devfrom
feat/web-components
Draft

feat(elements): add Lit-based Web Components package#1730
te6-in wants to merge 1 commit into
devfrom
feat/web-components

Conversation

@te6-in

@te6-in te6-in commented Jun 24, 2026

Copy link
Copy Markdown
Member

No description provided.

Add @seed-design/elements, a Light DOM Lit components layer that reuses
@seed-design/css recipes — components only emit classNames and the CSS is
loaded globally by the consumer, the same separation @seed-design/react
uses with css as a peer dependency. recipe modules' self CSS imports mean
each component pulls only its own CSS (no all.css).

Components (Wave 0-2): ActionButton, Badge, Checkbox, RadioGroup (+Radio),
SegmentedControl (+Item), Skeleton, Switch, Text, TextField.

Patterns: presentational (host class), interactive (inner native button),
composite form via ElementInternals, and cross-element group (parent owns
selection; SegmentedControl positions its indicator with --segment-index/
--segment-count CSS vars).

White-label icon strategy: the package ships no concrete icon/i18n; the
checkmark is injected via a `checkedIcon` property. A layer-2 snippet dir
(demo/seed-design/ui) shows consumer-owned registration. Concrete-icon
injection is deferred until @karrotmarket/icon-data ships SVG files or web
components rather than raw strings.

Build: vite + rolldown, ESM, preserveModules, per-component define/* entries.
See WEB_COMPONENTS_PLAN.md for the full design and decisions.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@changeset-bot

changeset-bot Bot commented Jun 24, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: ba5e8f5

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai

coderabbitai Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 440150ae-75f5-4ef3-92b2-0c2472310b9b

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/web-components

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant