+ A system to help you move from configuration management to
+ application management across your hybrid cloud estate - through
+ sharable, reusable, tiny applications called Charmed Operators.
+
+ A repository for charms - from Observability to Data to Identity and
+ more.
+
+ ),
+ },
+ ],
+ },
+};
+
+/**
+ * The buttons take up a more compact apperance by adding the modifier is-dense
+ */
+
+export const Dense: Story = {
+ name: "Dense",
+
+ args: {
+ className: "is-dense",
+ segments: [
+ {
+ label: "OLM",
+ segmentContent: (
+
+ A system to help you move from configuration management to
+ application management across your hybrid cloud estate - through
+ sharable, reusable, tiny applications called Charmed Operators.
+
+ A repository for charms - from Observability to Data to Identity and
+ more.
+
+ ),
+ },
+ ],
+ },
+};
+/**
+ * The pattern also supports the use of icons within each button.
+ *
+ * Icons : If any icons are used, all buttons within the pattern should have an icon, to avoid any potential confusion that could arise from a mix of buttons with and without an icon.
+ */
+export const WithIcon: Story = {
+ name: "With Icon",
+ args: {
+ segments: [
+ {
+ label: "OLM",
+ segmentContent: (
+
+ A system to help you move from configuration management to
+ application management across your hybrid cloud estate - through
+ sharable, reusable, tiny applications called Charmed Operators.
+
= {
+ /**
+ * Label to be displayed inside the segment.
+ */
+ label: ReactNode;
+ /**
+ * Content to be displayed inside the segment.
+ */
+ segmentContent: ReactNode;
+ /**
+ * Icon to be displayed alongside the label of the segment.
+ */
+ segmentIcon?: ReactNode;
+} & (HTMLProps | P);
+
+export type Props
= {
+ /**
+ * Optional classes applied to the parent element.
+ */
+ className?: ClassName;
+ /**
+ * List of segments present in the element.
+ */
+ segments: Segments
[];
+};
+/**
+ * This is the [React](https://reactjs.org/) component for Vanilla [SegmentedControl](https://vanillaframework.io/docs/patterns/segmented-control).
+SegmentedControl organises and allows navigation between groups of content that are related and at the same level
+of hierarchy.
+ */
+const SegmentedControl = ({
+ className,
+ segments,
+}: Props): React.JSX.Element => {
+ const [activeIndex, setActiveIndex] = useState(0);
+ return (
+
+`;
diff --git a/src/components/SegmentedControl/index.ts b/src/components/SegmentedControl/index.ts
new file mode 100644
index 00000000..dcaee910
--- /dev/null
+++ b/src/components/SegmentedControl/index.ts
@@ -0,0 +1,2 @@
+export { default } from "./SegmentedControl";
+export type { Props as SegmentedControlProps } from "./SegmentedControl";
diff --git a/src/index.ts b/src/index.ts
index 50d9ec98..eb9b0865 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -79,6 +79,7 @@ export { default as ScrollableContainer } from "./components/ScrollableContainer
export { default as ScrollableTable } from "./components/ScrollableTable";
export { default as SearchAndFilter } from "./components/SearchAndFilter";
export { default as SearchBox } from "./components/SearchBox";
+export { default as SegmentedControl } from "./components/SegmentedControl";
export { default as Select } from "./components/Select";
export { default as SideNavigation } from "./components/SideNavigation";
export { default as SideNavigationItem } from "./components/SideNavigation/SideNavigationItem";
@@ -194,6 +195,7 @@ export type { ScrollableTableProps } from "./components/ScrollableTable";
export type { ScrollableContainerProps } from "./components/ScrollableContainer";
export type { SearchAndFilterProps } from "./components/SearchAndFilter";
export type { SearchBoxProps } from "./components/SearchBox";
+export type { SegmentedControlProps } from "./components/SegmentedControl";
export type { SelectProps } from "./components/Select";
export type { SideNavigationProps } from "./components/SideNavigation";
export type { SideNavigationItemProps } from "./components/SideNavigation/SideNavigationItem";