diff --git a/docs/content/SegmentedControl.mdx b/docs/content/SegmentedControl.mdx new file mode 100644 index 00000000000..4da191647e2 --- /dev/null +++ b/docs/content/SegmentedControl.mdx @@ -0,0 +1,213 @@ +--- +title: SegmentedControl +status: Draft +description: Use a segmented control to let users select an option from a short list and immediately apply the selection +--- + +Not implemented yet + +## Examples + +### Simple + +```jsx live drafts + + Preview + Raw + Blame + +``` + +### With icons and labels + +```jsx live drafts + + + Preview + + Raw + Blame + +``` + +### With icons only + +```jsx live drafts + + + + + +``` + +### With labels hidden on smaller viewports + +```jsx live drafts + + + Preview + + Raw + Blame + +``` + +### Convert to a dropdown on smaller viewports + +```jsx live drafts + + + Preview + + Raw + Blame + +``` + +### Fill width of parent + +```jsx live drafts + + Preview + Raw + Blame + +``` + +### In a loading state + +```jsx live drafts + + Preview + Raw + Blame + +``` + +### With a label and caption on the left + +```jsx live drafts + + + + File view + + + Change the way the file is viewed + + + + Preview + Raw + Blame + + +``` + +### With a label above and caption below + +```jsx live drafts + + File view + + Preview + Raw + Blame + + Change the way the file is viewed + +``` + +### With something besides the first option selected + +```jsx live drafts + + Preview + Raw + Blame + +``` + +### With a selection change handler + +```jsx live drafts + { + alert(`Segment ${selectedIndex}`) + }} +> + Preview + Raw + Blame + +``` + +## Props + +### SegmentedControl + + + + + + + + + + + + + +### SegmentedControl.Button + + + + + + + + + +### SegmentedControl.IconButton + + + + + + + + + +## Status + +