bs-grid-breakpoint-indicator
v1.0.0
Published
Lightweight Bootstrap responsive breakpoint indicator with minimal footprint
Maintainers
Readme
Bootstrap Grid Breakpoint Indicator
Lightweight Bootstrap responsive breakpoint indicator with minimal footprint. Shows current active breakpoint in the top-left corner during development.
Features
- 🎯 Minimal Footprint - Ultra-lightweight with essential features only
- 📦 CSS Variables - Easy customization without Sass complexity
- ⚙️ Configurable - Customize appearance with CSS custom properties
- 🚀 Bootstrap Compatible - Works with Bootstrap 4 and 5
- 🔧 Development Friendly - Easy to hide in production
Installation
npm install bs-grid-breakpoint-indicatorQuick Start
Standalone CSS
<link rel="stylesheet" href="node_modules/bs-grid-breakpoint-indicator/dist/bs-grid-breakpoint-indicator.css">
<body class="bs-breakpoint-indicator">Sass Mixin
@import '~bs-grid-breakpoint-indicator/src/breakpoint-indicator';
.debug-breakpoint {
@include bs-breakpoint-indicator;
}Customization with CSS Variables
:root {
--bs-breakpoint-top: 10px;
--bs-breakpoint-left: 10px;
--bs-breakpoint-padding: 4px 8px;
--bs-breakpoint-font-size: 14px;
--bs-breakpoint-opacity: 0.6;
--bs-breakpoint-z-index: 1000;
--bs-breakpoint-border-radius: 0.25rem;
--bs-breakpoint-fallback: "no";
}Available CSS Variables
| Variable | Default | Description |
|----------|---------|-------------|
| --bs-breakpoint-top | 2px | Distance from top |
| --bs-breakpoint-left | 2px | Distance from left |
| --bs-breakpoint-padding | 2px 4px | Inner padding |
| --bs-breakpoint-font-size | 12px | Font size |
| --bs-breakpoint-opacity | 0.4 | Opacity level |
| --bs-breakpoint-z-index | 100 | Z-index value |
| --bs-breakpoint-border-radius | 0.375rem | Border radius |
| --bs-breakpoint-fallback | "xs" | Fallback content |
Custom Breakpoints
Works automatically with your custom Bootstrap breakpoints:
$grid-breakpoints: (
xs: 0,
sm: 480px,
md: 768px,
lg: 1024px,
xl: 1200px
);
@import '~bs-grid-breakpoint-indicator/src/breakpoint-indicator';CDN Usage
<link rel="stylesheet" href="https://unpkg.com/bs-grid-breakpoint-indicator@latest/dist/bs-grid-breakpoint-indicator.css">License
MIT
