naytak-react-ui-segmented-control
v0.2.0
Published
SegmentedControl component (toggle group) for naytak-react-ui
Readme
naytak-react-ui-segmented-control
SegmentedControl (toggle group) component for naytak-react-ui
Components
- SegmentedControl
Install
npm install naytak-react-ui-segmented-controlUsage
import { SegmentedControl } from "naytak-react-ui-segmented-control";
import "naytak-react-ui-segmented-control/index.css";
export default function Example() {
return (
<SegmentedControl
defaultValue="week"
options={[
{ value: "day", label: "Day" },
{ value: "week", label: "Week" },
{ value: "month", label: "Month" },
]}
/>
);
}Props: options ({ value, label, icon?, disabled? }[]), value (controlled),
defaultValue (uncontrolled), onChange(value), size ("sm" | "md" | "lg"),
block.
Docs
Full documentation, props, and live demos: naytak-react-ui
License
MIT
