百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
P

polaris-components

> 编程语言
开源

开源 集合由 Polaris(Shopify 的设计系统)构建的复制/粘贴组件

189 stars0 点赞2 次浏览
访问官网GitHub

工具介绍

开源 集合由 Polaris(Shopify 的设计系统)构建的复制/粘贴组件

Polaris Components

A collection of components for Shopify app developers, based on the Polaris UI library & design system

Quick Links

  • Contributing Guide - Complete guide for contributors
  • Quick Start - Get your first component running in 5 minutes
  • Development Workflow - Daily development processes
  • Migration Guide - Understanding the architecture

What's Inside

This repository contains a collection of reusable Polaris components that you can copy and use in your Shopify app. Each component:

  • ✅ Built with official Shopify Polaris components
  • ✅ Follows Polaris design guidelines
  • ✅ Ready to copy/paste into your project
  • ✅ Includes working examples
  • ✅ Displays actual source code

For Contributors

Want to add your own component? It's easy!

Quick Setup

bash
# 1. Fork and clone
git clone https://github.com/YOUR-USERNAME/polaris-components.git
cd polaris-components

# 2. Install and run
yarn install
yarn dev

# 3. Create your component
# See QUICKSTART.md for step-by-step guide

Development Workflow

  1. Create component files in /components/library/YourComponent/
  2. Add tabs.config.json listing files to display
  3. Run yarn generate-tabs to generate code display
  4. Add to navigation in Layout.tsx
  5. Test and submit PR!

See CONTRIBUTING.md for detailed instructions.

️ Project Structure

components/
└── library/
    └── ComponentName/
        ├── Preview/
        │   ├── ComponentName.jsx    # Component implementation
        │   ├── Example.jsx           # Usage example
        │   └── index.ts              # Exports
        ├── tabs.config.json          # Config for code display
        └── index.ts                  # Main exports

️ Key Commands

bash
yarn dev              # Start development server
yarn build            # Build for production
yarn generate-tabs    # Generate code display tabs
yarn lint            # Run ESLint

Documentation

Components are stored under /components/library. Each component has:

  • Preview: The rendered component example
  • Code Tabs: Actual source code files (auto-generated)
  • Copy Button: One-click copy to clipboard

Auto-Generated Code Display

This project uses an automated system for displaying code:

  1. Create tabs.config.json listing files to show
  2. Run yarn generate-tabs to read files and generate display code
  3. Code tabs automatically show your actual component source

No manual copy/paste or string duplication needed!

Component Guidelines

Components should:

  • Use Polaris components primarily
  • Follow Polaris design patterns
  • Be copy/paste friendly (prefer inline styles)
  • Include clear usage examples
  • Work standalone in other projects

See CONTRIBUTING.md for full guidelines.

Contributing

Contributions are welcome! Please read our contributing guide to get started.

Before submitting a PR:

  • Component follows Polaris guidelines
  • yarn generate-tabs runs successfully
  • Component added to navigation
  • Tested in browser
  • Code tested by copying to fresh Polaris project
  • yarn build succeeds

Resources

  • Polaris Documentation
  • Polaris Design Guidelines
  • Polaris Components
  • Polaris Icons

Issues & Support

  • Bug reports: GitHub Issues
  • Questions: GitHub Discussions
  • Twitter/X: @devwithalex

License

Licensed under the MIT license.

Contributors

Thanks to all our contributors! See component pages for individual contributor credits.

Want to be listed here? Contribute a component!


Made with ❤️ for the Shopify developer community

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

TypeScript

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言