Get Started
Components
- Accordion
- Alert
- Alert Dialog
- Aspect Ratio
- Attachment
- Avatar
- Badge
- Breadcrumb
- Bubble
- Button
- Button Group
- Calendar
- Card
- Carousel
- Chart
- Checkbox
- Collapsible
- Combobox
- Command
- Confirm Dialog
- Container
- Context Menu
- Dialog
- Direction
- Drawer
- Dropdown Menu
- Empty
- Field
- Hover Card
- Input
- Input Group
- Input Number
- Input OTP
- Item
- Kbd
- Label
- Marker
- Menubar
- Message
- Message Scroller
- Native Select
- Navigation Menu
- Pagination
- Popover
- Progress
- Radio Group
- Resizable
- Scroll Area
- Select
- Separator
- Sheet
- Sidebar
- Skeleton
- Slider
- Sonner
- Spinner
- Switch
- Table
- Tabs
- Tailwind Indicator
- Textarea
- Toggle
- Toggle Group
- Tooltip
Resize the window: the badge shows the active breakpoint.
xs
sm
md
lg
xl
2xl
3xl
4xl
import { TailwindIndicator } from "@/components/ui/tailwind-indicator"
export function TailwindIndicatorDemo() {
return (
// O `transform` prende o indicador (que é `fixed`) dentro desta caixa,Installation
pnpm slabui add tailwind-indicator
Usage
Render it once in the root layout. It is a small fixed badge in a corner of the window with the name of the active breakpoint (xs, sm, md, lg, xl, 2xl, 3xl, 4xl).
import { TailwindIndicator } from "@/components/ui/tailwind-indicator"
export default function RootLayout({ children }) {
return (
<html lang="en">
<body>
{children}
<TailwindIndicator />
</body>
</html>
)
}By default it renders nothing in production: it reads NODE_ENV (or the MODE of Vite) and hides itself when the value is production.
Position
Use position to move the badge to another corner.
<TailwindIndicator position="top-right" />Always visible
Use always to show the badge in production too, for example in a staging environment.
<TailwindIndicator always />API Reference
| Prop | Type | Default |
|---|---|---|
position | "top-left" | "top-right" | "bottom-left" | "bottom-right" | "bottom-left" |
always | boolean | false |