diff --git a/src/sections/Projects/Sistent/components/content.js b/src/sections/Projects/Sistent/components/content.js
index 741bd1f19f60..d622ff10b49d 100644
--- a/src/sections/Projects/Sistent/components/content.js
+++ b/src/sections/Projects/Sistent/components/content.js
@@ -3,7 +3,7 @@ const componentsData = [
id: 1,
name: "Button",
description:
- "A button is an interactive element that triggers a specific action and also lets users know what will happen next.",
+ "A button is an interactive element that triggers a specific action and also lets users know what will happen next.",
url: "/projects/sistent/components/button",
src: "/button",
},
@@ -11,7 +11,7 @@ const componentsData = [
id: 2,
name: "Text Input",
description:
- "A text input is made up of multiple elements that combine to form a component that helps users to read, write, and edit text in an interface.",
+ "A text input is made up of multiple elements that combine to form a component that helps users to read, write, and edit text in an interface.",
url: "/projects/sistent/components/text-input",
src: "/text-input",
},
@@ -19,7 +19,7 @@ const componentsData = [
id: 3,
name: "Modal",
description:
- "A text input is made up of multiple elements that combine to form a component that helps users to read, write, and edit text in an interface.",
+ "A text input is made up of multiple elements that combine to form a component that helps users to read, write, and edit text in an interface.",
url: "/projects/sistent/components/modal",
src: "/modal",
},
@@ -27,7 +27,7 @@ const componentsData = [
id: 4,
name: "Paper",
description:
- "The Paper component offers an elevated surface with shadow effects, following Material Design’s elevation system.",
+ "The Paper component offers an elevated surface with shadow effects, following Material Design’s elevation system.",
url: "/projects/sistent/components/paper",
src: "/paper",
},
@@ -35,7 +35,7 @@ const componentsData = [
id: 5,
name: "Popper",
description:
- "A popper is a tooltip that appears when a user interacts with an element.",
+ "A popper is a tooltip that appears when a user interacts with an element.",
url: "/projects/sistent/components/popper",
src: "/popper",
},
@@ -43,7 +43,7 @@ const componentsData = [
id: 6,
name: "Text Field",
description:
- "The TextField component is a versatile input field used to capture user input in forms and user interfaces.",
+ "The TextField component is a versatile input field used to capture user input in forms and user interfaces.",
url: "/projects/sistent/components/text-field",
src: "/text-field",
},
@@ -51,7 +51,7 @@ const componentsData = [
id: 7,
name: "Link",
description:
- "Links are essential and integral components of an interface. They are primarily used for navigation, guiding users to the next step in a journey or redirecting them to relevant sections or pages.",
+ "Links are essential and integral components of an interface. They are primarily used for navigation, guiding users to the next step in a journey or redirecting them to relevant sections or pages.",
url: "/projects/sistent/components/link",
src: "/link",
},
@@ -59,7 +59,7 @@ const componentsData = [
id: 8,
name: "Container",
description:
- "Containers align and center content, providing responsive layout options for different screen sizes.",
+ "Containers align and center content, providing responsive layout options for different screen sizes.",
url: "/projects/sistent/components/container",
src: "/container",
},
@@ -67,7 +67,7 @@ const componentsData = [
id: 9,
name: "ButtonGroup",
description:
- "ButtonGroup is a component that groups multiple buttons together.",
+ "ButtonGroup is a component that groups multiple buttons together.",
url: "/projects/sistent/components/button-group",
src: "/button-group",
},
@@ -75,7 +75,7 @@ const componentsData = [
id: 10,
name: "Box",
description:
- "Box is used as a flexible container for layout and styling, allowing quick customization and responsive design adjustments.",
+ "Box is used as a flexible container for layout and styling, allowing quick customization and responsive design adjustments.",
url: "/projects/sistent/components/box",
src: "/box",
},
@@ -83,7 +83,7 @@ const componentsData = [
id: 11,
name: "Tooltip",
description:
- "The Tooltip component is a small pop-up box that appears when a user hovers over an element.",
+ "The Tooltip component is a small pop-up box that appears when a user hovers over an element.",
url: "/projects/sistent/components/tooltip",
src: "/tooltip",
},
@@ -91,7 +91,7 @@ const componentsData = [
id: 12,
name: "Backdrop",
description:
- "Backdrop component overlays a dimmed screen to focus attention on foreground content.",
+ "Backdrop component overlays a dimmed screen to focus attention on foreground content.",
url: "/projects/sistent/components/backdrop",
src: "/backdrop",
},
@@ -99,7 +99,7 @@ const componentsData = [
id: 13,
name: "ToggleButton",
description:
- "ToggleButton allows users to switch between two or more states, commonly used in forms or settings for quick toggles.",
+ "ToggleButton allows users to switch between two or more states, commonly used in forms or settings for quick toggles.",
url: "/projects/sistent/components/toggle-button",
src: "/toggle-button",
},
@@ -107,10 +107,18 @@ const componentsData = [
id: 14,
name: "Pagination",
description:
- "Pagination enables users to navigate through multiple pages of content, providing an intuitive interface for browsing large datasets or segmented information.",
+ "Pagination enables users to navigate through multiple pages of content, providing an intuitive interface for browsing large datasets or segmented information.",
url: "/projects/sistent/components/pagination",
src: "/pagination",
},
+ {
+ id: 15,
+ name: "Select",
+ description:
+ "Select component is a dropdown menu for selecting an option from a list.",
+ url: "/projects/sistent/components/select",
+ src: "/select",
+ },
];
module.exports = { componentsData };
diff --git a/src/sections/Projects/Sistent/components/select/code.js b/src/sections/Projects/Sistent/components/select/code.js
new file mode 100644
index 000000000000..4c4e834bb96a
--- /dev/null
+++ b/src/sections/Projects/Sistent/components/select/code.js
@@ -0,0 +1,455 @@
+import React from "react";
+import { CodeBlock } from "../button/code-block";
+
+import { SistentThemeProvider } from "@layer5/sistent";
+
+import { SistentLayout } from "../../sistent-layout";
+
+import { useStyledDarkMode } from "../../../../../theme/app/useStyledDarkMode";
+import {
+ FormControl,
+ FormHelperText,
+ InputLabel,
+ ListSubheader,
+ MenuItem,
+ OutlinedInput,
+ Select,
+} from "@mui/material";
+import { Header, SectionNav } from ".";
+
+const codes = {
+ "variant-outlined": ``,
+
+ "variant-filled": ``,
+
+ "variant-standard": ``,
+
+ "size-auto": ``,
+
+ "size-small": ``,
+
+ "size-fullwidth": ``,
+
+ "behavior-error-disabled": `
+`,
+
+ "behavior-required": `
+ The select comes in three types: Outlined, Filled, and Standard. To
+ specify the variant, pass a value to the variant prop.
+
+ If not specified, the default variant of the select if outlined.
+
+ There are 3 size option for the select component: autowidth, small,
+ and fullWidth. Depending on the size of the select, different prop
+ can be passed to the component.
+
+ An autoWidth option is passed to the component to enable this
+ attribute
+
+ To generate small select, pass a size prop with a value of small
+
+ The select will expand the full width of its parent when passed
+ fullWidth prop
+
+ To add a label to the select component, wrap it inside a FormControl
+ component. Add an InputLabel component and link it to the select
+ component using the labelId prop. Ensure the label prop in the
+ Select component matches the InputLabel text.
+
+ To add a placeholder, use the renderValue prop to display a
+ placeholder text when no value is selected.
+
+ Additional props such as error, required, and disabled can be passed
+ to the select component to customize its behavior.
+
+ NOTE:
+
+ When the select component is marked as required, an asterisk is
+ added to the label to indicate this to the user. It is recommended
+ to use this feature in conjunction with the label for better
+ clarity.
+
+ The select component can exhibit different state based on the
+ context and user input. Since it is usually used within a form
+ component, these states can act in response to the user input for
+ other components in the form.
+
+ If the component is disabled, the dropdown menu won't display when
+ user clicks on the selection area. This behavior is useful when the
+ user is not allowed to select any option.
+
+ This behavior is used to indicate that the user has made an error or
+ the selection is not compatible with other form components.
+
+ If specified, the select component will be required to have an input
+ from the user. An asterisk will be displayed next to the label to
+ let the user know that the input is required.
+
+ Additional props can be added to the select component to customize
+ its label and dropdown menu to provide use with more context of
+ their selection.
+
+ The label is optional. If provided, helper text is displayed below
+ the component to give the user more context about the component.
+
+ A placeholder is a short hint or description that is displayed
+ inside an input field or select component before the user enters a
+ value. It provides a clue to the user about what kind of information
+ is expected in the field. The placeholder text disappears when the
+ user starts typing or selects an option.
+
+ If the selection options are organized into groups, their groups can
+ be displayed within the dropdown menu to assist users in making
+ their selection.
+
+ The multiple select component allows users to select more than one
+ option from the dropdown list. This is useful in scenarios where
+ multiple selections are required, such as selecting multiple tags,
+ categories, or items.
+
+ The Select component is a versatile and customizable element
+ commonly used in forms and user interfaces. It is designed to
+ present a list of options for users to choose from, either as a
+ single selection or multiple selections. This component plays a
+ vital role in collecting user-provided information efficiently and
+ intuitively.
+
+ To accommodate various design styles and use cases, the select
+ component offers numerous customizable properties. Developers can
+ customize how the component display the labels or selected option to
+ improve user experience.
+
+ The default style is "outlined," featuring a thin line around the
+ selection area. The label appears above the selection, and the
+ dropdown menu is displayed below it.
+
+ Filled select feature a background color fill. Depending on the
+ theme or intended action, the color fill ican range from a primary
+ brand color to any other applicable color in a brand's color
+ palette.
+
+ The standard style features a simple underline below the selection
+ area.
+
+ The select component can be adjusted in size to accommodate various
+ use cases. These size adjustments typically affect the height of the
+ component, while the width adjusts to fit the content. The height of
+ the select component is derived from our spacing system to maintain
+ consistency. We offer multiple sizes to meet different needs.
+
+ The width of the component can scale automatically to fit the
+ content it contains. This ensures that the select component is
+ appropriately sized based on the options available, providing a
+ better user experience.
+
+ The small size select component is designed to fit into more compact
+ spaces within a user interface. It is particularly useful when you
+ need to conserve space or when the select component is part of a
+ form with other small-sized elements. This ensures a consistent and
+ visually appealing layout.
+
+ Full width select are more efficient in mobile designs and rightly
+ so in order to offer users with a wider touch area since the input
+ devices - the fingers, are a lot larger than the cursor on a desktop
+ or larger screen.
+ Multiple select component allows users to select more than one.Select variants
+
+ Outlined
+ Filled
+ Standard
+ Sizes
+
+ Autowidth
+ Small
+ Full width
+ Customization
+
+ Label
+ Helper text
+ Placeholder
+ Grouping
+ To group selection options, use the ListSubheader component to create
+ headers for each group within the dropdown menu. This helps users to
+ easily navigate and find the options they need.
+ Multi-select
+
+ Functions
+
+ Disabled
+ Error
+ Required
+ Customization
+
+ Label and helper text
+ Placeholder
+ Grouping
+ Multiple select
+
+ Types
+
+ Outlined
+ Filled
+ Standard
+ Sizes
+
+ Auto width
+ Small
+ Full width
+ Multiple select
+
+
+ Select component is a dropdown menu for selecting an option from a list. +
+ > + ); +} + +export default SistentSelect;