Segmented Toggle Button
Segmented Toggle Button: iOS segmented control — sliding white pill between Day, Week, and Month. Pass your own options array for view modes or filters. Free MIT React & Next.js source with Motion and Tailwind CSS, live preview, CLI install and docs.
Install Segmented Toggle Button
npx motion-ui-skill add segmented-toggle-buttonComponents install as source into your project. The interactive page also includes preview, code, documentation and install tabs.
Dependencies
clsxreacttailwind-merge
Source files
Segmented Toggle Button
iOS segmented control — sliding white pill between Day, Week, and Month. Pass your own options array for view modes or filters.
Install
npx motion-ui-skill add segmented-toggle-button
Dependencies
clsxreacttailwind-merge
Usage
"use client";
import { SegmentedToggleButton } from "@/components/buttons/segmented-toggle-button";
export function SegmentedToggleButtonDemo() {
return (
<div className="flex items-center justify-center p-6">
<SegmentedToggleButton />
</div>
);
}
API Reference
SegmentedToggleButton
| Prop | Type | Default | Required | Description |
|---|---|---|---|---|
className |
string |
— | No | Additional CSS classes |