Token导航 LogoToken导航

Agent Skill · 前端设计

bootstrap-components(引导组件)

用于辅助前端页面、组件、样式和交互逻辑的开发与维护。它适合让 Agent 生成或审查 React、Next.js、Vue、Tailwind、CSS 等相关代码,整理组件结构,或定位布局和性能问题。使用时需要结合项目现有设计系统、路由和构建方式,避免只生成孤立片段;涉及页面改动时,应配合本地预览和构建检查确认视觉效果。

bootstrap-components 是前端设计类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为需要联网;许可证为 MIT,第三方扫描已通过,按安装量在前端设计类的 10,216 个 Skill 里排第 3,238。

总安装 1,458周安装 59GitHub Stars 4下载 458核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
MIT

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:bootstrap-components(引导组件)
来源仓库:https://github.com/sjnims/bootstrap-expert
仓库路径:skills/bootstrap-components
安装命令:
npx skills add https://github.com/sjnims/bootstrap-expert --skill bootstrap-components
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/sjnims/bootstrap-expert --skill bootstrap-components

这个 Skill 是做什么的

前端设计类 Skill 关注页面结构、视觉规范和组件写法,输出通常是可运行的界面代码。

提供 Bootstrap 5.3 组件完整指南,包含 JavaScript 初始化要求。覆盖模态框、轮播图、提示框等常用组件的使用模式。支持可访问性最佳实践和响应式设计原则。安装方式:通过 npx 从 GitHub 仓库添加,适用于 Codex、Claude、Cursor、Gemini CLI。

注意:部分组件需要显式初始化,确保功能正常运作。

来源仓库内路径:skills/bootstrap-components

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/sjnims/bootstrap-expert --skill bootstrap-comp…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要需要联网,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

bootstrap-components 怎么安装?

在终端执行 npx skills add https://github.com/sjnims/bootstrap-expert --skill bootstrap-components。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

bootstrap-components 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

bootstrap-components 需要什么权限?

权限级别是需要联网。该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

bootstrap-components 是免费的吗?

来源标注的许可证是 MIT。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

bootstrap-components 用的人多吗?

公开数据是累计安装 1,458 次,近一周安装 59 次,下载 458 次,GitHub 4 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

bootstrap-components 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 3 个目录同时收录,说明这个 Skill 流传比较广。
  • 许可证明确为 MIT,商用和分发边界好判断。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理前端设计类任务、又不想每次都手写提示词的人。
  • 需要许可证清楚、并且有第三方扫描结果的团队项目。

不太适合

  • 需要厂商级技术支持和 SLA 的生产系统。

前端设计类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
frontend-design

前端设计 · Codex、Claude

8,823,360126,072只读MIT通过
vercel-composition-patterns

Vercel 组合模式 · Codex、Claude

3,858,81625,893需要联网MIT通过
vercel-react-native-skills

Vercel React native skills 前端 · Codex、Claude

2,468,66425,878只读MIT通过
adapt

adapt 搜索 · Codex、Claude

2,027,04023,125操作浏览器未明确通过
bolder

bolder 分析 · Codex、Claude

2,004,28823,130只读未明确通过
bootstrap-components

引导组件 · 本页

1,4584需要联网MIT通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Bootstrap 5.3 Components

Bootstrap provides ready-to-use UI components for building interfaces. This skill covers all major components with usage patterns, JavaScript initialization requirements, and accessibility best practices.

JavaScript Initialization Overview: Some components work purely with data attributes, while others require JavaScript initialization. Components marked with Requires JS below won't function without explicit initialization.

ComponentRequires JS InitData Attributes Only
TooltipYesNo
PopoverYesNo
ToastYes (to show)No
ScrollspyOptionalYes
ModalOptionalYes
CarouselOptionalYes
CollapseOptionalYes
DropdownOptionalYes

Interactive Components

These components require or benefit from JavaScript. See references/interactive-components.md for detailed code examples, JavaScript APIs, and accessibility guidance.

Accordion

Collapsible content panels that show one section at a time. Use .accordion wrapper with .accordion-item children containing .accordion-header and .accordion-collapse. Remove data-bs-parent to allow multiple panels open simultaneously. Use .accordion-flush for borderless variant.

Carousel

Image slideshow with optional controls and indicators. Use .carousel.slide wrapper with .carousel-inner containing .carousel-item slides. Add .carousel-control-prev/.carousel-control-next for navigation. Use data-bs-ride="carousel" for autoplay. Respects prefers-reduced-motion automatically.

Collapse

Toggle content visibility with smooth animations. Use data-bs-toggle="collapse" on trigger with data-bs-target pointing to .collapse element. Use .collapse-horizontal for width-based collapse. Target multiple elements with class selector (.multi-collapse).

Dropdowns

Toggleable contextual menus for links and actions. Use .dropdown wrapper with .dropdown-toggle button and .dropdown-menu list. Direction variants: .dropup, .dropend, .dropstart. Add .dropdown-menu-dark for dark theme. Keyboard navigation is built-in.

Modal

Dialog boxes that overlay the page and trap focus. Use data-bs-toggle="modal" with data-bs-target pointing to .modal element. Sizes: .modal-sm, .modal-lg, .modal-xl. Modifiers: .modal-dialog-centered, .modal-dialog-scrollable. Use data-bs-backdrop="static" to prevent dismiss on outside click.

Offcanvas

Hidden sidebars that slide from viewport edge. Positions: .offcanvas-start (left), .offcanvas-end (right), .offcanvas-top, .offcanvas-bottom. Use data-bs-scroll="true" to allow body scrolling. Use data-bs-backdrop="static" for persistent sidebars.

Popovers

Requires JS init and Popper.js. Rich overlay content triggered by click or hover. Use data-bs-toggle="popover" with data-bs-title and data-bs-content. Initialize with new bootstrap.Popover(el) or batch initialize all: document.querySelectorAll('[data-bs-toggle="popover"]').forEach(el => new bootstrap.Popover(el)). Placements: top, right, bottom, left. Use bootstrap.bundle.js (includes Popper) or include Popper separately before bootstrap.js.

Scrollspy

Auto-update navigation based on scroll position. Use data-bs-spy="scroll" on scrollable container with data-bs-target pointing to nav. Use data-bs-root-margin to control activation threshold. Container needs tabindex="0" so keyboard-only users can focus and scroll the container without a mouse.

Toasts

Requires JS to show. Lightweight dismissible notifications. Use .toast-container for positioning and stacking. Initialize with new bootstrap.Toast(el) then call .show(). Options: autohide: true, delay: 5000. Placements via container positioning classes.

Tooltips

Requires JS init and Popper.js. Hover hints for brief descriptions. Use data-bs-toggle="tooltip" with data-bs-title (preferred) or title attribute. Initialize with new bootstrap.Tooltip(el) or batch initialize all: document.querySelectorAll('[data-bs-toggle="tooltip"]').forEach(el => new bootstrap.Tooltip(el)). Placements: top, right, bottom, left. Tooltips on disabled buttons require a wrapper <span> or <div> with tabindex="0" for keyboard accessibility. Use bootstrap.bundle.js (includes Popper) or include Popper separately before bootstrap.js.

Static Components

These components work primarily with CSS and HTML. See references/static-components.md for detailed code examples and accessibility guidance.

Alerts

Contextual feedback messages. Use .alert.alert-{color} with role="alert". Colors: primary, secondary, success, danger, warning, info, light, dark. Use .alert-link for styled links. Add .alert-dismissible with close button for dismissible alerts.

Badges

Labels, counters, and status indicators. Use .badge.bg-{color} on <span>. Use .rounded-pill for pill shape. Position with .position-absolute utilities for notification badges. Include .visually-hidden text for screen reader context.

Breadcrumb

Navigation hierarchy indicator. Wrap <ol class="breadcrumb"> in <nav aria-label="breadcrumb">. Use .breadcrumb-item on <li> elements. Mark current page with .active and aria-current="page". Customize divider via --bs-breadcrumb-divider CSS variable.

Buttons

Interactive button elements. Base: .btn.btn-{color}. Outline: .btn-outline-{color}. Sizes: .btn-lg, .btn-sm. Full width: wrap in .d-grid. States: disabled attribute, .active class. Use <button> for actions, <a> for navigation.

Button Group

Related buttons grouped together. Use .btn-group with role="group" and aria-label. Vertical: .btn-group-vertical. Toolbar: .btn-toolbar wrapper with role="toolbar". Sizes: .btn-group-lg, .btn-group-sm.

Cards

Flexible content containers. Structure: .card > .card-body > .card-title, .card-text. Optional: .card-header, .card-footer, .card-img-top/.card-img-bottom. Grid layout: use .row.row-cols-{n} with .col > .card.h-100 for equal heights.

Close Button

Generic dismiss button. Use .btn-close with aria-label="Close". White variant: .btn-close-white. Dismiss targets via data-bs-dismiss="alert|modal|offcanvas|toast".

List Group

Series of content items as lists. Use .list-group > .list-group-item. Actionable: add .list-group-item-action. Borderless: .list-group-flush. Horizontal: .list-group-horizontal. Colors: .list-group-item-{color}.

Navbar

Responsive navigation header. Use .navbar.navbar-expand-{breakpoint}. Contains .navbar-brand, .navbar-toggler, .navbar-collapse. Placement: .fixed-top, .fixed-bottom, .sticky-top. Theme: data-bs-theme="dark" (.navbar-light deprecated in v5.3).

Navs and Tabs

Base navigation with visual styles. Styles: .nav-tabs, .nav-pills, .nav-underline. Layout: .nav-fill (equal width), .nav-justified (full width), .flex-column (vertical). For tabbed content, use role="tablist" with role="tab" buttons and role="tabpanel" panes.

Pagination

Navigation for paginated content. Use <nav aria-label="..."> > .pagination > .page-item > .page-link. Sizes: .pagination-lg, .pagination-sm. Alignment: .justify-content-center, .justify-content-end. Mark current: .active with aria-current="page".

Placeholders

Loading state indicators. Use .placeholder spans with column widths (.col-6). Animations: wrap in .placeholder-glow or .placeholder-wave. Sizes: .placeholder-lg, .placeholder-sm, .placeholder-xs. Add aria-hidden="true" to placeholder containers.

Progress

Progress indicators for tasks. Use .progress wrapper with .progress-bar inside. Set width via style="width: X%". Variants: .progress-bar-striped, .progress-bar-animated. Colors: .bg-{color}. Include ARIA attributes: role="progressbar", aria-valuenow, aria-valuemin, aria-valuemax.

Spinners

Loading indicators. Types: .spinner-border (spinning), .spinner-grow (pulsing). Sizes: .spinner-border-sm, .spinner-grow-sm. Colors: .text-{color}. Include role="status" and .visually-hidden loading text.

Common Gotchas & Tips

Components Requiring JavaScript Initialization

Tooltips and popovers will not work without explicit JavaScript initialization. Unlike modals, dropdowns, and carousels (which work via data attributes), these components must be initialized:

// Initialize all tooltips
document.querySelectorAll('[data-bs-toggle="tooltip"]')
  .forEach(el => new bootstrap.Tooltip(el));

// Initialize all popovers
document.querySelectorAll('[data-bs-toggle="popover"]')
  .forEach(el => new bootstrap.Popover(el));

Toasts also require JavaScript to show—they are hidden by default and must be shown programmatically with toast.show().

Tooltip/Popover Positioning Issues

If tooltips or popovers appear in the wrong position, get clipped, or behave strangely in complex layouts (input groups, button groups, tables, modals), use container: 'body':

// Append to body to avoid rendering issues
new bootstrap.Tooltip(el, { container: 'body' });
new bootstrap.Popover(el, { container: 'body' });

For popovers inside modals, set container to the modal body so focus remains trapped:

new bootstrap.Popover(el, { container: '.modal-body' });

Modal Best Practices

Semantic headings: Bootstrap recommends using <h1> for modal titles semantically (the modal represents its own document context). Use font size utilities like .fs-5 to control visual appearance while maintaining proper heading hierarchy.

Autofocus workaround: The HTML autofocus attribute has no effect in Bootstrap modals due to HTML5 semantics. To focus an input when a modal opens:

myModal.addEventListener('shown.bs.modal', () => {
  document.getElementById('myInput').focus();
});

Nested modals: Bootstrap only supports one modal at a time. Nested modals are not supported and considered poor user experience. If multiple dialogs are needed, close the current modal before opening another.

Dynamic content height: After dynamically changing modal body content that affects height, call modal.handleUpdate() to readjust the modal's position.

Cross-Component Patterns

Modals with forms: Place form validation feedback inside the modal body. On successful submission, call modal.hide() and optionally show a toast notification.

Toast stacking: Use .toast-container with positioning utilities (.position-fixed.bottom-0.end-0.p-3) for consistent toast placement. Multiple toasts stack automatically.

Navbar with offcanvas: For mobile navigation, combine .navbar with offcanvas for a sliding menu. Use data-bs-toggle="offcanvas" on the navbar toggler instead of collapse for a different UX pattern.

Cards in grids: Use .row.row-cols-{n} with .col > .card.h-100 to create equal-height card grids that respond to breakpoints.

Additional Resources

Reference Files

  • references/components-reference.md - Quick reference tables for all component classes
  • references/css-custom-properties.md - CSS custom properties for runtime component theming
  • references/interactive-components.md - Detailed documentation for JS-dependent components
  • references/static-components.md - Detailed documentation for CSS/HTML components

Example Files

  • examples/accordion-patterns.html - Accordion and FAQ patterns
  • examples/alert-patterns.html - Alert variants, dismissible alerts, live region patterns
  • examples/badge-button-patterns.html - Badges, buttons, button groups, and close buttons
  • examples/breadcrumb-patterns.html - Breadcrumb navigation with custom dividers and icons
  • examples/card-grid-patterns.html - Responsive card grid layouts
  • examples/carousel-patterns.html - Carousel implementation patterns
  • examples/collapse-patterns.html - Collapse, horizontal collapse, and multi-target patterns
  • examples/dropdown-patterns.html - Dropdown menus, split buttons, and form dropdowns
  • examples/list-group-patterns.html - List groups, actionable items, and tab integration
  • examples/modal-patterns.html - Modal dialog patterns
  • examples/navbar-patterns.html - Navigation bar layouts
  • examples/offcanvas-patterns.html - Offcanvas sidebar patterns
  • examples/pagination-patterns.html - Pagination variants, alignment, and responsive patterns
  • examples/placeholder-patterns.html - Loading skeleton patterns for cards, lists, and tables
  • examples/popovers-tooltips-patterns.html - Tooltip and popover patterns (requires JS init)
  • examples/progress-spinner-patterns.html - Progress bars and spinner loading indicators
  • examples/scrollspy-patterns.html - Scrollspy with navbar, list group, and documentation patterns
  • examples/tabs-patterns.html - Tab navigation patterns
  • examples/toasts-patterns.html - Toast notification patterns (requires JS init)

平台分布

Codex

27.52%
按下载量换算126

Claude Code

23.39%
按下载量换算107

windsurf

15.46%
按下载量换算71

Antigravity

12.67%
按下载量换算58

Gemini CLI

7.4%
按下载量换算34

trae

3.21%
按下载量换算15

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

继续浏览同类 Skills