diff --git a/packages/coreui-react/src/components/accordion/CAccordion.tsx b/packages/coreui-react/src/components/accordion/CAccordion.tsx index 5504f915..1bc9e391 100644 --- a/packages/coreui-react/src/components/accordion/CAccordion.tsx +++ b/packages/coreui-react/src/components/accordion/CAccordion.tsx @@ -96,11 +96,10 @@ export const CAccordion = forwardRef( return (
@@ -117,6 +116,7 @@ CAccordion.propTypes = { activeItemKey: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), children: PropTypes.node, className: PropTypes.string, + customClassNames: PropTypes.object, flush: PropTypes.bool, } diff --git a/packages/coreui-react/src/components/alert/CAlert.tsx b/packages/coreui-react/src/components/alert/CAlert.tsx index 3efdb78f..f43d6219 100644 --- a/packages/coreui-react/src/components/alert/CAlert.tsx +++ b/packages/coreui-react/src/components/alert/CAlert.tsx @@ -8,42 +8,120 @@ import { CCloseButton } from '../close-button/CCloseButton' import { useForkedRef } from '../../hooks' import { colorPropType } from '../../props' import type { Colors } from '../../types' +import { mergeClassNames } from '../../utils' export interface CAlertProps extends HTMLAttributes { /** - * A string of all className you want applied to the component. + * Apply a CSS fade transition to the alert. + * + * @since 5.5.0 + * + * @example + * No animation alert + */ + animation?: boolean + + /** + * A string of additional CSS class names to apply to the alert component. + * + * @example + * Custom Class Alert */ className?: string + /** * Sets the color context of the component to one of CoreUI’s themed colors. * * @type 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info' | 'dark' | 'light' | string + * + * @example + * Warning Alert */ color: Colors + /** - * Optionally add a close button to alert and allow it to self dismiss. + * Custom class names to override or extend the default CSS classes used within the `CAlert` component. + * Each key corresponds to a specific part of the Alert component, allowing for granular styling control. + * + * @since v5.5.0 + * + * @example + * const customClasses = { + * ALERT: 'my-custom-alert', + * ALERT_DISMISSIBLE: 'my-custom-dismissible', + * } + * + * + */ + customClassNames?: Partial + + /** + * Optionally add a close button to the alert and allow it to self-dismiss. + * + * @example + * + * Dismissible Alert + * */ dismissible?: boolean + /** - * Callback fired when the component requests to be closed. + * Callback fired when the alert requests to be closed. This occurs when the close button is clicked. + * + * @example + * const handleClose = () => { + * console.log('Alert closed') + * } + * + * + * Dismissible Alert with Callback + * */ onClose?: () => void + /** - * Set the alert variant to a solid. + * Set the alert variant to a solid background. This changes the alert's appearance to have a solid color. + * + * @example + * + * Solid Variant Alert + * */ variant?: 'solid' | string + /** - * Toggle the visibility of component. + * Toggle the visibility of the alert component. When set to `false`, the alert will be hidden. + * + * @example + * const [visible, setVisible] = useState(true) + * + * setVisible(false)} color="info"> + * Toggleable Alert + * */ visible?: boolean } +export const ALERT_CLASS_NAMES = { + /** + * Base class for the alert container. + */ + ALERT: 'alert', + + /** + * Applied when the `dismissible` prop is enabled. + */ + ALERT_DISMISSIBLE: 'alert-dismissible', +} + export const CAlert = forwardRef( ( { children, + animation = true, className, color = 'primary', + customClassNames, dismissible, variant, visible = true, @@ -60,6 +138,11 @@ export const CAlert = forwardRef( setVisible(visible) }, [visible]) + const mergedClassNames = mergeClassNames( + ALERT_CLASS_NAMES, + customClassNames, + ) + return ( ( {(state) => (
( ) CAlert.propTypes = { + animation: PropTypes.bool, children: PropTypes.node, className: PropTypes.string, color: colorPropType.isRequired, + customClassNames: PropTypes.object, dismissible: PropTypes.bool, onClose: PropTypes.func, variant: PropTypes.string, diff --git a/packages/coreui-react/src/components/alert/CAlertHeading.tsx b/packages/coreui-react/src/components/alert/CAlertHeading.tsx index 9f47eb3a..d2fea717 100644 --- a/packages/coreui-react/src/components/alert/CAlertHeading.tsx +++ b/packages/coreui-react/src/components/alert/CAlertHeading.tsx @@ -3,23 +3,74 @@ import PropTypes from 'prop-types' import classNames from 'classnames' import { PolymorphicRefForwardingComponent } from '../../helpers' +import { mergeClassNames } from '../../utils' export interface CAlertHeadingProps extends HTMLAttributes { /** - * Component used for the root node. Either a string to use a HTML element or a component. + * The component used for the root node. It can be a string representing a HTML element or a React component. + * + * @default 'h4' + * + * @example + * // Using default 'h4' element + * Alert Heading + * + * // Using a custom component + * const CustomHeading = React.forwardRef>((props, ref) => ( + *
+ * )) + * + * Custom Alert Heading */ as?: ElementType + /** - * A string of all className you want applied to the base component. + * A string of additional CSS class names to apply to the React Alert Heading component. + * + * @example + * Custom Class Alert Heading */ className?: string + + /** + * Custom class names to override or extend the default CSS classes used within the `CAlertHeading` component. + * Each key corresponds to a specific part of the React Alert Heading component, allowing for granular styling control. + * + * @since v5.0.0 + * + * @example + * const customClasses = { + * ALERT_HEADING: 'my-custom-alert-heading', + * } + * + * + * Custom Styled Alert Heading + * + */ + customClassNames?: Partial +} + +export const ALERT_HEADING_CLASS_NAMES = { + /** + * Base class for the React Alert Heading container. + */ + ALERT_HEADING: 'alert-heading', } export const CAlertHeading: PolymorphicRefForwardingComponent<'h4', CAlertHeadingProps> = forwardRef( - ({ children, as: Component = 'h4', className, ...rest }, ref) => { + ({ children, as: Component = 'h4', className, customClassNames, ...rest }, ref) => { + const mergedClassNames = mergeClassNames( + ALERT_HEADING_CLASS_NAMES, + customClassNames, + ) + return ( - + {children} ) @@ -30,6 +81,7 @@ CAlertHeading.propTypes = { as: PropTypes.elementType, children: PropTypes.node, className: PropTypes.string, + customClassNames: PropTypes.object, } CAlertHeading.displayName = 'CAlertHeading' diff --git a/packages/coreui-react/src/components/alert/CAlertLink.tsx b/packages/coreui-react/src/components/alert/CAlertLink.tsx index dacfa081..0710e36e 100644 --- a/packages/coreui-react/src/components/alert/CAlertLink.tsx +++ b/packages/coreui-react/src/components/alert/CAlertLink.tsx @@ -3,18 +3,51 @@ import PropTypes from 'prop-types' import classNames from 'classnames' import { CLink } from '../link/CLink' +import { mergeClassNames } from '../../utils' export interface CAlertLinkProps extends AnchorHTMLAttributes { /** - * A string of all className you want applied to the base component. + * A string of additional CSS class names to apply to the alert link component. + * + * @example + * Custom Styled Link */ className?: string + + /** + * Custom class names to override or extend the default CSS classes used within the `CAlertLink` component. + * Each key corresponds to a specific part of the React Alert Link component, allowing for granular styling control. + * + * @since v5.0.0 + * + * @example + * const customClasses = { + * ALERT_LINK: 'my-custom-alert-link', + * } + * + * + * Custom Class Alert Link + * + */ + customClassNames?: Partial +} + +export const ALERT_LINK_CLASS_NAMES = { + /** + * Base class for the React alert link. + */ + ALERT_LINK: 'alert-link', } export const CAlertLink = forwardRef( - ({ children, className, ...rest }, ref) => { + ({ children, className, customClassNames, ...rest }, ref) => { + const mergedClassNames = mergeClassNames( + ALERT_LINK_CLASS_NAMES, + customClassNames, + ) + return ( - + {children} ) @@ -24,6 +57,7 @@ export const CAlertLink = forwardRef( CAlertLink.propTypes = { children: PropTypes.node, className: PropTypes.string, + customClassNames: PropTypes.object, } CAlertLink.displayName = 'CAlertLink' diff --git a/packages/docs/content/api/CAccordion.api.mdx b/packages/docs/content/api/CAccordion.api.mdx index dfff727c..97e88506 100644 --- a/packages/docs/content/api/CAccordion.api.mdx +++ b/packages/docs/content/api/CAccordion.api.mdx @@ -21,7 +21,11 @@ import CAccordion from '@coreui/react/src/components/accordion/CAccordion' {`string`}, {`number`} - Determines which accordion item is currently active (expanded) by default.
Accepts a number or string corresponding to the {`itemKey`} of the desired accordion item.
...`} /> + +

Determines which accordion item is currently active (expanded) by default.
+Accepts a number or string corresponding to the {`itemKey`} of the desired accordion item.

+ ...`} /> + alwaysOpen# @@ -29,7 +33,11 @@ import CAccordion from '@coreui/react/src/components/accordion/CAccordion' {`boolean`} - When set to {`true`}, multiple accordion items within the React Accordion can be open simultaneously.
This is ideal for scenarios where users need to view multiple sections at once without collapsing others.
...`} /> + +

When set to {`true`}, multiple accordion items within the React Accordion can be open simultaneously.
+This is ideal for scenarios where users need to view multiple sections at once without collapsing others.

+ ...`} /> + className# @@ -37,7 +45,10 @@ import CAccordion from '@coreui/react/src/components/accordion/CAccordion' {`string`} - Allows you to apply custom CSS classes to the React Accordion for enhanced styling and theming.
...`} /> + +

Allows you to apply custom CSS classes to the React Accordion for enhanced styling and theming.

+ ...`} /> + customClassNames# @@ -45,11 +56,19 @@ import CAccordion from '@coreui/react/src/components/accordion/CAccordion' {`Partial\<{ ACCORDION: string; ACCORDION_FLUSH: string; }>`} - Allows overriding or extending the default CSS class names used in the component.

- {`ACCORDION`}: Base class for the accordion component.
- {`ACCORDION_FLUSH`}: Class applied when the {`flush`} prop is set to true, ensuring an edge-to-edge layout.

Use this prop to customize the styles of specific parts of the accordion.
+

Allows overriding or extending the default CSS class names used in the component.

+
    +
  • {`ACCORDION`}: Base class for the accordion component.
  • +
  • {`ACCORDION_FLUSH`}: Class applied when the {`flush`} prop is set to true, ensuring an edge-to-edge layout.
  • +
+

Use this prop to customize the styles of specific parts of the accordion.

+ ...`} /> +...`} /> + flush# @@ -57,7 +76,11 @@ import CAccordion from '@coreui/react/src/components/accordion/CAccordion' {`boolean`} - When {`flush`} is set to {`true`}, the React Accordion renders edge-to-edge with its parent container,
creating a seamless and modern look ideal for minimalist designs.
...`} /> + +

When {`flush`} is set to {`true`}, the React Accordion renders edge-to-edge with its parent container,
+creating a seamless and modern look ideal for minimalist designs.

+ ...`} /> + diff --git a/packages/docs/content/api/CAccordionBody.api.mdx b/packages/docs/content/api/CAccordionBody.api.mdx index c280bef1..b6eb9609 100644 --- a/packages/docs/content/api/CAccordionBody.api.mdx +++ b/packages/docs/content/api/CAccordionBody.api.mdx @@ -21,7 +21,10 @@ import CAccordionBody from '@coreui/react/src/components/accordion/CAccordionBod {`string`} - Allows you to apply custom CSS classes to the React Accordion Body for enhanced styling and theming.
...`} /> + +

Allows you to apply custom CSS classes to the React Accordion Body for enhanced styling and theming.

+ ...`} /> + customClassNames# @@ -29,11 +32,20 @@ import CAccordionBody from '@coreui/react/src/components/accordion/CAccordionBod {`Partial\<{ ACCORDION_COLLAPSE: string; ACCORDION_BODY: string; }>`} - Allows overriding or extending the default CSS class names used in the accordion body component.
Accepts a partial object matching the shape of {`ACCORDION_BODY_CLASS_NAMES`}, which includes:

- {`ACCORDION_COLLAPSE`}: Base class for the collapse container in the accordion body.
- {`ACCORDION_BODY`}: Base class for the main content container inside the accordion body.

Use this prop to customize the styles of specific parts of the accordion body.
+

Allows overriding or extending the default CSS class names used in the accordion body component.
+Accepts a partial object matching the shape of {`ACCORDION_BODY_CLASS_NAMES`}, which includes:

+
    +
  • {`ACCORDION_COLLAPSE`}: Base class for the collapse container in the accordion body.
  • +
  • {`ACCORDION_BODY`}: Base class for the main content container inside the accordion body.
  • +
+

Use this prop to customize the styles of specific parts of the accordion body.

+ ...`} /> +...`} /> + diff --git a/packages/docs/content/api/CAccordionButton.api.mdx b/packages/docs/content/api/CAccordionButton.api.mdx index c659fd49..b9cc8d5a 100644 --- a/packages/docs/content/api/CAccordionButton.api.mdx +++ b/packages/docs/content/api/CAccordionButton.api.mdx @@ -21,7 +21,9 @@ import CAccordionButton from '@coreui/react/src/components/accordion/CAccordionB {`string`} - Styles the clickable element in the accordion header. + +

Styles the clickable element in the accordion header.

+ customClassNames# @@ -29,10 +31,18 @@ import CAccordionButton from '@coreui/react/src/components/accordion/CAccordionB {`Partial\<{ ACCORDION_BUTTON: string; }>`} - Allows overriding or extending the default CSS class names used in the accordion button component.
Accepts a partial object matching the shape of {`CLASS_NAMES`}, which includes:

- {`ACCORDION_BUTTON`}: Base class for the accordion button.

Use this prop to customize the styles of the accordion button.
+

Allows overriding or extending the default CSS class names used in the accordion button component.
+Accepts a partial object matching the shape of {`CLASS_NAMES`}, which includes:

+
    +
  • {`ACCORDION_BUTTON`}: Base class for the accordion button.
  • +
+

Use this prop to customize the styles of the accordion button.

+ ...`} /> +...`} /> + diff --git a/packages/docs/content/api/CAccordionHeader.api.mdx b/packages/docs/content/api/CAccordionHeader.api.mdx index c158599b..ad7cc0ed 100644 --- a/packages/docs/content/api/CAccordionHeader.api.mdx +++ b/packages/docs/content/api/CAccordionHeader.api.mdx @@ -21,7 +21,9 @@ import CAccordionHeader from '@coreui/react/src/components/accordion/CAccordionH {`string`} - A string of all className you want applied to the base component. + +

A string of all className you want applied to the base component.

+ customClassNames# @@ -29,11 +31,20 @@ import CAccordionHeader from '@coreui/react/src/components/accordion/CAccordionH {`Partial\<{ ACCORDION_HEADER: string; ACCORDION_BUTTON: string; }>`} - Allows overriding or extending the default CSS class names used in the accordion header component.
Accepts a partial object matching the shape of {`ACCORDION_HEADER_CLASS_NAMES`}, which includes:

- {`ACCORDION_HEADER`}: Base class for the accordion header container.
- {`ACCORDION_BUTTON`}: Class applied to the button within the accordion header.

Use this prop to customize the styles of specific parts of the accordion header.
+

Allows overriding or extending the default CSS class names used in the accordion header component.
+Accepts a partial object matching the shape of {`ACCORDION_HEADER_CLASS_NAMES`}, which includes:

+
    +
  • {`ACCORDION_HEADER`}: Base class for the accordion header container.
  • +
  • {`ACCORDION_BUTTON`}: Class applied to the button within the accordion header.
  • +
+

Use this prop to customize the styles of specific parts of the accordion header.

+ ...`} /> +...`} /> + diff --git a/packages/docs/content/api/CAccordionItem.api.mdx b/packages/docs/content/api/CAccordionItem.api.mdx index 1eb6b121..49049a00 100644 --- a/packages/docs/content/api/CAccordionItem.api.mdx +++ b/packages/docs/content/api/CAccordionItem.api.mdx @@ -21,7 +21,9 @@ import CAccordionItem from '@coreui/react/src/components/accordion/CAccordionIte {`string`} - A string of all className you want applied to the base component. + +

A string of all className you want applied to the base component.

+ customClassNames# @@ -29,10 +31,18 @@ import CAccordionItem from '@coreui/react/src/components/accordion/CAccordionIte {`Partial\<{ ACCORDION_ITEM: string; }>`} - Allows overriding or extending the default CSS class names used in the accordion item component.
Accepts a partial object matching the shape of {`ACCORDION_ITEM_CLASS_NAMES`}, which includes:

- {`ACCORDION_ITEM`}: Base class for an individual accordion item.

Use this prop to customize the styles of specific parts of the accordion item.
+

Allows overriding or extending the default CSS class names used in the accordion item component.
+Accepts a partial object matching the shape of {`ACCORDION_ITEM_CLASS_NAMES`}, which includes:

+
    +
  • {`ACCORDION_ITEM`}: Base class for an individual accordion item.
  • +
+

Use this prop to customize the styles of specific parts of the accordion item.

+ ...`} /> +...`} /> + itemKey# @@ -40,7 +50,9 @@ import CAccordionItem from '@coreui/react/src/components/accordion/CAccordionIte {`string`}, {`number`} - Item key. + +

Item key.

+ diff --git a/packages/docs/content/api/CAlert.api.mdx b/packages/docs/content/api/CAlert.api.mdx index f2f95bfd..9facdba9 100644 --- a/packages/docs/content/api/CAlert.api.mdx +++ b/packages/docs/content/api/CAlert.api.mdx @@ -15,13 +15,27 @@ import CAlert from '@coreui/react/src/components/alert/CAlert' + + animation#5.5.0+ + {`true`} + {`boolean`} + + + +

Apply a CSS fade transition to the alert.

+ No animation alert`} /> + + className# undefined {`string`} - A string of all className you want applied to the component. + +

A string of additional CSS class names to apply to the alert component.

+ Custom Class Alert`} /> + color# @@ -29,7 +43,27 @@ import CAlert from '@coreui/react/src/components/alert/CAlert' {`'primary'`}, {`'secondary'`}, {`'success'`}, {`'danger'`}, {`'warning'`}, {`'info'`}, {`'dark'`}, {`'light'`}, {`string`} - Sets the color context of the component to one of CoreUI’s themed colors. + +

Sets the color context of the component to one of CoreUI’s themed colors.

+ Warning Alert`} /> + + + + customClassNames#v5.5.0+ + undefined + {`Partial\<{ ALERT: string; ALERT_DISMISSIBLE: string; }>`} + + + +

Custom class names to override or extend the default CSS classes used within the {`CAlert`} component.
+Each key corresponds to a specific part of the Alert component, allowing for granular styling control.

+ `} /> + dismissible# @@ -37,7 +71,12 @@ import CAlert from '@coreui/react/src/components/alert/CAlert' {`boolean`} - Optionally add a close button to alert and allow it to self dismiss. + +

Optionally add a close button to the alert and allow it to self-dismiss.

+ + Dismissible Alert +`} /> + onClose# @@ -45,7 +84,16 @@ import CAlert from '@coreui/react/src/components/alert/CAlert' {`() => void`} - Callback fired when the component requests to be closed. + +

Callback fired when the alert requests to be closed. This occurs when the close button is clicked.

+ { + console.log('Alert closed') +} + + + Dismissible Alert with Callback +`} /> + variant# @@ -53,7 +101,12 @@ import CAlert from '@coreui/react/src/components/alert/CAlert' {`string`} - Set the alert variant to a solid. + +

Set the alert variant to a solid background. This changes the alert's appearance to have a solid color.

+ + Solid Variant Alert +`} /> + visible# @@ -61,7 +114,14 @@ import CAlert from '@coreui/react/src/components/alert/CAlert' {`boolean`} - Toggle the visibility of component. + +

Toggle the visibility of the alert component. When set to {`false`}, the alert will be hidden.

+ setVisible(false)} color="info"> + Toggleable Alert +`} /> + diff --git a/packages/docs/content/api/CAlertHeading.api.mdx b/packages/docs/content/api/CAlertHeading.api.mdx index 0bb3f9dd..cc5236f4 100644 --- a/packages/docs/content/api/CAlertHeading.api.mdx +++ b/packages/docs/content/api/CAlertHeading.api.mdx @@ -17,11 +17,22 @@ import CAlertHeading from '@coreui/react/src/components/alert/CAlertHeading' as# - undefined + {`'h4'`} {`(ElementType & "symbol")`}, {`(ElementType & "object")`}, {`(ElementType & "h4")`}, {`(ElementType & "slot")`}, {`(ElementType & "style")`}, {`... 174 more ...`}, {`(ElementType & FunctionComponent\<...>)`} - Component used for the root node. Either a string to use a HTML element or a component. + +

The component used for the root node. It can be a string representing a HTML element or a React component.

+ Alert Heading + +// Using a custom component +const CustomHeading = React.forwardRef>((props, ref) => ( +
+)) + +Custom Alert Heading`} /> + className# @@ -29,7 +40,28 @@ import CAlertHeading from '@coreui/react/src/components/alert/CAlertHeading' {`string`} - A string of all className you want applied to the base component. + +

A string of additional CSS class names to apply to the React Alert Heading component.

+ Custom Class Alert Heading`} /> + + + + customClassNames#v5.5.0+ + undefined + {`Partial\<{ ALERT_HEADING: string; }>`} + + + +

Custom class names to override or extend the default CSS classes used within the {`CAlertHeading`} component.
+Each key corresponds to a specific part of the React Alert Heading component, allowing for granular styling control.

+ + Custom Styled Alert Heading +`} /> + diff --git a/packages/docs/content/api/CAlertLink.api.mdx b/packages/docs/content/api/CAlertLink.api.mdx index bbff921e..36a0a711 100644 --- a/packages/docs/content/api/CAlertLink.api.mdx +++ b/packages/docs/content/api/CAlertLink.api.mdx @@ -21,7 +21,28 @@ import CAlertLink from '@coreui/react/src/components/alert/CAlertLink' {`string`} - A string of all className you want applied to the base component. + +

A string of additional CSS class names to apply to the alert link component.

+ Custom Styled Link`} /> + + + + customClassNames#v5.5.0+ + undefined + {`Partial\<{ ALERT_LINK: string; }>`} + + + +

Custom class names to override or extend the default CSS classes used within the {`CAlertLink`} component.
+Each key corresponds to a specific part of the React Alert Link component, allowing for granular styling control.

+ + Custom Class Alert Link +`} /> + diff --git a/packages/docs/content/api/CAvatar.api.mdx b/packages/docs/content/api/CAvatar.api.mdx index e0a72315..92eaeec3 100644 --- a/packages/docs/content/api/CAvatar.api.mdx +++ b/packages/docs/content/api/CAvatar.api.mdx @@ -21,7 +21,9 @@ import CAvatar from '@coreui/react/src/components/avatar/CAvatar' {`string`} - A string of all className you want applied to the component. + +

A string of all className you want applied to the component.

+ color# @@ -29,7 +31,9 @@ import CAvatar from '@coreui/react/src/components/avatar/CAvatar' {`'primary'`}, {`'secondary'`}, {`'success'`}, {`'danger'`}, {`'warning'`}, {`'info'`}, {`'dark'`}, {`'light'`}, {`string`} - Sets the color context of the component to one of CoreUI’s themed colors. + +

Sets the color context of the component to one of CoreUI’s themed colors.

+ shape# @@ -37,7 +41,9 @@ import CAvatar from '@coreui/react/src/components/avatar/CAvatar' {`'rounded'`}, {`'rounded-top'`}, {`'rounded-end'`}, {`'rounded-bottom'`}, {`'rounded-start'`}, {`'rounded-circle'`}, {`'rounded-pill'`}, {`'rounded-0'`}, {`'rounded-1'`}, {`'rounded-2'`}, {`'rounded-3'`}, {`string`} - Select the shape of the component. + +

Select the shape of the component.

+ size# @@ -45,7 +51,9 @@ import CAvatar from '@coreui/react/src/components/avatar/CAvatar' {`string`} - Size the component small, large, or extra large. + +

Size the component small, large, or extra large.

+ src# @@ -53,7 +61,9 @@ import CAvatar from '@coreui/react/src/components/avatar/CAvatar' {`string`} - The src attribute for the img element. + +

The src attribute for the img element.

+ status# @@ -61,7 +71,9 @@ import CAvatar from '@coreui/react/src/components/avatar/CAvatar' {`'primary'`}, {`'secondary'`}, {`'success'`}, {`'danger'`}, {`'warning'`}, {`'info'`}, {`'dark'`}, {`'light'`}, {`string`} - Sets the color context of the status indicator to one of CoreUI’s themed colors. + +

Sets the color context of the status indicator to one of CoreUI’s themed colors.

+ textColor# @@ -69,7 +81,9 @@ import CAvatar from '@coreui/react/src/components/avatar/CAvatar' {`'primary'`}, {`'secondary'`}, {`'success'`}, {`'danger'`}, {`'warning'`}, {`'info'`}, {`'dark'`}, {`'light'`}, {`'primary-emphasis'`}, {`'secondary-emphasis'`}, {`'success-emphasis'`}, {`'danger-emphasis'`}, {`'warning-emphasis'`}, {`'info-emphasis'`}, {`'light-emphasis'`}, {`'body'`}, {`'body-emphasis'`}, {`'body-secondary'`}, {`'body-tertiary'`}, {`'black'`}, {`'black-50'`}, {`'white'`}, {`'white-50'`}, {`string`} - Sets the text color of the component to one of CoreUI’s themed colors. + +

Sets the text color of the component to one of CoreUI’s themed colors.

+ diff --git a/packages/docs/content/api/CBackdrop.api.mdx b/packages/docs/content/api/CBackdrop.api.mdx index a39d1537..468688cc 100644 --- a/packages/docs/content/api/CBackdrop.api.mdx +++ b/packages/docs/content/api/CBackdrop.api.mdx @@ -21,7 +21,9 @@ import CBackdrop from '@coreui/react/src/components/backdrop/CBackdrop' {`string`} - A string of all className you want applied to the base component. + +

A string of all className you want applied to the base component.

+ visible# @@ -29,7 +31,9 @@ import CBackdrop from '@coreui/react/src/components/backdrop/CBackdrop' {`boolean`} - Toggle the visibility of modal component. + +

Toggle the visibility of modal component.

+ diff --git a/packages/docs/content/api/CBadge.api.mdx b/packages/docs/content/api/CBadge.api.mdx index 67e73873..68c20286 100644 --- a/packages/docs/content/api/CBadge.api.mdx +++ b/packages/docs/content/api/CBadge.api.mdx @@ -21,7 +21,9 @@ import CBadge from '@coreui/react/src/components/badge/CBadge' {`(ElementType & "symbol")`}, {`(ElementType & "object")`}, {`(ElementType & "span")`}, {`(ElementType & "slot")`}, {`(ElementType & "style")`}, {`... 174 more ...`}, {`(ElementType & FunctionComponent\<...>)`} - Component used for the root node. Either a string to use a HTML element or a component. + +

Component used for the root node. Either a string to use a HTML element or a component.

+ className# @@ -29,7 +31,9 @@ import CBadge from '@coreui/react/src/components/badge/CBadge' {`string`} - A string of all className you want applied to the component. + +

A string of all className you want applied to the component.

+ color# @@ -37,7 +41,9 @@ import CBadge from '@coreui/react/src/components/badge/CBadge' {`'primary'`}, {`'secondary'`}, {`'success'`}, {`'danger'`}, {`'warning'`}, {`'info'`}, {`'dark'`}, {`'light'`}, {`string`} - Sets the color context of the component to one of CoreUI’s themed colors. + +

Sets the color context of the component to one of CoreUI’s themed colors.

+ position# @@ -45,7 +51,9 @@ import CBadge from '@coreui/react/src/components/badge/CBadge' {`"top-start"`}, {`"top-end"`}, {`"bottom-end"`}, {`"bottom-start"`} - Position badge in one of the corners of a link or button. + +

Position badge in one of the corners of a link or button.

+ shape# @@ -53,7 +61,9 @@ import CBadge from '@coreui/react/src/components/badge/CBadge' {`'rounded'`}, {`'rounded-top'`}, {`'rounded-end'`}, {`'rounded-bottom'`}, {`'rounded-start'`}, {`'rounded-circle'`}, {`'rounded-pill'`}, {`'rounded-0'`}, {`'rounded-1'`}, {`'rounded-2'`}, {`'rounded-3'`}, {`string`} - Select the shape of the component. + +

Select the shape of the component.

+ size# @@ -61,7 +71,9 @@ import CBadge from '@coreui/react/src/components/badge/CBadge' {`"sm"`} - Size the component small. + +

Size the component small.

+ textBgColor#5.0.0+ @@ -69,7 +81,9 @@ import CBadge from '@coreui/react/src/components/badge/CBadge' {`'primary'`}, {`'secondary'`}, {`'success'`}, {`'danger'`}, {`'warning'`}, {`'info'`}, {`'dark'`}, {`'light'`}, {`string`} - Sets the component's color scheme to one of CoreUI's themed colors, ensuring the text color contrast adheres to the WCAG 4.5:1 contrast ratio standard for accessibility. + +

Sets the component's color scheme to one of CoreUI's themed colors, ensuring the text color contrast adheres to the WCAG 4.5:1 contrast ratio standard for accessibility.

+ textColor# @@ -77,7 +91,9 @@ import CBadge from '@coreui/react/src/components/badge/CBadge' {`'primary'`}, {`'secondary'`}, {`'success'`}, {`'danger'`}, {`'warning'`}, {`'info'`}, {`'dark'`}, {`'light'`}, {`'primary-emphasis'`}, {`'secondary-emphasis'`}, {`'success-emphasis'`}, {`'danger-emphasis'`}, {`'warning-emphasis'`}, {`'info-emphasis'`}, {`'light-emphasis'`}, {`'body'`}, {`'body-emphasis'`}, {`'body-secondary'`}, {`'body-tertiary'`}, {`'black'`}, {`'black-50'`}, {`'white'`}, {`'white-50'`}, {`string`} - Sets the text color of the component to one of CoreUI’s themed colors. + +

Sets the text color of the component to one of CoreUI’s themed colors.

+ diff --git a/packages/docs/content/api/CBreadcrumb.api.mdx b/packages/docs/content/api/CBreadcrumb.api.mdx index c6994e9e..2734c4d1 100644 --- a/packages/docs/content/api/CBreadcrumb.api.mdx +++ b/packages/docs/content/api/CBreadcrumb.api.mdx @@ -21,7 +21,9 @@ import CBreadcrumb from '@coreui/react/src/components/breadcrumb/CBreadcrumb' {`string`} - A string of all className you want applied to the component. + +

A string of all className you want applied to the component.

+ diff --git a/packages/docs/content/api/CBreadcrumbItem.api.mdx b/packages/docs/content/api/CBreadcrumbItem.api.mdx index e48c7a5e..eb75d64b 100644 --- a/packages/docs/content/api/CBreadcrumbItem.api.mdx +++ b/packages/docs/content/api/CBreadcrumbItem.api.mdx @@ -21,7 +21,9 @@ import CBreadcrumbItem from '@coreui/react/src/components/breadcrumb/CBreadcrumb {`boolean`} - Toggle the active state for the component. + +

Toggle the active state for the component.

+ as#5.4.0+ @@ -29,7 +31,9 @@ import CBreadcrumbItem from '@coreui/react/src/components/breadcrumb/CBreadcrumb {`(ElementType & "symbol")`}, {`(ElementType & "object")`}, {`(ElementType & "li")`}, {`(ElementType & "slot")`}, {`(ElementType & "style")`}, {`... 174 more ...`}, {`(ElementType & FunctionComponent\<...>)`} - Component used for the root node. Either a string to use a HTML element or a component. + +

Component used for the root node. Either a string to use a HTML element or a component.

+ className# @@ -37,7 +41,9 @@ import CBreadcrumbItem from '@coreui/react/src/components/breadcrumb/CBreadcrumb {`string`} - A string of all className you want applied to the base component. + +

A string of all className you want applied to the base component.

+ href# @@ -45,7 +51,9 @@ import CBreadcrumbItem from '@coreui/react/src/components/breadcrumb/CBreadcrumb {`string`} - The {`href`} attribute for the inner {`\`} component. + +

The {`href`} attribute for the inner {`<CLink>`} component.

+ diff --git a/packages/docs/content/api/CButton.api.mdx b/packages/docs/content/api/CButton.api.mdx index eabef071..b394aff0 100644 --- a/packages/docs/content/api/CButton.api.mdx +++ b/packages/docs/content/api/CButton.api.mdx @@ -21,7 +21,9 @@ import CButton from '@coreui/react/src/components/button/CButton' {`boolean`} - Toggle the active state for the component. + +

Toggle the active state for the component.

+ as# @@ -29,7 +31,9 @@ import CButton from '@coreui/react/src/components/button/CButton' {`(ElementType & "symbol")`}, {`(ElementType & "object")`}, {`(ElementType & "button")`}, {`(ElementType & "cite")`}, {`(ElementType & "data")`}, {`... 174 more ...`}, {`(ElementType & FunctionComponent\<...>)`} - Component used for the root node. Either a string to use a HTML element or a component. + +

Component used for the root node. Either a string to use a HTML element or a component.

+ className# @@ -37,7 +41,9 @@ import CButton from '@coreui/react/src/components/button/CButton' {`string`} - A string of all className you want applied to the base component. + +

A string of all className you want applied to the base component.

+ color# @@ -45,7 +51,9 @@ import CButton from '@coreui/react/src/components/button/CButton' {`'primary'`}, {`'secondary'`}, {`'success'`}, {`'danger'`}, {`'warning'`}, {`'info'`}, {`'dark'`}, {`'light'`}, {`string`} - Sets the color context of the component to one of CoreUI’s themed colors. + +

Sets the color context of the component to one of CoreUI’s themed colors.

+ disabled# @@ -53,7 +61,9 @@ import CButton from '@coreui/react/src/components/button/CButton' {`boolean`} - Toggle the disabled state for the component. + +

Toggle the disabled state for the component.

+ href# @@ -61,7 +71,9 @@ import CButton from '@coreui/react/src/components/button/CButton' {`string`} - The href attribute specifies the URL of the page the link goes to. + +

The href attribute specifies the URL of the page the link goes to.

+ role# @@ -69,7 +81,9 @@ import CButton from '@coreui/react/src/components/button/CButton' {`string`} - The role attribute describes the role of an element in programs that can make use of it, such as screen readers or magnifiers. + +

The role attribute describes the role of an element in programs that can make use of it, such as screen readers or magnifiers.

+ shape# @@ -77,7 +91,9 @@ import CButton from '@coreui/react/src/components/button/CButton' {`'rounded'`}, {`'rounded-top'`}, {`'rounded-end'`}, {`'rounded-bottom'`}, {`'rounded-start'`}, {`'rounded-circle'`}, {`'rounded-pill'`}, {`'rounded-0'`}, {`'rounded-1'`}, {`'rounded-2'`}, {`'rounded-3'`}, {`string`} - Select the shape of the component. + +

Select the shape of the component.

+ size# @@ -85,7 +101,9 @@ import CButton from '@coreui/react/src/components/button/CButton' {`"sm"`}, {`"lg"`} - Size the component small or large. + +

Size the component small or large.

+ type# @@ -93,7 +111,10 @@ import CButton from '@coreui/react/src/components/button/CButton' {`"button"`}, {`"submit"`}, {`"reset"`} - Specifies the type of button. Always specify the type attribute for the {`\
-able> -
diff --git a/packages/docs/content/api/CCharts.api.mdx b/packages/docs/content/api/CCharts.api.mdx index df4faa63..3278065f 100644 --- a/packages/docs/content/api/CCharts.api.mdx +++ b/packages/docs/content/api/CCharts.api.mdx @@ -21,7 +21,9 @@ import CChartBar from '@coreui/react-chartjs/src/CCharts' {`string`} - A string of all className you want applied to the base component. + +

A string of all className you want applied to the base component.

+ customTooltips# @@ -29,7 +31,9 @@ import CChartBar from '@coreui/react-chartjs/src/CCharts' {`boolean`} - Enables custom html based tooltips instead of standard tooltips. + +

Enables custom html based tooltips instead of standard tooltips.

+ data# @@ -37,7 +41,9 @@ import CChartBar from '@coreui/react-chartjs/src/CCharts' {`ChartData\`}, {`((canvas: HTMLCanvasElement) => ChartData\<...>)`} - The data object that is passed into the Chart.js chart (more info). + +

The data object that is passed into the Chart.js chart (more info).

+ fallbackContent# @@ -45,7 +51,9 @@ import CChartBar from '@coreui/react-chartjs/src/CCharts' {`React.ReactNode`} - A fallback for when the canvas cannot be rendered. Can be used for accessible chart descriptions. + +

A fallback for when the canvas cannot be rendered. Can be used for accessible chart descriptions.

+ getDatasetAtEvent# @@ -53,7 +61,9 @@ import CChartBar from '@coreui/react-chartjs/src/CCharts' {`(dataset: InteractionItem[], event: React.MouseEvent\) => void`} - Proxy for Chart.js getDatasetAtEvent. Calls with dataset and triggering event. + +

Proxy for Chart.js getDatasetAtEvent. Calls with dataset and triggering event.

+ getElementAtEvent# @@ -61,7 +71,9 @@ import CChartBar from '@coreui/react-chartjs/src/CCharts' {`(element: InteractionItem[], event: React.MouseEvent\) => void`} - Proxy for Chart.js getElementAtEvent. Calls with single element array and triggering event. + +

Proxy for Chart.js getElementAtEvent. Calls with single element array and triggering event.

+ getElementsAtEvent# @@ -69,7 +81,9 @@ import CChartBar from '@coreui/react-chartjs/src/CCharts' {`(elements: InteractionItem[], event: React.MouseEvent\) => void`} - Proxy for Chart.js getElementsAtEvent. Calls with element array and triggering event. + +

Proxy for Chart.js getElementsAtEvent. Calls with element array and triggering event.

+ height# @@ -77,7 +91,9 @@ import CChartBar from '@coreui/react-chartjs/src/CCharts' {`number`} - Height attribute applied to the rendered canvas. + +

Height attribute applied to the rendered canvas.

+ id# @@ -85,7 +101,9 @@ import CChartBar from '@coreui/react-chartjs/src/CCharts' {`string`} - ID attribute applied to the rendered canvas. + +

ID attribute applied to the rendered canvas.

+ options# @@ -93,7 +111,9 @@ import CChartBar from '@coreui/react-chartjs/src/CCharts' {`_DeepPartialObject\ & ElementChartOptions\ & PluginChartOptions\<...> & DatasetChartOptions\<...> & ScaleChartOptions\<...>>`} - The options object that is passed into the Chart.js chart. + +

The options object that is passed into the Chart.js chart.

+ plugins# @@ -101,7 +121,9 @@ import CChartBar from '@coreui/react-chartjs/src/CCharts' {`Plugin\[]`} - The plugins array that is passed into the Chart.js chart (more info) + +

The plugins array that is passed into the Chart.js chart (more info)

+ redraw# @@ -109,7 +131,9 @@ import CChartBar from '@coreui/react-chartjs/src/CCharts' {`boolean`} - If true, will tear down and redraw chart on all updates. + +

If true, will tear down and redraw chart on all updates.

+ width# @@ -117,7 +141,9 @@ import CChartBar from '@coreui/react-chartjs/src/CCharts' {`number`} - Width attribute applied to the rendered canvas. + +

Width attribute applied to the rendered canvas.

+ wrapper# @@ -125,7 +151,9 @@ import CChartBar from '@coreui/react-chartjs/src/CCharts' {`boolean`} - Put the chart into the wrapper div element. + +

Put the chart into the wrapper div element.

+ diff --git a/packages/docs/content/api/CCloseButton.api.mdx b/packages/docs/content/api/CCloseButton.api.mdx index 46f59259..fba3e552 100644 --- a/packages/docs/content/api/CCloseButton.api.mdx +++ b/packages/docs/content/api/CCloseButton.api.mdx @@ -21,7 +21,9 @@ import CCloseButton from '@coreui/react/src/components/close-button/CCloseButton {`string`} - A string of all className you want applied to the base component. + +

A string of all className you want applied to the base component.

+ dark# @@ -29,7 +31,9 @@ import CCloseButton from '@coreui/react/src/components/close-button/CCloseButton {`boolean`} - Invert the default color. + +

Invert the default color.

+ disabled# @@ -37,15 +41,19 @@ import CCloseButton from '@coreui/react/src/components/close-button/CCloseButton {`boolean`} - Toggle the disabled state for the component. + +

Toggle the disabled state for the component.

+ - white#Deprecated undefined + white#Deprecated 5.0.0 undefined {`boolean`} - Change the default color to white. + +

Change the default color to white.

+ diff --git a/packages/docs/content/api/CCol.api.mdx b/packages/docs/content/api/CCol.api.mdx index a905bd79..90cba258 100644 --- a/packages/docs/content/api/CCol.api.mdx +++ b/packages/docs/content/api/CCol.api.mdx @@ -21,7 +21,9 @@ import CCol from '@coreui/react/src/components/grid/CCol' {`string`} - A string of all className you want applied to the base component. + +

A string of all className you want applied to the base component.

+ lg# @@ -29,7 +31,9 @@ import CCol from '@coreui/react/src/components/grid/CCol' {`{ 'auto' | number | string | boolean | { span: 'auto' | number | string | boolean } | { offset: number | string } | { order: 'first' | 'last' | number | string }}`} - The number of columns/offset/order on large devices (\<1200px). + +

The number of columns/offset/order on large devices (<1200px).

+ md# @@ -37,7 +41,9 @@ import CCol from '@coreui/react/src/components/grid/CCol' {`{ 'auto' | number | string | boolean | { span: 'auto' | number | string | boolean } | { offset: number | string } | { order: 'first' | 'last' | number | string }}`} - The number of columns/offset/order on medium devices (\<992px). + +

The number of columns/offset/order on medium devices (<992px).

+ sm# @@ -45,7 +51,9 @@ import CCol from '@coreui/react/src/components/grid/CCol' {`{ 'auto' | number | string | boolean | { span: 'auto' | number | string | boolean } | { offset: number | string } | { order: 'first' | 'last' | number | string }}`} - The number of columns/offset/order on small devices (\<768px). + +

The number of columns/offset/order on small devices (<768px).

+ xl# @@ -53,7 +61,9 @@ import CCol from '@coreui/react/src/components/grid/CCol' {`{ 'auto' | number | string | boolean | { span: 'auto' | number | string | boolean } | { offset: number | string } | { order: 'first' | 'last' | number | string }}`} - The number of columns/offset/order on X-Large devices (\<1400px). + +

The number of columns/offset/order on X-Large devices (<1400px).

+ xs# @@ -61,7 +71,9 @@ import CCol from '@coreui/react/src/components/grid/CCol' {`{ 'auto' | number | string | boolean | { span: 'auto' | number | string | boolean } | { offset: number | string } | { order: 'first' | 'last' | number | string }}`} - The number of columns/offset/order on extra small devices (\<576px). + +

The number of columns/offset/order on extra small devices (<576px).

+ xxl# @@ -69,7 +81,9 @@ import CCol from '@coreui/react/src/components/grid/CCol' {`{ 'auto' | number | string | boolean | { span: 'auto' | number | string | boolean } | { offset: number | string } | { order: 'first' | 'last' | number | string }}`} - The number of columns/offset/order on XX-Large devices (≥1400px). + +

The number of columns/offset/order on XX-Large devices (≥1400px).

+ diff --git a/packages/docs/content/api/CCollapse.api.mdx b/packages/docs/content/api/CCollapse.api.mdx index 3fe185f9..997d55fd 100644 --- a/packages/docs/content/api/CCollapse.api.mdx +++ b/packages/docs/content/api/CCollapse.api.mdx @@ -21,7 +21,9 @@ import CCollapse from '@coreui/react/src/components/collapse/CCollapse' {`string`} - A string of all className you want applied to the base component. + +

A string of all className you want applied to the base component.

+ horizontal# @@ -29,7 +31,9 @@ import CCollapse from '@coreui/react/src/components/collapse/CCollapse' {`boolean`} - Set horizontal collapsing to transition the width instead of height. + +

Set horizontal collapsing to transition the width instead of height.

+ onHide# @@ -37,7 +41,9 @@ import CCollapse from '@coreui/react/src/components/collapse/CCollapse' {`() => void`} - Callback fired when the component requests to be hidden. + +

Callback fired when the component requests to be hidden.

+ onShow# @@ -45,7 +51,9 @@ import CCollapse from '@coreui/react/src/components/collapse/CCollapse' {`() => void`} - Callback fired when the component requests to be shown. + +

Callback fired when the component requests to be shown.

+ visible# @@ -53,7 +61,9 @@ import CCollapse from '@coreui/react/src/components/collapse/CCollapse' {`boolean`} - Toggle the visibility of component. + +

Toggle the visibility of component.

+ diff --git a/packages/docs/content/api/CConditionalPortal.api.mdx b/packages/docs/content/api/CConditionalPortal.api.mdx index 1b24cc9d..18508ee1 100644 --- a/packages/docs/content/api/CConditionalPortal.api.mdx +++ b/packages/docs/content/api/CConditionalPortal.api.mdx @@ -21,7 +21,9 @@ import CConditionalPortal from '@coreui/react/src/components/conditional-portal/ {`DocumentFragment`}, {`Element`}, {`(() => DocumentFragment | Element)`} - An HTML element or function that returns a single element, with {`document.body`} as the default. + +

An HTML element or function that returns a single element, with {`document.body`} as the default.

+ portal# @@ -29,7 +31,9 @@ import CConditionalPortal from '@coreui/react/src/components/conditional-portal/ {`boolean`} - Render some children into a different part of the DOM + +

Render some children into a different part of the DOM

+ diff --git a/packages/docs/content/api/CContainer.api.mdx b/packages/docs/content/api/CContainer.api.mdx index 23928448..d98c8ead 100644 --- a/packages/docs/content/api/CContainer.api.mdx +++ b/packages/docs/content/api/CContainer.api.mdx @@ -21,7 +21,9 @@ import CContainer from '@coreui/react/src/components/grid/CContainer' {`string`} - A string of all className you want applied to the base component. + +

A string of all className you want applied to the base component.

+ fluid# @@ -29,7 +31,9 @@ import CContainer from '@coreui/react/src/components/grid/CContainer' {`boolean`} - Set container 100% wide, spanning the entire width of the viewport. + +

Set container 100% wide, spanning the entire width of the viewport.

+ lg# @@ -37,7 +41,9 @@ import CContainer from '@coreui/react/src/components/grid/CContainer' {`boolean`} - Set container 100% wide until large breakpoint. + +

Set container 100% wide until large breakpoint.

+ md# @@ -45,7 +51,9 @@ import CContainer from '@coreui/react/src/components/grid/CContainer' {`boolean`} - Set container 100% wide until medium breakpoint. + +

Set container 100% wide until medium breakpoint.

+ sm# @@ -53,7 +61,9 @@ import CContainer from '@coreui/react/src/components/grid/CContainer' {`boolean`} - Set container 100% wide until small breakpoint. + +

Set container 100% wide until small breakpoint.

+ xl# @@ -61,7 +71,9 @@ import CContainer from '@coreui/react/src/components/grid/CContainer' {`boolean`} - Set container 100% wide until X-large breakpoint. + +

Set container 100% wide until X-large breakpoint.

+ xxl# @@ -69,7 +81,9 @@ import CContainer from '@coreui/react/src/components/grid/CContainer' {`boolean`} - Set container 100% wide until XX-large breakpoint. + +

Set container 100% wide until XX-large breakpoint.

+ diff --git a/packages/docs/content/api/CDropdown.api.mdx b/packages/docs/content/api/CDropdown.api.mdx index ef5afd8f..5262dcc9 100644 --- a/packages/docs/content/api/CDropdown.api.mdx +++ b/packages/docs/content/api/CDropdown.api.mdx @@ -21,7 +21,9 @@ import CDropdown from '@coreui/react/src/components/dropdown/CDropdown' {`'start'`}, {`'end'`}, {`{ xs: 'start' | 'end' }`}, {`{ sm: 'start' | 'end' }`}, {`{ md: 'start' | 'end' }`}, {`{ lg: 'start' | 'end' }`}, {`{ xl: 'start' | 'end'}`}, {`{ xxl: 'start' | 'end'}`} - Set aligment of dropdown menu. + +

Set aligment of dropdown menu.

+ as# @@ -29,7 +31,9 @@ import CDropdown from '@coreui/react/src/components/dropdown/CDropdown' {`(ElementType & "symbol")`}, {`(ElementType & "object")`}, {`(ElementType & "div")`}, {`(ElementType & "slot")`}, {`(ElementType & "style")`}, {`... 174 more ...`}, {`(ElementType & FunctionComponent\<...>)`} - Component used for the root node. Either a string to use a HTML element or a component. + +

Component used for the root node. Either a string to use a HTML element or a component.

+ autoClose# @@ -37,7 +41,15 @@ import CDropdown from '@coreui/react/src/components/dropdown/CDropdown' {`boolean`}, {`"inside"`}, {`"outside"`} - Configure the auto close behavior of the dropdown:
- {`true`} - the dropdown will be closed by clicking outside or inside the dropdown menu.
- {`false`} - the dropdown will be closed by clicking the toggle button and manually calling hide or toggle method. (Also will not be closed by pressing esc key)
- {`'inside'`} - the dropdown will be closed (only) by clicking inside the dropdown menu.
- {`'outside'`} - the dropdown will be closed (only) by clicking outside the dropdown menu. + +

Configure the auto close behavior of the dropdown:

+
    +
  • {`true`} - the dropdown will be closed by clicking outside or inside the dropdown menu.
  • +
  • {`false`} - the dropdown will be closed by clicking the toggle button and manually calling hide or toggle method. (Also will not be closed by pressing esc key)
  • +
  • {`'inside'`} - the dropdown will be closed (only) by clicking inside the dropdown menu.
  • +
  • {`'outside'`} - the dropdown will be closed (only) by clicking outside the dropdown menu.
  • +
+ className# @@ -45,7 +57,9 @@ import CDropdown from '@coreui/react/src/components/dropdown/CDropdown' {`string`} - A string of all className you want applied to the base component. + +

A string of all className you want applied to the base component.

+ container#4.11.0+ @@ -53,7 +67,9 @@ import CDropdown from '@coreui/react/src/components/dropdown/CDropdown' {`Element`}, {`DocumentFragment`}, {`(() => Element | DocumentFragment)`} - Appends the react dropdown menu to a specific element. You can pass an HTML element or function that returns a single element. By default {`document.body`}. + +

Appends the react dropdown menu to a specific element. You can pass an HTML element or function that returns a single element. By default {`document.body`}.

+ dark# @@ -61,7 +77,9 @@ import CDropdown from '@coreui/react/src/components/dropdown/CDropdown' {`boolean`} - Sets a darker color scheme to match a dark navbar. + +

Sets a darker color scheme to match a dark navbar.

+ direction# @@ -69,7 +87,9 @@ import CDropdown from '@coreui/react/src/components/dropdown/CDropdown' {`"center"`}, {`"dropup"`}, {`"dropup-center"`}, {`"dropend"`}, {`"dropstart"`} - Sets a specified direction and location of the dropdown menu. + +

Sets a specified direction and location of the dropdown menu.

+ offset# @@ -77,7 +97,9 @@ import CDropdown from '@coreui/react/src/components/dropdown/CDropdown' {`[number, number]`} - Offset of the dropdown menu relative to its target. + +

Offset of the dropdown menu relative to its target.

+ onHide#4.9.0+ @@ -85,7 +107,9 @@ import CDropdown from '@coreui/react/src/components/dropdown/CDropdown' {`() => void`} - Callback fired when the component requests to be hidden. + +

Callback fired when the component requests to be hidden.

+ onShow# @@ -93,7 +117,9 @@ import CDropdown from '@coreui/react/src/components/dropdown/CDropdown' {`() => void`} - Callback fired when the component requests to be shown. + +

Callback fired when the component requests to be shown.

+ placement# @@ -101,7 +127,9 @@ import CDropdown from '@coreui/react/src/components/dropdown/CDropdown' {`'auto'`}, {`'top-end'`}, {`'top'`}, {`'top-start'`}, {`'bottom-end'`}, {`'bottom'`}, {`'bottom-start'`}, {`'right-start'`}, {`'right'`}, {`'right-end'`}, {`'left-start'`}, {`'left'`}, {`'left-end'`} - Describes the placement of your component after Popper.js has applied all the modifiers that may have flipped or altered the originally provided placement property. + +

Describes the placement of your component after Popper.js has applied all the modifiers that may have flipped or altered the originally provided placement property.

+ popper# @@ -109,7 +137,9 @@ import CDropdown from '@coreui/react/src/components/dropdown/CDropdown' {`boolean`} - If you want to disable dynamic positioning set this property to {`true`}. + +

If you want to disable dynamic positioning set this property to {`true`}.

+ portal#4.8.0+ @@ -117,7 +147,9 @@ import CDropdown from '@coreui/react/src/components/dropdown/CDropdown' {`boolean`} - Generates dropdown menu using createPortal. + +

Generates dropdown menu using createPortal.

+ variant# @@ -125,7 +157,9 @@ import CDropdown from '@coreui/react/src/components/dropdown/CDropdown' {`"btn-group"`}, {`"dropdown"`}, {`"input-group"`}, {`"nav-item"`} - Set the dropdown variant to an btn-group, dropdown, input-group, and nav-item. + +

Set the dropdown variant to an btn-group, dropdown, input-group, and nav-item.

+ visible# @@ -133,7 +167,9 @@ import CDropdown from '@coreui/react/src/components/dropdown/CDropdown' {`boolean`} - Toggle the visibility of dropdown menu component. + +

Toggle the visibility of dropdown menu component.

+ diff --git a/packages/docs/content/api/CDropdownDivider.api.mdx b/packages/docs/content/api/CDropdownDivider.api.mdx index c364ba91..aaab8e37 100644 --- a/packages/docs/content/api/CDropdownDivider.api.mdx +++ b/packages/docs/content/api/CDropdownDivider.api.mdx @@ -21,7 +21,9 @@ import CDropdownDivider from '@coreui/react/src/components/dropdown/CDropdownDiv {`string`} - A string of all className you want applied to the component. + +

A string of all className you want applied to the component.

+ diff --git a/packages/docs/content/api/CDropdownHeader.api.mdx b/packages/docs/content/api/CDropdownHeader.api.mdx index 727ce4dc..7652f974 100644 --- a/packages/docs/content/api/CDropdownHeader.api.mdx +++ b/packages/docs/content/api/CDropdownHeader.api.mdx @@ -21,7 +21,9 @@ import CDropdownHeader from '@coreui/react/src/components/dropdown/CDropdownHead {`(ElementType & "symbol")`}, {`(ElementType & "object")`}, {`(ElementType & "h6")`}, {`(ElementType & "slot")`}, {`(ElementType & "style")`}, {`... 174 more ...`}, {`(ElementType & FunctionComponent\<...>)`} - Component used for the root node. Either a string to use a HTML element or a component. + +

Component used for the root node. Either a string to use a HTML element or a component.

+ className# @@ -29,7 +31,9 @@ import CDropdownHeader from '@coreui/react/src/components/dropdown/CDropdownHead {`string`} - A string of all className you want applied to the component. + +

A string of all className you want applied to the component.

+ diff --git a/packages/docs/content/api/CDropdownItem.api.mdx b/packages/docs/content/api/CDropdownItem.api.mdx index 210289c3..7bc03b89 100644 --- a/packages/docs/content/api/CDropdownItem.api.mdx +++ b/packages/docs/content/api/CDropdownItem.api.mdx @@ -21,7 +21,9 @@ import CDropdownItem from '@coreui/react/src/components/dropdown/CDropdownItem' {`boolean`} - Toggle the active state for the component. + +

Toggle the active state for the component.

+ as# @@ -29,7 +31,9 @@ import CDropdownItem from '@coreui/react/src/components/dropdown/CDropdownItem' {`(ElementType & "symbol")`}, {`(ElementType & "object")`}, {`(ElementType & "a")`}, {`(ElementType & "cite")`}, {`(ElementType & "data")`}, {`... 174 more ...`}, {`(ElementType & FunctionComponent\<...>)`} - Component used for the root node. Either a string to use a HTML element or a component. + +

Component used for the root node. Either a string to use a HTML element or a component.

+ className# @@ -37,7 +41,9 @@ import CDropdownItem from '@coreui/react/src/components/dropdown/CDropdownItem' {`string`} - A string of all className you want applied to the component. + +

A string of all className you want applied to the component.

+ disabled# @@ -45,7 +51,9 @@ import CDropdownItem from '@coreui/react/src/components/dropdown/CDropdownItem' {`boolean`} - Toggle the disabled state for the component. + +

Toggle the disabled state for the component.

+ href# @@ -53,7 +61,9 @@ import CDropdownItem from '@coreui/react/src/components/dropdown/CDropdownItem' {`string`} - The href attribute specifies the URL of the page the link goes to. + +

The href attribute specifies the URL of the page the link goes to.

+ diff --git a/packages/docs/content/api/CDropdownItemPlain.api.mdx b/packages/docs/content/api/CDropdownItemPlain.api.mdx index 77b6a09b..074f67b0 100644 --- a/packages/docs/content/api/CDropdownItemPlain.api.mdx +++ b/packages/docs/content/api/CDropdownItemPlain.api.mdx @@ -21,7 +21,9 @@ import CDropdownItemPlain from '@coreui/react/src/components/dropdown/CDropdownI {`(ElementType & "symbol")`}, {`(ElementType & "object")`}, {`(ElementType & "span")`}, {`(ElementType & "slot")`}, {`(ElementType & "style")`}, {`... 174 more ...`}, {`(ElementType & FunctionComponent\<...>)`} - Component used for the root node. Either a string to use a HTML element or a component. + +

Component used for the root node. Either a string to use a HTML element or a component.

+ className# @@ -29,7 +31,9 @@ import CDropdownItemPlain from '@coreui/react/src/components/dropdown/CDropdownI {`string`} - A string of all className you want applied to the component. + +

A string of all className you want applied to the component.

+ diff --git a/packages/docs/content/api/CDropdownMenu.api.mdx b/packages/docs/content/api/CDropdownMenu.api.mdx index 659abcb3..cef37751 100644 --- a/packages/docs/content/api/CDropdownMenu.api.mdx +++ b/packages/docs/content/api/CDropdownMenu.api.mdx @@ -21,7 +21,9 @@ import CDropdownMenu from '@coreui/react/src/components/dropdown/CDropdownMenu' {`(ElementType & "symbol")`}, {`(ElementType & "object")`}, {`(ElementType & "ul")`}, {`(ElementType & "slot")`}, {`(ElementType & "style")`}, {`... 174 more ...`}, {`(ElementType & FunctionComponent\<...>)`} - Component used for the root node. Either a string to use a HTML element or a component. + +

Component used for the root node. Either a string to use a HTML element or a component.

+ className# @@ -29,7 +31,9 @@ import CDropdownMenu from '@coreui/react/src/components/dropdown/CDropdownMenu' {`string`} - A string of all className you want applied to the base component. + +

A string of all className you want applied to the base component.

+ diff --git a/packages/docs/content/api/CDropdownToggle.api.mdx b/packages/docs/content/api/CDropdownToggle.api.mdx index c8e5832f..cd887421 100644 --- a/packages/docs/content/api/CDropdownToggle.api.mdx +++ b/packages/docs/content/api/CDropdownToggle.api.mdx @@ -21,7 +21,9 @@ import CDropdownToggle from '@coreui/react/src/components/dropdown/CDropdownTogg {`boolean`} - Toggle the active state for the component. + +

Toggle the active state for the component.

+ as# @@ -29,7 +31,9 @@ import CDropdownToggle from '@coreui/react/src/components/dropdown/CDropdownTogg {`ElementType`} - Component used for the root node. Either a string to use a HTML element or a component. + +

Component used for the root node. Either a string to use a HTML element or a component.

+ caret# @@ -37,7 +41,9 @@ import CDropdownToggle from '@coreui/react/src/components/dropdown/CDropdownTogg {`boolean`} - Enables pseudo element caret on toggler. + +

Enables pseudo element caret on toggler.

+ className# @@ -45,7 +51,9 @@ import CDropdownToggle from '@coreui/react/src/components/dropdown/CDropdownTogg {`string`} - A string of all className you want applied to the base component. + +

A string of all className you want applied to the base component.

+ color# @@ -53,7 +61,9 @@ import CDropdownToggle from '@coreui/react/src/components/dropdown/CDropdownTogg {`'primary'`}, {`'secondary'`}, {`'success'`}, {`'danger'`}, {`'warning'`}, {`'info'`}, {`'dark'`}, {`'light'`}, {`string`} - Sets the color context of the component to one of CoreUI’s themed colors. + +

Sets the color context of the component to one of CoreUI’s themed colors.

+ custom# @@ -61,7 +71,9 @@ import CDropdownToggle from '@coreui/react/src/components/dropdown/CDropdownTogg {`boolean`} - Create a custom toggler which accepts any content. + +

Create a custom toggler which accepts any content.

+ disabled# @@ -69,7 +81,9 @@ import CDropdownToggle from '@coreui/react/src/components/dropdown/CDropdownTogg {`boolean`} - Toggle the disabled state for the component. + +

Toggle the disabled state for the component.

+ href# @@ -77,7 +91,9 @@ import CDropdownToggle from '@coreui/react/src/components/dropdown/CDropdownTogg {`string`} - The href attribute specifies the URL of the page the link goes to. + +

The href attribute specifies the URL of the page the link goes to.

+ navLink#5.0.0+ @@ -85,7 +101,9 @@ import CDropdownToggle from '@coreui/react/src/components/dropdown/CDropdownTogg {`boolean`} - If a dropdown {`variant`} is set to {`nav-item`} then render the toggler as a link instead of a button. + +

If a dropdown {`variant`} is set to {`nav-item`} then render the toggler as a link instead of a button.

+ role# @@ -93,7 +111,9 @@ import CDropdownToggle from '@coreui/react/src/components/dropdown/CDropdownTogg {`string`} - The role attribute describes the role of an element in programs that can make use of it, such as screen readers or magnifiers. + +

The role attribute describes the role of an element in programs that can make use of it, such as screen readers or magnifiers.

+ shape# @@ -101,7 +121,9 @@ import CDropdownToggle from '@coreui/react/src/components/dropdown/CDropdownTogg {`'rounded'`}, {`'rounded-top'`}, {`'rounded-end'`}, {`'rounded-bottom'`}, {`'rounded-start'`}, {`'rounded-circle'`}, {`'rounded-pill'`}, {`'rounded-0'`}, {`'rounded-1'`}, {`'rounded-2'`}, {`'rounded-3'`}, {`string`} - Select the shape of the component. + +

Select the shape of the component.

+ size# @@ -109,7 +131,9 @@ import CDropdownToggle from '@coreui/react/src/components/dropdown/CDropdownTogg {`"sm"`}, {`"lg"`} - Size the component small or large. + +

Size the component small or large.

+ split# @@ -117,7 +141,9 @@ import CDropdownToggle from '@coreui/react/src/components/dropdown/CDropdownTogg {`boolean`} - Similarly, create split button dropdowns with virtually the same markup as single button dropdowns, but with the addition of {`.dropdown-toggle-split`} className for proper spacing around the dropdown caret. + +

Similarly, create split button dropdowns with virtually the same markup as single button dropdowns, but with the addition of {`.dropdown-toggle-split`} className for proper spacing around the dropdown caret.

+ trigger# @@ -125,7 +151,9 @@ import CDropdownToggle from '@coreui/react/src/components/dropdown/CDropdownTogg {`'hover'`}, {`'focus'`}, {`'click'`} - Sets which event handlers you’d like provided to your toggle prop. You can specify one trigger or an array of them. + +

Sets which event handlers you’d like provided to your toggle prop. You can specify one trigger or an array of them.

+ variant# @@ -133,7 +161,9 @@ import CDropdownToggle from '@coreui/react/src/components/dropdown/CDropdownTogg {`"outline"`}, {`"ghost"`} - Set the button variant to an outlined button or a ghost button. + +

Set the button variant to an outlined button or a ghost button.

+ diff --git a/packages/docs/content/api/CFooter.api.mdx b/packages/docs/content/api/CFooter.api.mdx index 91d28698..d58c8223 100644 --- a/packages/docs/content/api/CFooter.api.mdx +++ b/packages/docs/content/api/CFooter.api.mdx @@ -21,7 +21,9 @@ import CFooter from '@coreui/react/src/components/footer/CFooter' {`string`} - A string of all className you want applied to the base component. + +

A string of all className you want applied to the base component.

+ position# @@ -29,7 +31,9 @@ import CFooter from '@coreui/react/src/components/footer/CFooter' {`"fixed"`}, {`"sticky"`} - Place footer in non-static positions. + +

Place footer in non-static positions.

+ diff --git a/packages/docs/content/api/CForm.api.mdx b/packages/docs/content/api/CForm.api.mdx index e1fca1e0..7de87b14 100644 --- a/packages/docs/content/api/CForm.api.mdx +++ b/packages/docs/content/api/CForm.api.mdx @@ -21,7 +21,36 @@ import CForm from '@coreui/react/src/components/form/CForm' {`string`} - A string of all className you want applied to the component. + +

A string of additional CSS class names to apply to the form component.

+ `} /> + + + + customClassNames#v5.5.0+ + undefined + {`Partial\<{ FORM: string; FORM_VALIDATED: string; }>`} + + + +

Custom class names to override or extend the default CSS classes used within the {`CForm`} component.
+Each key corresponds to a specific part of the Form component, allowing for granular styling control.

+

Important: If you want to replace an existing class name, prefix your custom class name with {`!`}.
+This ensures that the original class is overridden rather than appended.

+ + +// Extending the default form class without replacing it +const customClasses = { + FORM: 'my-additional-form-class', +} + +`} /> + validated# @@ -29,7 +58,12 @@ import CForm from '@coreui/react/src/components/form/CForm' {`boolean`} - Mark a form as validated. If you set it {`true`}, all validation styles will be applied to the forms component. + +

Mark a form as validated. If set to {`true`}, all validation styles will be applied to the form component.

+ + // Form elements +
`} /> + diff --git a/packages/docs/content/api/CFormCheck.api.mdx b/packages/docs/content/api/CFormCheck.api.mdx index 59fcbea7..09bd351b 100644 --- a/packages/docs/content/api/CFormCheck.api.mdx +++ b/packages/docs/content/api/CFormCheck.api.mdx @@ -21,7 +21,10 @@ import CFormCheck from '@coreui/react/src/components/form/CFormCheck' {`ButtonObject`} - Create button-like checkboxes and radio buttons. + +

Create button-like checkboxes and radio buttons.

+ `} /> + className# @@ -29,7 +32,36 @@ import CFormCheck from '@coreui/react/src/components/form/CFormCheck' {`string`} - A string of all className you want applied to the component. + +

A string of additional CSS class names to apply to the form check component.

+ `} /> + + + + customClassNames#v5.5.0+ + undefined + {`Partial\>`} + + + +

Custom class names to override or extend the default CSS classes used within the {`CFormCheck`} component.
+Each key corresponds to a specific part of the Form Check component, allowing for granular styling control.

+

Important: If you want to replace an existing class name, prefix your custom class name with {`!`}.
+This ensures that the original class is overridden rather than appended.

+ + +// Extending the default form check label class without replacing it +const customClasses = { + FORM_CHECK_LABEL: 'my-additional-form-check-label', +} + +`} /> + feedback#4.2.0+ @@ -37,7 +69,10 @@ import CFormCheck from '@coreui/react/src/components/form/CFormCheck' {`ReactNode`} - Provide valuable, actionable feedback. + +

Provide valuable, actionable feedback.

+ `} /> + feedbackInvalid#4.2.0+ @@ -45,7 +80,10 @@ import CFormCheck from '@coreui/react/src/components/form/CFormCheck' {`ReactNode`} - Provide valuable, actionable feedback. + +

Provide valuable, actionable feedback when the form control is in an invalid state.

+ `} /> + feedbackValid#4.2.0+ @@ -53,7 +91,10 @@ import CFormCheck from '@coreui/react/src/components/form/CFormCheck' {`ReactNode`} - Provide valuable, actionable invalid feedback when using standard HTML form validation which applied two CSS pseudo-classes, {`:invalid`} and {`:valid`}. + +

Provide valuable, actionable feedback when the form control is in a valid state.

+ `} /> + floatingLabel#4.2.0+ @@ -61,7 +102,10 @@ import CFormCheck from '@coreui/react/src/components/form/CFormCheck' {`ReactNode`} - Provide valuable, actionable valid feedback when using standard HTML form validation which applied two CSS pseudo-classes, {`:invalid`} and {`:valid`}. + +

Provide a floating label for the form control.

+ `} /> + hitArea# @@ -69,7 +113,10 @@ import CFormCheck from '@coreui/react/src/components/form/CFormCheck' {`"full"`} - Sets hit area to the full area of the component. + +

Sets hit area to the full area of the component.

+ `} /> + id# @@ -77,7 +124,10 @@ import CFormCheck from '@coreui/react/src/components/form/CFormCheck' {`string`} - The id global attribute defines an identifier (ID) that must be unique in the whole document. + +

The id global attribute defines an identifier (ID) that must be unique in the whole document.

+ `} /> + indeterminate# @@ -85,7 +135,10 @@ import CFormCheck from '@coreui/react/src/components/form/CFormCheck' {`boolean`} - Input Checkbox indeterminate Property. + +

Input Checkbox indeterminate Property.

+ `} /> + inline# @@ -93,7 +146,11 @@ import CFormCheck from '@coreui/react/src/components/form/CFormCheck' {`boolean`} - Group checkboxes or radios on the same horizontal row. + +

Group checkboxes or radios on the same horizontal row.

+ +`} /> + invalid# @@ -101,7 +158,10 @@ import CFormCheck from '@coreui/react/src/components/form/CFormCheck' {`boolean`} - Set component validation state to invalid. + +

Set component validation state to invalid. When {`true`}, applies the invalid feedback styling.

+ `} /> + label# @@ -109,15 +169,21 @@ import CFormCheck from '@coreui/react/src/components/form/CFormCheck' {`ReactNode`} - The element represents a caption for a component. + +

The element represents a caption for a component.

+ `} /> + - reverse# + reverse#4.7.0+ undefined {`boolean`} - Put checkboxes or radios on the opposite side. + +

Put checkboxes or radios on the opposite side. Useful for right-to-left layouts or specific design requirements.

+ `} /> + tooltipFeedback#4.2.0+ @@ -125,7 +191,10 @@ import CFormCheck from '@coreui/react/src/components/form/CFormCheck' {`boolean`} - Display validation feedback in a styled tooltip. + +

Display validation feedback in a styled tooltip.

+ `} /> + type# @@ -133,7 +202,12 @@ import CFormCheck from '@coreui/react/src/components/form/CFormCheck' {`"checkbox"`}, {`"radio"`} - Specifies the type of component. + +

Specifies the type of component. Can be either {`checkbox`} or {`radio`}.

+ + +`} /> + valid# @@ -141,7 +215,10 @@ import CFormCheck from '@coreui/react/src/components/form/CFormCheck' {`boolean`} - Set component validation state to valid. + +

Set component validation state to valid. When {`true`}, applies the valid feedback styling.

+ `} /> + diff --git a/packages/docs/content/api/CFormControlValidation.api.mdx b/packages/docs/content/api/CFormControlValidation.api.mdx index be49958a..aa642627 100644 --- a/packages/docs/content/api/CFormControlValidation.api.mdx +++ b/packages/docs/content/api/CFormControlValidation.api.mdx @@ -15,13 +15,42 @@ import CFormControlValidation from '@coreui/react/src/components/form/CFormContr + + customClassNames#v5.5.0+ + undefined + {`Partial\<{ INVALID_FEEDBACK: string; INVALID_TOOLTIP: string; VALID_FEEDBACK: string; VALID_TOOLTIP: string; }>`} + + + +

Custom class names to override or extend the default CSS classes used within the {`CFormControlValidation`} component.
+Each key corresponds to a specific part of the Form Feedback component, allowing for granular styling control.

+

Important: If you want to replace an existing class name, prefix your custom class name with {`!`}.
+This ensures that the original class is overridden rather than appended.

+ + +// Extending the default form feedback class without replacing it +const customClasses = { + FORM_FEEDBACK: 'my-additional-form-feedback', +} + +`} /> + + feedback#4.2.0+ undefined {`ReactNode`} - Provide valuable, actionable feedback. + +

Provide valuable, actionable feedback.

+ `} /> + feedbackInvalid#4.2.0+ @@ -29,7 +58,10 @@ import CFormControlValidation from '@coreui/react/src/components/form/CFormContr {`ReactNode`} - Provide valuable, actionable feedback. + +

Provide valuable, actionable feedback when the form control is in an invalid state.

+ `} /> + feedbackValid#4.2.0+ @@ -37,7 +69,10 @@ import CFormControlValidation from '@coreui/react/src/components/form/CFormContr {`ReactNode`} - Provide valuable, actionable invalid feedback when using standard HTML form validation which applied two CSS pseudo-classes, {`:invalid`} and {`:valid`}. + +

Provide valuable, actionable feedback when the form control is in a valid state.

+ `} /> + floatingLabel#4.2.0+ @@ -45,7 +80,10 @@ import CFormControlValidation from '@coreui/react/src/components/form/CFormContr {`ReactNode`} - Provide valuable, actionable valid feedback when using standard HTML form validation which applied two CSS pseudo-classes, {`:invalid`} and {`:valid`}. + +

Provide a floating label for the form control.

+ `} /> + invalid# @@ -53,7 +91,10 @@ import CFormControlValidation from '@coreui/react/src/components/form/CFormContr {`boolean`} - Set component validation state to invalid. + +

Set the form control validation state to invalid. When {`true`}, applies the invalid feedback styling.

+ `} /> + tooltipFeedback#4.2.0+ @@ -61,7 +102,10 @@ import CFormControlValidation from '@coreui/react/src/components/form/CFormContr {`boolean`} - Display validation feedback in a styled tooltip. + +

Display validation feedback in a styled tooltip.

+ `} /> + valid# @@ -69,7 +113,10 @@ import CFormControlValidation from '@coreui/react/src/components/form/CFormContr {`boolean`} - Set component validation state to valid. + +

Set the form control validation state to valid. When {`true`}, applies the valid feedback styling.

+ `} /> + diff --git a/packages/docs/content/api/CFormControlWrapper.api.mdx b/packages/docs/content/api/CFormControlWrapper.api.mdx index 49ab36b1..b737d7df 100644 --- a/packages/docs/content/api/CFormControlWrapper.api.mdx +++ b/packages/docs/content/api/CFormControlWrapper.api.mdx @@ -15,13 +15,29 @@ import CFormControlWrapper from '@coreui/react/src/components/form/CFormControlW + + customClassNames#v5.5.0+ + undefined + {`Partial\>`} + + + +

Custom class names to override or extend the default CSS classes used within the {`CFormControlWrapper`} component.
+Each key corresponds to a specific part of the Form Feedback component, allowing for granular styling control.

+

Important: If you want to replace an existing class name, prefix your custom class name with {`!`}.
+This ensures that the original class is overridden rather than appended.

+ + feedback#4.2.0+ undefined {`ReactNode`} - Provide valuable, actionable feedback. + +

Provide valuable, actionable feedback.

+ `} /> + feedbackInvalid#4.2.0+ @@ -29,7 +45,10 @@ import CFormControlWrapper from '@coreui/react/src/components/form/CFormControlW {`ReactNode`} - Provide valuable, actionable feedback. + +

Provide valuable, actionable feedback when the form control is in an invalid state.

+ `} /> + feedbackValid#4.2.0+ @@ -37,7 +56,10 @@ import CFormControlWrapper from '@coreui/react/src/components/form/CFormControlW {`ReactNode`} - Provide valuable, actionable invalid feedback when using standard HTML form validation which applied two CSS pseudo-classes, {`:invalid`} and {`:valid`}. + +

Provide valuable, actionable feedback when the form control is in a valid state.

+ `} /> + floatingClassName#4.5.0+ @@ -45,7 +67,9 @@ import CFormControlWrapper from '@coreui/react/src/components/form/CFormControlW {`string`} - A string of all className you want applied to the floating label wrapper. + +

A string of all className you want applied to the floating label wrapper.

+ floatingLabel#4.2.0+ @@ -53,7 +77,10 @@ import CFormControlWrapper from '@coreui/react/src/components/form/CFormControlW {`ReactNode`} - Provide valuable, actionable valid feedback when using standard HTML form validation which applied two CSS pseudo-classes, {`:invalid`} and {`:valid`}. + +

Provide a floating label for the form control. This label will float above the input when focused or when the input has a value.

+ `} /> + invalid# @@ -61,7 +88,10 @@ import CFormControlWrapper from '@coreui/react/src/components/form/CFormControlW {`boolean`} - Set component validation state to invalid. + +

Set the form control validation state to invalid. When {`true`}, applies the invalid feedback styling.

+ `} /> + label#4.2.0+ @@ -69,7 +99,10 @@ import CFormControlWrapper from '@coreui/react/src/components/form/CFormControlW {`ReactNode`} - Add a caption for a component. + +

Add a caption for the form control. Typically used as a label.

+ `} /> + text#4.2.0+ @@ -77,7 +110,10 @@ import CFormControlWrapper from '@coreui/react/src/components/form/CFormControlW {`ReactNode`} - Add helper text to the component. + +

Add helper text to the form control. Provides additional guidance to the user.

+ `} /> + tooltipFeedback#4.2.0+ @@ -85,7 +121,10 @@ import CFormControlWrapper from '@coreui/react/src/components/form/CFormControlW {`boolean`} - Display validation feedback in a styled tooltip. + +

Display validation feedback in a styled tooltip.

+ `} /> + valid# @@ -93,7 +132,10 @@ import CFormControlWrapper from '@coreui/react/src/components/form/CFormControlW {`boolean`} - Set component validation state to valid. + +

Set the form control validation state to valid. When {`true`}, applies the valid feedback styling.

+ `} /> + diff --git a/packages/docs/content/api/CFormFeedback.api.mdx b/packages/docs/content/api/CFormFeedback.api.mdx index 0ee22dde..d34c0b50 100644 --- a/packages/docs/content/api/CFormFeedback.api.mdx +++ b/packages/docs/content/api/CFormFeedback.api.mdx @@ -21,7 +21,18 @@ import CFormFeedback from '@coreui/react/src/components/form/CFormFeedback' {`(ElementType & "symbol")`}, {`(ElementType & "object")`}, {`(ElementType & "div")`}, {`(ElementType & "slot")`}, {`(ElementType & "style")`}, {`... 174 more ...`}, {`(ElementType & FunctionComponent\<...>)`} - Component used for the root node. Either a string to use a HTML element or a component. + +

The component used for the root node. It can be a string representing a HTML element or a React component.

+ Invalid input. + +// Using a custom component +const CustomFeedback = forwardRef>( + (props, ref) => , +) + +Custom Feedback Element.`} /> + className# @@ -29,7 +40,40 @@ import CFormFeedback from '@coreui/react/src/components/form/CFormFeedback' {`string`} - A string of all className you want applied to the component. + +

A string of additional CSS class names to apply to the form feedback component.

+ Invalid input.`} /> + + + + customClassNames#v5.5.0+ + undefined + {`Partial\<{ INVALID_FEEDBACK: string; INVALID_TOOLTIP: string; VALID_FEEDBACK: string; VALID_TOOLTIP: string; }>`} + + + +

Custom class names to override or extend the default CSS classes used within the {`CFormFeedback`} component.
+Each key corresponds to a specific part of the Form Feedback component, allowing for granular styling control.

+

Important: If you want to replace an existing class name, prefix your custom class name with {`!`}.
+This ensures that the original class is overridden rather than appended.

+ + Custom Invalid Feedback. + + +// Extending the default valid feedback class without replacing it +const customClasses = { + VALID_FEEDBACK: 'my-additional-valid-feedback', +} + + + Extended Valid Feedback. +`} /> + invalid# @@ -37,7 +81,12 @@ import CFormFeedback from '@coreui/react/src/components/form/CFormFeedback' {`boolean`} - Method called immediately after the {`value`} prop changes. + +

Sets the form feedback state to invalid. When {`true`}, applies the invalid feedback styling.

+ + Please provide a valid email address. +`} /> + tooltip# @@ -45,7 +94,12 @@ import CFormFeedback from '@coreui/react/src/components/form/CFormFeedback' {`boolean`} - If your form layout allows it, you can display validation feedback in a styled tooltip. + +

If enabled, displays validation feedback in a styled tooltip instead of the default block.

+ + Please provide a valid email address. +`} /> + valid# @@ -53,7 +107,12 @@ import CFormFeedback from '@coreui/react/src/components/form/CFormFeedback' {`boolean`} - Set component validation state to valid. + +

Sets the form feedback state to valid. When {`true`}, applies the valid feedback styling.

+ + Looks good! +`} /> + diff --git a/packages/docs/content/api/CFormFloating.api.mdx b/packages/docs/content/api/CFormFloating.api.mdx index 0ba29670..00548a2e 100644 --- a/packages/docs/content/api/CFormFloating.api.mdx +++ b/packages/docs/content/api/CFormFloating.api.mdx @@ -21,7 +21,45 @@ import CFormFloating from '@coreui/react/src/components/form/CFormFloating' {`string`} - A string of all className you want applied to the component. + +

A string of additional CSS class names to apply to the form floating component.

+ + + +`} /> + + + + customClassNames#v5.5.0+ + undefined + {`Partial\<{ FORM_FLOATING: string; }>`} + + + +

Custom class names to override or extend the default CSS classes used within the {`CFormFloating`} component.
+Each key corresponds to a specific part of the Form Floating component, allowing for granular styling control.

+

Important: If you want to replace an existing class name, prefix your custom class name with {`!`}.
+This ensures that the original class is overridden rather than appended.

+ + + + + +// Extending the default form floating label class without replacing it +const customClasses = { + FORM_FLOATING_LABEL: 'my-additional-form-floating-label', +} + + + + +`} /> + diff --git a/packages/docs/content/api/CFormInput.api.mdx b/packages/docs/content/api/CFormInput.api.mdx index b69c5cfb..d178a6a6 100644 --- a/packages/docs/content/api/CFormInput.api.mdx +++ b/packages/docs/content/api/CFormInput.api.mdx @@ -21,7 +21,36 @@ import CFormInput from '@coreui/react/src/components/form/CFormInput' {`string`} - A string of all className you want applied to the component. + +

A string of additional CSS class names to apply to the form input component.

+ `} /> + + + + customClassNames#v5.5.0+ + undefined + {`Partial\, {`"FORM_CONTROL"`}, {`"FORM_CONTROL_COLOR"`}, {`"FORM_CONTROL_PLAINTEXT"`}, {`"FORM_CONTROL_SM"`}, {`"FORM_CONTROL_LG"`}, {`"IS_INVALID"`}, {`"IS_VALID", string>>`} + + + +

Custom class names to override or extend the default CSS classes used within the {`CFormControlWrapper`} component.
+Each key corresponds to a specific part of the Form Input component, allowing for granular styling control.

+

Important: If you want to replace an existing class name, prefix your custom class name with {`!`}.
+This ensures that the original class is overridden rather than appended.

+ + +// Extending the default form control class without replacing it +const customClasses = { + FORM_CONTROL: 'my-additional-form-control', +} + +`} /> + delay# @@ -29,7 +58,15 @@ import CFormInput from '@coreui/react/src/components/form/CFormInput' {`number`}, {`boolean`} - Delay onChange event while typing. If set to true onChange event will be delayed 500ms, you can also provide the number of milliseconds you want to delay the onChange event. + +

Delay the {`onChange`} event while typing. If set to {`true`}, the {`onChange`} event will be delayed by 500ms.
+You can also provide a specific number of milliseconds to customize the delay duration.

+ console.log(e.target.value)} /> + +// Custom delay duration of 1000ms + console.log(e.target.value)} />`} /> + disabled# @@ -37,7 +74,10 @@ import CFormInput from '@coreui/react/src/components/form/CFormInput' {`boolean`} - Toggle the disabled state for the component. + +

Toggle the disabled state for the form input component. When {`true`}, the input is disabled and non-interactive.

+ `} /> + feedback#4.2.0+ @@ -45,7 +85,10 @@ import CFormInput from '@coreui/react/src/components/form/CFormInput' {`ReactNode`} - Provide valuable, actionable feedback. + +

Provide valuable, actionable feedback.

+ `} /> + feedbackInvalid#4.2.0+ @@ -53,7 +96,10 @@ import CFormInput from '@coreui/react/src/components/form/CFormInput' {`ReactNode`} - Provide valuable, actionable feedback. + +

Provide valuable, actionable feedback when the form control is in an invalid state.

+ `} /> + feedbackValid#4.2.0+ @@ -61,7 +107,10 @@ import CFormInput from '@coreui/react/src/components/form/CFormInput' {`ReactNode`} - Provide valuable, actionable invalid feedback when using standard HTML form validation which applied two CSS pseudo-classes, {`:invalid`} and {`:valid`}. + +

Provide valuable, actionable feedback when the form control is in a valid state.

+ `} /> + floatingClassName#4.5.0+ @@ -69,7 +118,9 @@ import CFormInput from '@coreui/react/src/components/form/CFormInput' {`string`} - A string of all className you want applied to the floating label wrapper. + +

A string of all className you want applied to the floating label wrapper.

+ floatingLabel#4.2.0+ @@ -77,7 +128,10 @@ import CFormInput from '@coreui/react/src/components/form/CFormInput' {`ReactNode`} - Provide valuable, actionable valid feedback when using standard HTML form validation which applied two CSS pseudo-classes, {`:invalid`} and {`:valid`}. + +

Provide a floating label for the form control. This label will float above the input when focused or when the input has a value.

+ `} /> + invalid# @@ -85,7 +139,10 @@ import CFormInput from '@coreui/react/src/components/form/CFormInput' {`boolean`} - Set component validation state to invalid. + +

Set the form control validation state to invalid. When {`true`}, applies the invalid feedback styling.

+ `} /> + label#4.2.0+ @@ -93,7 +150,10 @@ import CFormInput from '@coreui/react/src/components/form/CFormInput' {`ReactNode`} - Add a caption for a component. + +

Add a caption for the form control. Typically used as a label.

+ `} /> + onChange# @@ -101,7 +161,14 @@ import CFormInput from '@coreui/react/src/components/form/CFormInput' {`ChangeEventHandler\`} - Method called immediately after the {`value`} prop changes. + +

Method called immediately after the {`value`} prop changes. Useful for handling input changes with optional delay.

+ { + console.log(event.target.value) +} + +`} /> + plainText# @@ -109,7 +176,11 @@ import CFormInput from '@coreui/react/src/components/form/CFormInput' {`boolean`} - Render the component styled as plain text. Removes the default form field styling and preserve the correct margin and padding. Recommend to use only along side {`readonly`}. + +

Render the form input component styled as plain text. Removes the default form field styling and preserves the correct margin and padding.
+Recommended to use only alongside {`readOnly`}.

+ `} /> + readOnly# @@ -117,7 +188,10 @@ import CFormInput from '@coreui/react/src/components/form/CFormInput' {`boolean`} - Toggle the readonly state for the component. + +

Toggle the readonly state for the form input component. When {`true`}, the input is read-only and cannot be modified.

+ `} /> + size# @@ -125,7 +199,11 @@ import CFormInput from '@coreui/react/src/components/form/CFormInput' {`"sm"`}, {`"lg"`} - Size the component small or large. + +

Size the form input component as small ({`sm`}) or large ({`lg`}).

+ +`} /> + text#4.2.0+ @@ -133,7 +211,10 @@ import CFormInput from '@coreui/react/src/components/form/CFormInput' {`ReactNode`} - Add helper text to the component. + +

Add helper text to the form control. Provides additional guidance to the user.

+ `} /> + tooltipFeedback#4.2.0+ @@ -141,7 +222,10 @@ import CFormInput from '@coreui/react/src/components/form/CFormInput' {`boolean`} - Display validation feedback in a styled tooltip. + +

Display validation feedback in a styled tooltip.

+ `} /> + type# @@ -149,7 +233,12 @@ import CFormInput from '@coreui/react/src/components/form/CFormInput' {`string`} - Specifies the type of component. + +

Specifies the type of the form input component. It can be any valid HTML input type.

+ + +`} /> + valid# @@ -157,7 +246,10 @@ import CFormInput from '@coreui/react/src/components/form/CFormInput' {`boolean`} - Set component validation state to valid. + +

Set the form control validation state to valid. When {`true`}, applies the valid feedback styling.

+ `} /> + value# @@ -165,7 +257,12 @@ import CFormInput from '@coreui/react/src/components/form/CFormInput' {`string`}, {`number`}, {`string[]`} - The {`value`} attribute of component. + +

The {`value`} attribute of the form input component. Represents the current value of the input.

+ setInputValue(e.target.value)} />`} /> + diff --git a/packages/docs/content/api/CFormLabel.api.mdx b/packages/docs/content/api/CFormLabel.api.mdx index d6d7ab74..fc8808bb 100644 --- a/packages/docs/content/api/CFormLabel.api.mdx +++ b/packages/docs/content/api/CFormLabel.api.mdx @@ -21,15 +21,47 @@ import CFormLabel from '@coreui/react/src/components/form/CFormLabel' {`string`} - A string of all className you want applied to the component. + +

A string of additional CSS class names to apply to the form label component.

+ Email Address`} /> + - customClassName# + customClassName#Deprecated v5.5.0 - Use `customClassNames` instead for better flexibility and maintainability. undefined {`string`} - A string of all className you want to be applied to the component, and override standard className value. + +

A string of CSS class names to be applied to the form label component, overriding the standard {`className`} value.

+ Email Address`} /> + + + + customClassNames#v5.5.0+ + undefined + {`Partial\<{ FORM_LABEL: string; }>`} + + + +

Custom class names to override or extend the default CSS classes used within the {`CFormLabel`} component.
+Each key corresponds to a specific part of the Form Label component, allowing for granular styling control.

+

Important: If you want to replace an existing class name, prefix your custom class name with {`!`}.
+This ensures that the original class is overridden rather than appended.

+ Email Address + +// Extending the default form label class without replacing it +const customClasses = { + FORM_LABEL: 'my-additional-form-label', +} + +Email Address`} /> + diff --git a/packages/docs/content/api/CFormRange.api.mdx b/packages/docs/content/api/CFormRange.api.mdx index 65ea10c7..9e91f3ca 100644 --- a/packages/docs/content/api/CFormRange.api.mdx +++ b/packages/docs/content/api/CFormRange.api.mdx @@ -21,15 +21,47 @@ import CFormRange from '@coreui/react/src/components/form/CFormRange' {`string`} - A string of all className you want applied to the component. + +

A string of additional CSS class names to apply to the form range component.

+ `} /> + + + + customClassNames#v5.5.0+ + undefined + {`Partial\>`} + + + +

Custom class names to override or extend the default CSS classes used within the {`CFormRange`} component.
+Each key corresponds to a specific part of the Form Range component, allowing for granular styling control.

+

Important: If you want to replace an existing class name, prefix your custom class name with {`!`}.
+This ensures that the original class is overridden rather than appended.

+ + +// Extending the default form range class without replacing it +const customClasses = { + FORM_RANGE: 'my-additional-form-range', +} + +`} /> + disabled# - undefined + {`false`} {`boolean`} - Toggle the disabled state for the component. + +

Toggle the disabled state for the form range component. When {`true`}, the range input is disabled and non-interactive.

+ `} /> + label#4.2.0+ @@ -37,7 +69,10 @@ import CFormRange from '@coreui/react/src/components/form/CFormRange' {`ReactNode`} - Add a caption for a component. + +

Add a caption for the form range component. Typically used as a label.

+ `} /> + max# @@ -45,7 +80,10 @@ import CFormRange from '@coreui/react/src/components/form/CFormRange' {`number`} - Specifies the maximum value for the component. + +

Specifies the maximum value for the form range component.

+ `} /> + min# @@ -53,7 +91,10 @@ import CFormRange from '@coreui/react/src/components/form/CFormRange' {`number`} - Specifies the minimum value for the component. + +

Specifies the minimum value for the form range component.

+ `} /> + onChange# @@ -61,15 +102,25 @@ import CFormRange from '@coreui/react/src/components/form/CFormRange' {`ChangeEventHandler\`} - Method called immediately after the {`value`} prop changes. + +

Method called immediately after the {`value`} prop changes. Useful for handling range input changes.

+ { + console.log(e.target.value) +} + +`} /> + readOnly# - undefined + {`false`} {`boolean`} - Toggle the readonly state for the component. + +

Toggle the readonly state for the form range component. When {`true`}, the range input is read-only and cannot be modified.

+ `} /> + step# @@ -77,7 +128,10 @@ import CFormRange from '@coreui/react/src/components/form/CFormRange' {`number`} - Specifies the interval between legal numbers in the component. + +

Specifies the interval between legal numbers in the form range component.

+ `} /> + value# @@ -85,7 +139,12 @@ import CFormRange from '@coreui/react/src/components/form/CFormRange' {`string`}, {`number`}, {`string[]`} - The {`value`} attribute of component. + +

The {`value`} attribute of the form range component. Represents the current value of the range input.

+ setVolume(e.target.value)} />`} /> + diff --git a/packages/docs/content/api/CFormSelect.api.mdx b/packages/docs/content/api/CFormSelect.api.mdx index 105db26a..01dc8624 100644 --- a/packages/docs/content/api/CFormSelect.api.mdx +++ b/packages/docs/content/api/CFormSelect.api.mdx @@ -21,7 +21,36 @@ import CFormSelect from '@coreui/react/src/components/form/CFormSelect' {`string`} - A string of all className you want applied to the component. + +

A string of additional CSS class names to apply to the form select component.

+ `} /> + + + + customClassNames#v5.5.0+ + undefined + {`Partial\, {`"FORM_SELECT"`}, {`"FORM_SELECT_SM"`}, {`"FORM_SELECT_LG"`}, {`"IS_INVALID"`}, {`"IS_VALID", string>>`} + + + +

Custom class names to override or extend the default CSS classes used within the {`CFormSelect`} component.
+Each key corresponds to a specific part of the Form Select component, allowing for granular styling control.

+

Important: If you want to replace an existing class name, prefix your custom class name with {`!`}.
+This ensures that the original class is overridden rather than appended.

+ + +// Extending the default form select class without replacing it +const customClasses = { + FORM_SELECT: 'my-additional-form-select', +} + +`} /> + feedback#4.2.0+ @@ -29,7 +58,10 @@ import CFormSelect from '@coreui/react/src/components/form/CFormSelect' {`ReactNode`} - Provide valuable, actionable feedback. + +

Provide valuable, actionable feedback.

+ `} /> + feedbackInvalid#4.2.0+ @@ -37,7 +69,10 @@ import CFormSelect from '@coreui/react/src/components/form/CFormSelect' {`ReactNode`} - Provide valuable, actionable feedback. + +

Provide valuable, actionable feedback when the form control is in an invalid state.

+ `} /> + feedbackValid#4.2.0+ @@ -45,7 +80,10 @@ import CFormSelect from '@coreui/react/src/components/form/CFormSelect' {`ReactNode`} - Provide valuable, actionable invalid feedback when using standard HTML form validation which applied two CSS pseudo-classes, {`:invalid`} and {`:valid`}. + +

Provide valuable, actionable feedback when the form control is in a valid state.

+ `} /> + floatingClassName#4.5.0+ @@ -53,7 +91,9 @@ import CFormSelect from '@coreui/react/src/components/form/CFormSelect' {`string`} - A string of all className you want applied to the floating label wrapper. + +

A string of all className you want applied to the floating label wrapper.

+ floatingLabel#4.2.0+ @@ -61,7 +101,10 @@ import CFormSelect from '@coreui/react/src/components/form/CFormSelect' {`ReactNode`} - Provide valuable, actionable valid feedback when using standard HTML form validation which applied two CSS pseudo-classes, {`:invalid`} and {`:valid`}. + +

Provide a floating label for the form control. This label will float above the input when focused or when the input has a value.

+ `} /> + htmlSize# @@ -69,7 +112,10 @@ import CFormSelect from '@coreui/react/src/components/form/CFormSelect' {`number`} - Specifies the number of visible options in a drop-down list. + +

Specifies the number of visible options in a drop-down list.

+ `} /> + invalid# @@ -77,7 +123,10 @@ import CFormSelect from '@coreui/react/src/components/form/CFormSelect' {`boolean`} - Set component validation state to invalid. + +

Set the form control validation state to invalid. When {`true`}, applies the invalid feedback styling.

+ `} /> + label#4.2.0+ @@ -85,7 +134,10 @@ import CFormSelect from '@coreui/react/src/components/form/CFormSelect' {`ReactNode`} - Add a caption for a component. + +

Add a caption for the form control. Typically used as a label.

+ `} /> + onChange# @@ -93,7 +145,14 @@ import CFormSelect from '@coreui/react/src/components/form/CFormSelect' {`ChangeEventHandler\`} - Method called immediately after the {`value`} prop changes. + +

Method called immediately after the {`value`} prop changes. Useful for handling select input changes.

+ { + console.log(e.target.value) +} + +`} /> + options# @@ -101,7 +160,19 @@ import CFormSelect from '@coreui/react/src/components/form/CFormSelect' {`Option[]`}, {`string[]`} - Options list of the select component. Available keys: {`label`}, {`value`}, {`disabled`}.
Examples:
- {`options={[{ value: 'js', label: 'JavaScript' }, { value: 'html', label: 'HTML', disabled: true }]}`}
- {`options={['js', 'html']}`} + +

Options list of the select component. Available keys: {`label`}, {`value`}, {`disabled`}.

+ + +const options = ['js', 'html'] + +`} /> + size# @@ -109,7 +180,11 @@ import CFormSelect from '@coreui/react/src/components/form/CFormSelect' {`"sm"`}, {`"lg"`} - Size the component small or large. + +

Size the form select component as small ({`sm`}) or large ({`lg`}).

+ +`} /> + text#4.2.0+ @@ -117,7 +192,10 @@ import CFormSelect from '@coreui/react/src/components/form/CFormSelect' {`ReactNode`} - Add helper text to the component. + +

Add helper text to the form control. Provides additional guidance to the user.

+ `} /> + tooltipFeedback#4.2.0+ @@ -125,7 +203,10 @@ import CFormSelect from '@coreui/react/src/components/form/CFormSelect' {`boolean`} - Display validation feedback in a styled tooltip. + +

Display validation feedback in a styled tooltip.

+ `} /> + valid# @@ -133,7 +214,10 @@ import CFormSelect from '@coreui/react/src/components/form/CFormSelect' {`boolean`} - Set component validation state to valid. + +

Set the form control validation state to valid. When {`true`}, applies the valid feedback styling.

+ `} /> + value# @@ -141,7 +225,19 @@ import CFormSelect from '@coreui/react/src/components/form/CFormSelect' {`string`}, {`number`}, {`string[]`} - The {`value`} attribute of component. + +

The {`value`} attribute of the form select component. Represents the current value of the select input.

+ setLanguage(e.target.value)} + options={[ + { value: 'js', label: 'JavaScript' }, + { value: 'html', label: 'HTML' }, + ]} +/>`} /> + diff --git a/packages/docs/content/api/CFormSwitch.api.mdx b/packages/docs/content/api/CFormSwitch.api.mdx index 5c420a83..45e98b3a 100644 --- a/packages/docs/content/api/CFormSwitch.api.mdx +++ b/packages/docs/content/api/CFormSwitch.api.mdx @@ -21,7 +21,36 @@ import CFormSwitch from '@coreui/react/src/components/form/CFormSwitch' {`string`} - A string of all className you want applied to the component. + +

A string of additional CSS class names to apply to the form switch component.

+ `} /> + + + + customClassNames#v5.5.0+ + undefined + {`Partial\<{ FORM_SWITCH: string; FORM_CHECK_INPUT: string; FORM_CHECK_LABEL: string; FORM_CHECK_REVERSE: string; FORM_SWITCH_LG: string; FORM_SWITCH_XL: string; IS_INVALID: string; IS_VALID: string; }>`} + + + +

Custom class names to override or extend the default CSS classes used within the {`CFormSwitch`} component.
+Each key corresponds to a specific part of the Form Switch component, allowing for granular styling control.

+

Important: If you want to replace an existing class name, prefix your custom class name with {`!`}.
+This ensures that the original class is overridden rather than appended.

+ + +// Extending the default form switch class without replacing it +const customClasses = { + FORM_SWITCH: 'my-additional-form-switch', +} + +`} /> + id# @@ -29,7 +58,10 @@ import CFormSwitch from '@coreui/react/src/components/form/CFormSwitch' {`string`} - The id global attribute defines an identifier (ID) that must be unique in the whole document. + +

The ID of the form switch. Associates the label with the switch for accessibility.

+ `} /> + invalid# @@ -37,7 +69,10 @@ import CFormSwitch from '@coreui/react/src/components/form/CFormSwitch' {`boolean`} - Set component validation state to invalid. + +

Set the form switch validation state to invalid. When {`true`}, applies the invalid feedback styling.

+ `} /> + label# @@ -45,15 +80,36 @@ import CFormSwitch from '@coreui/react/src/components/form/CFormSwitch' {`ReactNode`} - The element represents a caption for a component. + +

The label for the form switch component. Provides a caption or description.

+ `} /> + + + + onChange# + undefined + {`ChangeEventHandler\`} + + + +

Method called immediately after the {`value`} prop changes. Useful for handling switch state changes.

+ { + console.log(e.target.checked) +} + +`} /> + - reverse# + reverse#4.7.0+ undefined {`boolean`} - Put switch on the opposite side. + +

Put switch on the opposite side. Useful for right-to-left layouts or specific design requirements.

+ `} /> + size# @@ -61,7 +117,12 @@ import CFormSwitch from '@coreui/react/src/components/form/CFormSwitch' {`"lg"`}, {`"xl"`} - Size the component large or extra large. Works only with {`switch`}. + +

Size the form switch component as large ({`lg`}) or extra large ({`xl`}). Works only with {`switch`}.

+ + +`} /> + type# @@ -69,7 +130,10 @@ import CFormSwitch from '@coreui/react/src/components/form/CFormSwitch' {`"checkbox"`}, {`"radio"`} - Specifies the type of component. + +

Specifies the type of form switch component. Can be either {`checkbox`} or {`radio`}.

+ `} /> + valid# @@ -77,7 +141,10 @@ import CFormSwitch from '@coreui/react/src/components/form/CFormSwitch' {`boolean`} - Set component validation state to valid. + +

Set the form switch validation state to valid. When {`true`}, applies the valid feedback styling.

+ `} /> + diff --git a/packages/docs/content/api/CFormText.api.mdx b/packages/docs/content/api/CFormText.api.mdx index 2f666b98..36073b4e 100644 --- a/packages/docs/content/api/CFormText.api.mdx +++ b/packages/docs/content/api/CFormText.api.mdx @@ -21,7 +21,18 @@ import CFormText from '@coreui/react/src/components/form/CFormText' {`(ElementType & "symbol")`}, {`(ElementType & "object")`}, {`(ElementType & "div")`}, {`(ElementType & "slot")`}, {`(ElementType & "style")`}, {`... 174 more ...`}, {`(ElementType & FunctionComponent\<...>)`} - Component used for the root node. Either a string to use a HTML element or a component. + +

The component used for the root node. It can be a string representing a HTML element or a React component.

+ This is some helpful form text. + +// Using a custom component +const CustomText = forwardRef>( + (props, ref) => , +); + +Custom Form Text Element.`} /> + className# @@ -29,7 +40,40 @@ import CFormText from '@coreui/react/src/components/form/CFormText' {`string`} - A string of all className you want applied to the component. + +

A string of additional CSS class names to apply to the form text component.

+ Custom Styled Form Text`} /> + + + + customClassNames#v5.5.0+ + undefined + {`Partial\<{ FORM_TEXT: string; }>`} + + + +

Custom class names to override or extend the default CSS classes used within the {`CFormText`} component.
+Each key corresponds to a specific part of the Form Text component, allowing for granular styling control.

+

Important: If you want to replace an existing class name, prefix your custom class name with {`!`}.
+This ensures that the original class is overridden rather than appended.

+ + Custom Form Text. + + +// Extending the default form text class without replacing it +const customClasses = { + FORM_TEXT: 'my-additional-form-text', +}; + + + Extended Form Text. +`} /> + diff --git a/packages/docs/content/api/CFormTextarea.api.mdx b/packages/docs/content/api/CFormTextarea.api.mdx index 6f831f59..c5af470f 100644 --- a/packages/docs/content/api/CFormTextarea.api.mdx +++ b/packages/docs/content/api/CFormTextarea.api.mdx @@ -21,7 +21,36 @@ import CFormTextarea from '@coreui/react/src/components/form/CFormTextarea' {`string`} - A string of all className you want applied to the component. + +

A string of additional CSS class names to apply to the form textarea component.

+ `} /> + + + + customClassNames#v5.5.0+ + undefined + {`Partial\, {`"FORM_CONTROL"`}, {`"FORM_CONTROL_PLAINTEXT"`}, {`"IS_INVALID"`}, {`"IS_VALID", string>>`} + + + +

Custom class names to override or extend the default CSS classes used within the {`CFormTextarea`} component.
+Each key corresponds to a specific part of the Form Textarea component, allowing for granular styling control.

+

Important: If you want to replace an existing class name, prefix your custom class name with {`!`}.
+This ensures that the original class is overridden rather than appended.

+ + +// Extending the default form control class without replacing it +const customClasses = { + FORM_CONTROL: 'my-additional-form-control', +} + +`} /> + disabled# @@ -29,7 +58,10 @@ import CFormTextarea from '@coreui/react/src/components/form/CFormTextarea' {`boolean`} - Toggle the disabled state for the component. + +

Toggle the disabled state for the form textarea component. When {`true`}, the textarea is disabled and non-interactive.

+ `} /> + feedback#4.2.0+ @@ -37,7 +69,10 @@ import CFormTextarea from '@coreui/react/src/components/form/CFormTextarea' {`ReactNode`} - Provide valuable, actionable feedback. + +

Provide valuable, actionable feedback.

+ `} /> + feedbackInvalid#4.2.0+ @@ -45,7 +80,10 @@ import CFormTextarea from '@coreui/react/src/components/form/CFormTextarea' {`ReactNode`} - Provide valuable, actionable feedback. + +

Provide valuable, actionable feedback when the form control is in an invalid state.

+ `} /> + feedbackValid#4.2.0+ @@ -53,7 +91,10 @@ import CFormTextarea from '@coreui/react/src/components/form/CFormTextarea' {`ReactNode`} - Provide valuable, actionable invalid feedback when using standard HTML form validation which applied two CSS pseudo-classes, {`:invalid`} and {`:valid`}. + +

Provide valuable, actionable feedback when the form control is in a valid state.

+ `} /> + floatingClassName#4.5.0+ @@ -61,7 +102,9 @@ import CFormTextarea from '@coreui/react/src/components/form/CFormTextarea' {`string`} - A string of all className you want applied to the floating label wrapper. + +

A string of all className you want applied to the floating label wrapper.

+ floatingLabel#4.2.0+ @@ -69,7 +112,10 @@ import CFormTextarea from '@coreui/react/src/components/form/CFormTextarea' {`ReactNode`} - Provide valuable, actionable valid feedback when using standard HTML form validation which applied two CSS pseudo-classes, {`:invalid`} and {`:valid`}. + +

Provide a floating label for the form control. This label will float above the input when focused or when the input has a value.

+ `} /> + invalid# @@ -77,7 +123,10 @@ import CFormTextarea from '@coreui/react/src/components/form/CFormTextarea' {`boolean`} - Set component validation state to invalid. + +

Set the form control validation state to invalid. When {`true`}, applies the invalid feedback styling.

+ `} /> + label#4.2.0+ @@ -85,7 +134,10 @@ import CFormTextarea from '@coreui/react/src/components/form/CFormTextarea' {`ReactNode`} - Add a caption for a component. + +

Add a caption for the form control. Typically used as a label.

+ `} /> + onChange# @@ -93,7 +145,14 @@ import CFormTextarea from '@coreui/react/src/components/form/CFormTextarea' {`ChangeEventHandler\`} - Method called immediately after the {`value`} prop changes. + +

Method called immediately after the {`value`} prop changes. Useful for handling textarea changes.

+ { + console.log(e.target.value) +} + +`} /> + plainText# @@ -101,7 +160,11 @@ import CFormTextarea from '@coreui/react/src/components/form/CFormTextarea' {`boolean`} - Render the component styled as plain text. Removes the default form field styling and preserve the correct margin and padding. Recommend to use only along side {`readonly`}. + +

Render the textarea component styled as plain text. Removes the default form field styling and preserves the correct margin and padding.
+Recommended to use only alongside {`readOnly`}.

+ `} /> + readOnly# @@ -109,7 +172,10 @@ import CFormTextarea from '@coreui/react/src/components/form/CFormTextarea' {`boolean`} - Toggle the readonly state for the component. + +

Toggle the readonly state for the form textarea component. When {`true`}, the textarea is read-only and cannot be modified.

+ `} /> + text#4.2.0+ @@ -117,7 +183,10 @@ import CFormTextarea from '@coreui/react/src/components/form/CFormTextarea' {`ReactNode`} - Add helper text to the component. + +

Add helper text to the form control. Provides additional guidance to the user.

+ `} /> + tooltipFeedback#4.2.0+ @@ -125,7 +194,10 @@ import CFormTextarea from '@coreui/react/src/components/form/CFormTextarea' {`boolean`} - Display validation feedback in a styled tooltip. + +

Display validation feedback in a styled tooltip.

+ `} /> + valid# @@ -133,7 +205,10 @@ import CFormTextarea from '@coreui/react/src/components/form/CFormTextarea' {`boolean`} - Set component validation state to valid. + +

Set the form control validation state to valid. When {`true`}, applies the valid feedback styling.

+ `} /> + value# @@ -141,7 +216,12 @@ import CFormTextarea from '@coreui/react/src/components/form/CFormTextarea' {`string`}, {`number`}, {`string[]`} - The {`value`} attribute of component. + +

The {`value`} attribute of the form textarea component. Represents the current value of the textarea.

+ setText(e.target.value)} />`} /> + diff --git a/packages/docs/content/api/CHeader.api.mdx b/packages/docs/content/api/CHeader.api.mdx index 692cee33..7670d5b2 100644 --- a/packages/docs/content/api/CHeader.api.mdx +++ b/packages/docs/content/api/CHeader.api.mdx @@ -21,7 +21,9 @@ import CHeader from '@coreui/react/src/components/header/CHeader' {`string`} - A string of all className you want applied to the component. + +

A string of all className you want applied to the component.

+ container# @@ -29,7 +31,9 @@ import CHeader from '@coreui/react/src/components/header/CHeader' {`boolean`}, {`"sm"`}, {`"md"`}, {`"lg"`}, {`"xl"`}, {`"xxl"`}, {`"fluid"`} - Defines optional container wrapping children elements. + +

Defines optional container wrapping children elements.

+ position# @@ -37,7 +41,9 @@ import CHeader from '@coreui/react/src/components/header/CHeader' {`"fixed"`}, {`"sticky"`} - Place header in non-static positions. + +

Place header in non-static positions.

+ diff --git a/packages/docs/content/api/CHeaderBrand.api.mdx b/packages/docs/content/api/CHeaderBrand.api.mdx index 10369861..bd517329 100644 --- a/packages/docs/content/api/CHeaderBrand.api.mdx +++ b/packages/docs/content/api/CHeaderBrand.api.mdx @@ -21,7 +21,9 @@ import CHeaderBrand from '@coreui/react/src/components/header/CHeaderBrand' {`(ElementType & "symbol")`}, {`(ElementType & "object")`}, {`(ElementType & "a")`}, {`(ElementType & "slot")`}, {`(ElementType & "style")`}, {`... 174 more ...`}, {`(ElementType & FunctionComponent\<...>)`} - Component used for the root node. Either a string to use a HTML element or a component. + +

Component used for the root node. Either a string to use a HTML element or a component.

+ className# @@ -29,7 +31,9 @@ import CHeaderBrand from '@coreui/react/src/components/header/CHeaderBrand' {`string`} - A string of all className you want applied to the component. + +

A string of all className you want applied to the component.

+ diff --git a/packages/docs/content/api/CHeaderDivider.api.mdx b/packages/docs/content/api/CHeaderDivider.api.mdx index ba8343d3..6916f36a 100644 --- a/packages/docs/content/api/CHeaderDivider.api.mdx +++ b/packages/docs/content/api/CHeaderDivider.api.mdx @@ -21,7 +21,9 @@ import CHeaderDivider from '@coreui/react/src/components/header/CHeaderDivider' {`string`} - A string of all className you want applied to the component. + +

A string of all className you want applied to the component.

+ diff --git a/packages/docs/content/api/CHeaderNav.api.mdx b/packages/docs/content/api/CHeaderNav.api.mdx index c9538fbe..e7592905 100644 --- a/packages/docs/content/api/CHeaderNav.api.mdx +++ b/packages/docs/content/api/CHeaderNav.api.mdx @@ -21,7 +21,9 @@ import CHeaderNav from '@coreui/react/src/components/header/CHeaderNav' {`(ElementType & "symbol")`}, {`(ElementType & "object")`}, {`(ElementType & "ul")`}, {`(ElementType & "slot")`}, {`(ElementType & "style")`}, {`... 174 more ...`}, {`(ElementType & FunctionComponent\<...>)`} - Component used for the root node. Either a string to use a HTML element or a component. + +

Component used for the root node. Either a string to use a HTML element or a component.

+ className# @@ -29,7 +31,9 @@ import CHeaderNav from '@coreui/react/src/components/header/CHeaderNav' {`string`} - A string of all className you want applied to the component. + +

A string of all className you want applied to the component.

+ diff --git a/packages/docs/content/api/CHeaderText.api.mdx b/packages/docs/content/api/CHeaderText.api.mdx index 7b2b049d..51fa4f6d 100644 --- a/packages/docs/content/api/CHeaderText.api.mdx +++ b/packages/docs/content/api/CHeaderText.api.mdx @@ -21,7 +21,9 @@ import CHeaderText from '@coreui/react/src/components/header/CHeaderText' {`string`} - A string of all className you want applied to the base component. + +

A string of all className you want applied to the base component.

+ diff --git a/packages/docs/content/api/CHeaderToggler.api.mdx b/packages/docs/content/api/CHeaderToggler.api.mdx index 9ed97ec8..b6318096 100644 --- a/packages/docs/content/api/CHeaderToggler.api.mdx +++ b/packages/docs/content/api/CHeaderToggler.api.mdx @@ -21,7 +21,9 @@ import CHeaderToggler from '@coreui/react/src/components/header/CHeaderToggler' {`string`} - A string of all className you want applied to the base component. + +

A string of all className you want applied to the base component.

+ diff --git a/packages/docs/content/api/CIcon.api.mdx b/packages/docs/content/api/CIcon.api.mdx index 922cde27..3b6f21b5 100644 --- a/packages/docs/content/api/CIcon.api.mdx +++ b/packages/docs/content/api/CIcon.api.mdx @@ -21,15 +21,19 @@ import CIcon from '@coreui/../node_modules/@coreui/icons-react/src/CIcon' {`string`} - A string of all className you want applied to the component. + +

A string of all className you want applied to the component.

+ - content#Deprecated undefined + content#Deprecated 3.0 undefined {`string`}, {`string[]`} - Use {`icon={...}`} instead of + +

Use {`icon={...}`} instead of

+ customClassName# @@ -37,7 +41,9 @@ import CIcon from '@coreui/../node_modules/@coreui/icons-react/src/CIcon' {`string`}, {`string[]`} - Use for replacing default CIcon component classes. Prop is overriding the 'size' prop. + +

Use for replacing default CIcon component classes. Prop is overriding the 'size' prop.

+ height# @@ -45,7 +51,9 @@ import CIcon from '@coreui/../node_modules/@coreui/icons-react/src/CIcon' {`number`} - The height attribute defines the vertical length of an icon. + +

The height attribute defines the vertical length of an icon.

+ icon# @@ -53,15 +61,19 @@ import CIcon from '@coreui/../node_modules/@coreui/icons-react/src/CIcon' {`string`}, {`string[]`} - Name of the icon placed in React object or SVG content. + +

Name of the icon placed in React object or SVG content.

+ - name#Deprecated undefined + name#Deprecated 3.0 undefined {`string`} - Use {`icon="..."`} instead of + +

Use {`icon="..."`} instead of

+ size# @@ -69,7 +81,9 @@ import CIcon from '@coreui/../node_modules/@coreui/icons-react/src/CIcon' {`"custom"`}, {`"custom-size"`}, {`"sm"`}, {`"lg"`}, {`"xl"`}, {`"xxl"`}, {`"3xl"`}, {`"4xl"`}, {`"5xl"`}, {`"6xl"`}, {`"7xl"`}, {`"8xl"`}, {`"9xl"`} - Size of the icon. Available sizes: 'sm', 'lg', 'xl', 'xxl', '3xl...9xl', 'custom', 'custom-size'. + +

Size of the icon. Available sizes: 'sm', 'lg', 'xl', 'xxl', '3xl…9xl', 'custom', 'custom-size'.

+ title# @@ -77,7 +91,9 @@ import CIcon from '@coreui/../node_modules/@coreui/icons-react/src/CIcon' {`string`} - Title tag content. + +

Title tag content.

+ use# @@ -85,7 +101,9 @@ import CIcon from '@coreui/../node_modules/@coreui/icons-react/src/CIcon' {`string`} - If defined component will be rendered using 'use' tag. + +

If defined component will be rendered using 'use' tag.

+ viewBox# @@ -93,7 +111,9 @@ import CIcon from '@coreui/../node_modules/@coreui/icons-react/src/CIcon' {`string`} - The viewBox attribute defines the position and dimension of an SVG viewport. + +

The viewBox attribute defines the position and dimension of an SVG viewport.

+ width# @@ -101,7 +121,9 @@ import CIcon from '@coreui/../node_modules/@coreui/icons-react/src/CIcon' {`number`} - The width attribute defines the horizontal length of an icon. + +

The width attribute defines the horizontal length of an icon.

+ diff --git a/packages/docs/content/api/CIconSvg.api.mdx b/packages/docs/content/api/CIconSvg.api.mdx index 66f86fd5..6b19c7ea 100644 --- a/packages/docs/content/api/CIconSvg.api.mdx +++ b/packages/docs/content/api/CIconSvg.api.mdx @@ -21,7 +21,9 @@ import CIconSvg from '@coreui/icons-react/src/CIconSvg' {`string`} - A string of all className you want applied to the component. + +

A string of all className you want applied to the component.

+ customClassName# @@ -29,7 +31,9 @@ import CIconSvg from '@coreui/icons-react/src/CIconSvg' {`string`}, {`string[]`} - Use for replacing default CIcon component classes. Prop is overriding the 'size' prop. + +

Use for replacing default CIcon component classes. Prop is overriding the 'size' prop.

+ height# @@ -37,7 +41,9 @@ import CIconSvg from '@coreui/icons-react/src/CIconSvg' {`number`} - The height attribute defines the vertical length of an icon. + +

The height attribute defines the vertical length of an icon.

+ size# @@ -45,7 +51,9 @@ import CIconSvg from '@coreui/icons-react/src/CIconSvg' {`"custom"`}, {`"custom-size"`}, {`"sm"`}, {`"lg"`}, {`"xl"`}, {`"xxl"`}, {`"3xl"`}, {`"4xl"`}, {`"5xl"`}, {`"6xl"`}, {`"7xl"`}, {`"8xl"`}, {`"9xl"`} - Size of the icon. Available sizes: 'sm', 'lg', 'xl', 'xxl', '3xl...9xl', 'custom', 'custom-size'. + +

Size of the icon. Available sizes: 'sm', 'lg', 'xl', 'xxl', '3xl…9xl', 'custom', 'custom-size'.

+ title# @@ -53,7 +61,9 @@ import CIconSvg from '@coreui/icons-react/src/CIconSvg' {`string`} - Title tag content. + +

Title tag content.

+ width# @@ -61,7 +71,9 @@ import CIconSvg from '@coreui/icons-react/src/CIconSvg' {`number`} - The width attribute defines the horizontal length of an icon. + +

The width attribute defines the horizontal length of an icon.

+ diff --git a/packages/docs/content/api/CImage.api.mdx b/packages/docs/content/api/CImage.api.mdx index 2b619e44..ea5c6c03 100644 --- a/packages/docs/content/api/CImage.api.mdx +++ b/packages/docs/content/api/CImage.api.mdx @@ -21,7 +21,9 @@ import CImage from '@coreui/react/src/components/image/CImage' {`"start"`}, {`"center"`}, {`"end"`} - Set the horizontal aligment. + +

Set the horizontal aligment.

+ className# @@ -29,7 +31,9 @@ import CImage from '@coreui/react/src/components/image/CImage' {`string`} - A string of all className you want applied to the component. + +

A string of all className you want applied to the component.

+ fluid# @@ -37,7 +41,9 @@ import CImage from '@coreui/react/src/components/image/CImage' {`boolean`} - Make image responsive. + +

Make image responsive.

+ rounded# @@ -45,7 +51,9 @@ import CImage from '@coreui/react/src/components/image/CImage' {`boolean`} - Make image rounded. + +

Make image rounded.

+ thumbnail# @@ -53,7 +61,9 @@ import CImage from '@coreui/react/src/components/image/CImage' {`boolean`} - Give an image a rounded 1px border appearance. + +

Give an image a rounded 1px border appearance.

+ diff --git a/packages/docs/content/api/CInputGroup.api.mdx b/packages/docs/content/api/CInputGroup.api.mdx index 8e11a1cb..50e0b885 100644 --- a/packages/docs/content/api/CInputGroup.api.mdx +++ b/packages/docs/content/api/CInputGroup.api.mdx @@ -21,7 +21,36 @@ import CInputGroup from '@coreui/react/src/components/form/CInputGroup' {`string`} - A string of all className you want applied to the component. + +

A string of additional CSS class names to apply to the input group component.

+ `} /> + + + + customClassNames#v5.5.0+ + undefined + {`Partial\<{ INPUT_GROUP: string; INPUT_GROUP_SM: string; INPUT_GROUP_LG: string; }>`} + + + +

Custom class names to override or extend the default CSS classes used within the {`CInputGroup`} component.
+Each key corresponds to a specific part of the Input Group component, allowing for granular styling control.

+

Important: If you want to replace an existing class name, prefix your custom class name with {`!`}.
+This ensures that the original class is overridden rather than appended.

+ + +// Extending the default input group class without replacing it +const customClasses = { + INPUT_GROUP: 'my-additional-input-group', +} + +`} /> + size# @@ -29,7 +58,16 @@ import CInputGroup from '@coreui/react/src/components/form/CInputGroup' {`"sm"`}, {`"lg"`} - Size the component small or large. + +

Size the input group component as small ({`sm`}) or large ({`lg`}).

+ + +
+ + + +`} /> + diff --git a/packages/docs/content/api/CInputGroupText.api.mdx b/packages/docs/content/api/CInputGroupText.api.mdx index 7333ae46..0bd8c6d4 100644 --- a/packages/docs/content/api/CInputGroupText.api.mdx +++ b/packages/docs/content/api/CInputGroupText.api.mdx @@ -21,7 +21,12 @@ import CInputGroupText from '@coreui/react/src/components/form/CInputGroupText' {`(ElementType & "symbol")`}, {`(ElementType & "object")`}, {`(ElementType & "span")`}, {`(ElementType & "form")`}, {`(ElementType & "slot")`}, {`... 174 more ...`}, {`(ElementType & FunctionComponent\<...>)`} - Component used for the root node. Either a string to use a HTML element or a component. + +

Component used for the root node. Either a string to use a HTML element or a component.

+ Label Text + +Custom Component Text`} /> + className# @@ -29,7 +34,36 @@ import CInputGroupText from '@coreui/react/src/components/form/CInputGroupText' {`string`} - A string of all className you want applied to the component. + +

A string of additional CSS class names to apply to the input group text component.

+ `} /> + + + + customClassNames#v5.5.0+ + undefined + {`Partial\<{ INPUT_GROUP_TEXT: string; }>`} + + + +

Custom class names to override or extend the default CSS classes used within the {`CInputGroupText`} component.
+Each key corresponds to a specific part of the Input Group Text component, allowing for granular styling control.

+

Important: If you want to replace an existing class name, prefix your custom class name with {`!`}.
+This ensures that the original class is overridden rather than appended.

+ Custom Text + +// Extending the default input group text class without replacing it +const customClasses = { + INPUT_GROUP_TEXT: 'my-additional-input-group-text', +} + +Extended Text`} /> + diff --git a/packages/docs/content/api/CLink.api.mdx b/packages/docs/content/api/CLink.api.mdx index 297687c3..621c917b 100644 --- a/packages/docs/content/api/CLink.api.mdx +++ b/packages/docs/content/api/CLink.api.mdx @@ -21,7 +21,9 @@ import CLink from '@coreui/react/src/components/link/CLink' {`boolean`} - Toggle the active state for the component. + +

Toggle the active state for the component.

+ as# @@ -29,7 +31,9 @@ import CLink from '@coreui/react/src/components/link/CLink' {`(ElementType & "symbol")`}, {`(ElementType & "object")`}, {`(ElementType & "a")`}, {`(ElementType & "cite")`}, {`(ElementType & "data")`}, {`... 174 more ...`}, {`(ElementType & FunctionComponent\<...>)`} - Component used for the root node. Either a string to use a HTML element or a component. + +

Component used for the root node. Either a string to use a HTML element or a component.

+ className# @@ -37,7 +41,9 @@ import CLink from '@coreui/react/src/components/link/CLink' {`string`} - A string of all className you want applied to the component. + +

A string of all className you want applied to the component.

+ disabled# @@ -45,7 +51,9 @@ import CLink from '@coreui/react/src/components/link/CLink' {`boolean`} - Toggle the disabled state for the component. + +

Toggle the disabled state for the component.

+ href# @@ -53,7 +61,9 @@ import CLink from '@coreui/react/src/components/link/CLink' {`string`} - The href attribute specifies the URL of the page the link goes to. + +

The href attribute specifies the URL of the page the link goes to.

+ diff --git a/packages/docs/content/api/CListGroup.api.mdx b/packages/docs/content/api/CListGroup.api.mdx index 5ff0ad27..30dec855 100644 --- a/packages/docs/content/api/CListGroup.api.mdx +++ b/packages/docs/content/api/CListGroup.api.mdx @@ -21,7 +21,9 @@ import CListGroup from '@coreui/react/src/components/list-group/CListGroup' {`(ElementType & "symbol")`}, {`(ElementType & "object")`}, {`(ElementType & "ul")`}, {`(ElementType & "slot")`}, {`(ElementType & "style")`}, {`... 174 more ...`}, {`(ElementType & FunctionComponent\<...>)`} - Component used for the root node. Either a string to use a HTML element or a component. + +

Component used for the root node. Either a string to use a HTML element or a component.

+ className# @@ -29,7 +31,9 @@ import CListGroup from '@coreui/react/src/components/list-group/CListGroup' {`string`} - A string of all className you want applied to the component. + +

A string of all className you want applied to the component.

+ flush# @@ -37,7 +41,9 @@ import CListGroup from '@coreui/react/src/components/list-group/CListGroup' {`boolean`} - Remove some borders and rounded corners to render list group items edge-to-edge in a parent component (e.g., {`\`}). + +

Remove some borders and rounded corners to render list group items edge-to-edge in a parent component (e.g., {`<CCard>`}).

+ layout# @@ -45,7 +51,9 @@ import CListGroup from '@coreui/react/src/components/list-group/CListGroup' {`"horizontal"`}, {`"horizontal-sm"`}, {`"horizontal-md"`}, {`"horizontal-lg"`}, {`"horizontal-xl"`}, {`"horizontal-xxl"`} - Specify a layout type. + +

Specify a layout type.

+ diff --git a/packages/docs/content/api/CListGroupItem.api.mdx b/packages/docs/content/api/CListGroupItem.api.mdx index ae42cde7..84b91e1d 100644 --- a/packages/docs/content/api/CListGroupItem.api.mdx +++ b/packages/docs/content/api/CListGroupItem.api.mdx @@ -21,7 +21,9 @@ import CListGroupItem from '@coreui/react/src/components/list-group/CListGroupIt {`boolean`} - Toggle the active state for the component. + +

Toggle the active state for the component.

+ as# @@ -29,7 +31,9 @@ import CListGroupItem from '@coreui/react/src/components/list-group/CListGroupIt {`(ElementType & "symbol")`}, {`(ElementType & "object")`}, {`(ElementType & "li")`}, {`(ElementType & "slot")`}, {`(ElementType & "style")`}, {`... 174 more ...`}, {`(ElementType & FunctionComponent\<...>)`} - Component used for the root node. Either a string to use a HTML element or a component. + +

Component used for the root node. Either a string to use a HTML element or a component.

+ className# @@ -37,7 +41,9 @@ import CListGroupItem from '@coreui/react/src/components/list-group/CListGroupIt {`string`} - A string of all className you want applied to the component. + +

A string of all className you want applied to the component.

+ color# @@ -45,7 +51,9 @@ import CListGroupItem from '@coreui/react/src/components/list-group/CListGroupIt {`'primary'`}, {`'secondary'`}, {`'success'`}, {`'danger'`}, {`'warning'`}, {`'info'`}, {`'dark'`}, {`'light'`}, {`string`} - Sets the color context of the component to one of CoreUI’s themed colors. + +

Sets the color context of the component to one of CoreUI’s themed colors.

+ disabled# @@ -53,7 +61,9 @@ import CListGroupItem from '@coreui/react/src/components/list-group/CListGroupIt {`boolean`} - Toggle the disabled state for the component. + +

Toggle the disabled state for the component.

+ diff --git a/packages/docs/content/api/CModal.api.mdx b/packages/docs/content/api/CModal.api.mdx index 5d55be8e..0e9608a9 100644 --- a/packages/docs/content/api/CModal.api.mdx +++ b/packages/docs/content/api/CModal.api.mdx @@ -21,7 +21,9 @@ import CModal from '@coreui/react/src/components/modal/CModal' {`"top"`}, {`"center"`} - Align the modal in the center or top of the screen. + +

Align the modal in the center or top of the screen.

+ backdrop# @@ -29,7 +31,9 @@ import CModal from '@coreui/react/src/components/modal/CModal' {`boolean`}, {`"static"`} - Apply a backdrop on body while modal is open. + +

Apply a backdrop on body while modal is open.

+ className# @@ -37,7 +41,9 @@ import CModal from '@coreui/react/src/components/modal/CModal' {`string`} - A string of all className you want applied to the base component. + +

A string of all className you want applied to the base component.

+ container#5.3.0+ @@ -45,7 +51,9 @@ import CModal from '@coreui/react/src/components/modal/CModal' {`Element`}, {`DocumentFragment`}, {`(() => Element | DocumentFragment)`} - Appends the react modal to a specific element. You can pass an HTML element or function that returns a single element. By default {`document.body`}. + +

Appends the react modal to a specific element. You can pass an HTML element or function that returns a single element. By default {`document.body`}.

+ focus#4.10.0+ @@ -53,7 +61,9 @@ import CModal from '@coreui/react/src/components/modal/CModal' {`boolean`} - Puts the focus on the modal when shown. + +

Puts the focus on the modal when shown.

+ fullscreen# @@ -61,7 +71,9 @@ import CModal from '@coreui/react/src/components/modal/CModal' {`boolean`}, {`"sm"`}, {`"md"`}, {`"lg"`}, {`"xl"`}, {`"xxl"`} - Set modal to covers the entire user viewport. + +

Set modal to covers the entire user viewport.

+ keyboard# @@ -69,7 +81,9 @@ import CModal from '@coreui/react/src/components/modal/CModal' {`boolean`} - Closes the modal when escape key is pressed. + +

Closes the modal when escape key is pressed.

+ onClose# @@ -77,7 +91,9 @@ import CModal from '@coreui/react/src/components/modal/CModal' {`() => void`} - Callback fired when the component requests to be closed. + +

Callback fired when the component requests to be closed.

+ onClosePrevented# @@ -85,7 +101,9 @@ import CModal from '@coreui/react/src/components/modal/CModal' {`() => void`} - Callback fired when the component requests to be closed. + +

Callback fired when the component requests to be closed.

+ onShow# @@ -93,7 +111,9 @@ import CModal from '@coreui/react/src/components/modal/CModal' {`() => void`} - Callback fired when the modal is shown, its backdrop is static and a click outside the modal or an escape key press is performed with the keyboard option set to false. + +

Callback fired when the modal is shown, its backdrop is static and a click outside the modal or an escape key press is performed with the keyboard option set to false.

+ portal# @@ -101,7 +121,9 @@ import CModal from '@coreui/react/src/components/modal/CModal' {`boolean`} - Generates modal using createPortal. + +

Generates modal using createPortal.

+ scrollable# @@ -109,7 +131,9 @@ import CModal from '@coreui/react/src/components/modal/CModal' {`boolean`} - Create a scrollable modal that allows scrolling the modal body. + +

Create a scrollable modal that allows scrolling the modal body.

+ size# @@ -117,7 +141,9 @@ import CModal from '@coreui/react/src/components/modal/CModal' {`"sm"`}, {`"lg"`}, {`"xl"`} - Size the component small, large, or extra large. + +

Size the component small, large, or extra large.

+ transition# @@ -125,7 +151,9 @@ import CModal from '@coreui/react/src/components/modal/CModal' {`boolean`} - Remove animation to create modal that simply appear rather than fade in to view. + +

Remove animation to create modal that simply appear rather than fade in to view.

+ unmountOnClose# @@ -133,7 +161,9 @@ import CModal from '@coreui/react/src/components/modal/CModal' {`boolean`} - By default the component is unmounted after close animation, if you want to keep the component mounted set this property to false. + +

By default the component is unmounted after close animation, if you want to keep the component mounted set this property to false.

+ visible# @@ -141,7 +171,9 @@ import CModal from '@coreui/react/src/components/modal/CModal' {`boolean`} - Toggle the visibility of modal component. + +

Toggle the visibility of modal component.

+ diff --git a/packages/docs/content/api/CModalBody.api.mdx b/packages/docs/content/api/CModalBody.api.mdx index db2858ae..42c701f2 100644 --- a/packages/docs/content/api/CModalBody.api.mdx +++ b/packages/docs/content/api/CModalBody.api.mdx @@ -21,7 +21,9 @@ import CModalBody from '@coreui/react/src/components/modal/CModalBody' {`string`} - A string of all className you want applied to the base component. + +

A string of all className you want applied to the base component.

+ diff --git a/packages/docs/content/api/CModalContent.api.mdx b/packages/docs/content/api/CModalContent.api.mdx index 65bcb134..9b19d13b 100644 --- a/packages/docs/content/api/CModalContent.api.mdx +++ b/packages/docs/content/api/CModalContent.api.mdx @@ -21,7 +21,9 @@ import CModalContent from '@coreui/react/src/components/modal/CModalContent' {`string`} - A string of all className you want applied to the base component. + +

A string of all className you want applied to the base component.

+ diff --git a/packages/docs/content/api/CModalDialog.api.mdx b/packages/docs/content/api/CModalDialog.api.mdx index aa9ee1e4..768c38ca 100644 --- a/packages/docs/content/api/CModalDialog.api.mdx +++ b/packages/docs/content/api/CModalDialog.api.mdx @@ -21,7 +21,9 @@ import CModalDialog from '@coreui/react/src/components/modal/CModalDialog' {`"top"`}, {`"center"`} - Align the modal in the center or top of the screen. + +

Align the modal in the center or top of the screen.

+ className# @@ -29,7 +31,9 @@ import CModalDialog from '@coreui/react/src/components/modal/CModalDialog' {`string`} - A string of all className you want applied to the base component. + +

A string of all className you want applied to the base component.

+ fullscreen# @@ -37,7 +41,9 @@ import CModalDialog from '@coreui/react/src/components/modal/CModalDialog' {`boolean`}, {`"sm"`}, {`"md"`}, {`"lg"`}, {`"xl"`}, {`"xxl"`} - Set modal to covers the entire user viewport. + +

Set modal to covers the entire user viewport.

+ scrollable# @@ -45,7 +51,9 @@ import CModalDialog from '@coreui/react/src/components/modal/CModalDialog' {`boolean`} - Does the modal dialog itself scroll, or does the whole dialog scroll within the window. + +

Does the modal dialog itself scroll, or does the whole dialog scroll within the window.

+ size# @@ -53,7 +61,9 @@ import CModalDialog from '@coreui/react/src/components/modal/CModalDialog' {`"sm"`}, {`"lg"`}, {`"xl"`} - Size the component small, large, or extra large. + +

Size the component small, large, or extra large.

+ diff --git a/packages/docs/content/api/CModalFooter.api.mdx b/packages/docs/content/api/CModalFooter.api.mdx index 25a3d54e..f413e986 100644 --- a/packages/docs/content/api/CModalFooter.api.mdx +++ b/packages/docs/content/api/CModalFooter.api.mdx @@ -21,7 +21,9 @@ import CModalFooter from '@coreui/react/src/components/modal/CModalFooter' {`string`} - A string of all className you want applied to the base component. + +

A string of all className you want applied to the base component.

+ diff --git a/packages/docs/content/api/CModalHeader.api.mdx b/packages/docs/content/api/CModalHeader.api.mdx index 3bb8fdb8..ca5db296 100644 --- a/packages/docs/content/api/CModalHeader.api.mdx +++ b/packages/docs/content/api/CModalHeader.api.mdx @@ -21,7 +21,9 @@ import CModalHeader from '@coreui/react/src/components/modal/CModalHeader' {`string`} - A string of all className you want applied to the base component. + +

A string of all className you want applied to the base component.

+ closeButton# @@ -29,7 +31,9 @@ import CModalHeader from '@coreui/react/src/components/modal/CModalHeader' {`boolean`} - Add a close button component to the header. + +

Add a close button component to the header.

+ diff --git a/packages/docs/content/api/CModalTitle.api.mdx b/packages/docs/content/api/CModalTitle.api.mdx index 78393a10..7876d479 100644 --- a/packages/docs/content/api/CModalTitle.api.mdx +++ b/packages/docs/content/api/CModalTitle.api.mdx @@ -21,7 +21,9 @@ import CModalTitle from '@coreui/react/src/components/modal/CModalTitle' {`(ElementType & "symbol")`}, {`(ElementType & "object")`}, {`(ElementType & "h5")`}, {`(ElementType & "slot")`}, {`(ElementType & "style")`}, {`... 174 more ...`}, {`(ElementType & FunctionComponent\<...>)`} - Component used for the root node. Either a string to use a HTML element or a component. + +

Component used for the root node. Either a string to use a HTML element or a component.

+ className# @@ -29,7 +31,9 @@ import CModalTitle from '@coreui/react/src/components/modal/CModalTitle' {`string`} - A string of all className you want applied to the base component. + +

A string of all className you want applied to the base component.

+ diff --git a/packages/docs/content/api/CNav.api.mdx b/packages/docs/content/api/CNav.api.mdx index 7a216738..2d6cafd2 100644 --- a/packages/docs/content/api/CNav.api.mdx +++ b/packages/docs/content/api/CNav.api.mdx @@ -21,7 +21,9 @@ import CNav from '@coreui/react/src/components/nav/CNav' {`(ElementType & "symbol")`}, {`(ElementType & "object")`}, {`(ElementType & "ul")`}, {`(ElementType & "slot")`}, {`(ElementType & "style")`}, {`... 174 more ...`}, {`(ElementType & FunctionComponent\<...>)`} - Component used for the root node. Either a string to use a HTML element or a component. + +

Component used for the root node. Either a string to use a HTML element or a component.

+ className# @@ -29,7 +31,9 @@ import CNav from '@coreui/react/src/components/nav/CNav' {`string`} - A string of all className you want applied to the base component. + +

A string of all className you want applied to the base component.

+ layout# @@ -37,7 +41,9 @@ import CNav from '@coreui/react/src/components/nav/CNav' {`"fill"`}, {`"justified"`} - Specify a layout type for component. + +

Specify a layout type for component.

+ variant# @@ -45,7 +51,9 @@ import CNav from '@coreui/react/src/components/nav/CNav' {`"pills"`}, {`"tabs"`}, {`"underline"`}, {`"underline-border"`} - Set the nav variant to tabs or pills. + +

Set the nav variant to tabs or pills.

+ diff --git a/packages/docs/content/api/CNavGroup.api.mdx b/packages/docs/content/api/CNavGroup.api.mdx index 83b3d884..0e0714d6 100644 --- a/packages/docs/content/api/CNavGroup.api.mdx +++ b/packages/docs/content/api/CNavGroup.api.mdx @@ -21,7 +21,9 @@ import CNavGroup from '@coreui/react/src/components/nav/CNavGroup' {`(ElementType & "symbol")`}, {`(ElementType & "object")`}, {`(ElementType & "li")`}, {`(ElementType & "slot")`}, {`(ElementType & "style")`}, {`... 174 more ...`}, {`(ElementType & FunctionComponent\<...>)`} - Component used for the root node. Either a string to use a HTML element or a component. + +

Component used for the root node. Either a string to use a HTML element or a component.

+ className# @@ -29,7 +31,9 @@ import CNavGroup from '@coreui/react/src/components/nav/CNavGroup' {`string`} - A string of all className you want applied to the component. + +

A string of all className you want applied to the component.

+ compact# @@ -37,7 +41,9 @@ import CNavGroup from '@coreui/react/src/components/nav/CNavGroup' {`boolean`} - Make nav group more compact by cutting all {`padding`} in half. + +

Make nav group more compact by cutting all {`padding`} in half.

+ toggler# @@ -45,7 +51,9 @@ import CNavGroup from '@coreui/react/src/components/nav/CNavGroup' {`ReactNode`} - Set group toggler label. + +

Set group toggler label.

+ visible# @@ -53,7 +61,9 @@ import CNavGroup from '@coreui/react/src/components/nav/CNavGroup' {`boolean`} - Show nav group items. + +

Show nav group items.

+ diff --git a/packages/docs/content/api/CNavGroupItems.api.mdx b/packages/docs/content/api/CNavGroupItems.api.mdx index 3b911547..3b0df119 100644 --- a/packages/docs/content/api/CNavGroupItems.api.mdx +++ b/packages/docs/content/api/CNavGroupItems.api.mdx @@ -21,7 +21,9 @@ import CNavGroupItems from '@coreui/react/src/components/nav/CNavGroupItems' {`(ElementType & "symbol")`}, {`(ElementType & "object")`}, {`(ElementType & "ul")`}, {`(ElementType & "slot")`}, {`(ElementType & "style")`}, {`... 174 more ...`}, {`(ElementType & FunctionComponent\<...>)`} - Component used for the root node. Either a string to use a HTML element or a component. + +

Component used for the root node. Either a string to use a HTML element or a component.

+ className# @@ -29,7 +31,9 @@ import CNavGroupItems from '@coreui/react/src/components/nav/CNavGroupItems' {`string`} - A string of all className you want applied to the component. + +

A string of all className you want applied to the component.

+ diff --git a/packages/docs/content/api/CNavItem.api.mdx b/packages/docs/content/api/CNavItem.api.mdx index 5d629503..4e260edb 100644 --- a/packages/docs/content/api/CNavItem.api.mdx +++ b/packages/docs/content/api/CNavItem.api.mdx @@ -21,7 +21,9 @@ import CNavItem from '@coreui/react/src/components/nav/CNavItem' {`boolean`} - Toggle the active state for the component. + +

Toggle the active state for the component.

+ as#5.0.0+ @@ -29,7 +31,9 @@ import CNavItem from '@coreui/react/src/components/nav/CNavItem' {`(ElementType & "symbol")`}, {`(ElementType & "object")`}, {`(ElementType & "li")`}, {`(ElementType & "cite")`}, {`(ElementType & "data")`}, {`... 174 more ...`}, {`(ElementType & FunctionComponent\<...>)`} - Component used for the root node. Either a string to use a HTML element or a component. + +

Component used for the root node. Either a string to use a HTML element or a component.

+ className# @@ -37,7 +41,9 @@ import CNavItem from '@coreui/react/src/components/nav/CNavItem' {`string`} - A string of all className you want applied to the component. + +

A string of all className you want applied to the component.

+ disabled# @@ -45,7 +51,9 @@ import CNavItem from '@coreui/react/src/components/nav/CNavItem' {`boolean`} - Toggle the disabled state for the component. + +

Toggle the disabled state for the component.

+ href# @@ -53,7 +61,9 @@ import CNavItem from '@coreui/react/src/components/nav/CNavItem' {`string`} - The href attribute specifies the URL of the page the link goes to. + +

The href attribute specifies the URL of the page the link goes to.

+ diff --git a/packages/docs/content/api/CNavLink.api.mdx b/packages/docs/content/api/CNavLink.api.mdx index f3154093..7e3c45c9 100644 --- a/packages/docs/content/api/CNavLink.api.mdx +++ b/packages/docs/content/api/CNavLink.api.mdx @@ -21,7 +21,9 @@ import CNavLink from '@coreui/react/src/components/nav/CNavLink' {`boolean`} - Toggle the active state for the component. + +

Toggle the active state for the component.

+ as# @@ -29,7 +31,9 @@ import CNavLink from '@coreui/react/src/components/nav/CNavLink' {`(ElementType & "symbol")`}, {`(ElementType & "object")`}, {`(ElementType & "a")`}, {`(ElementType & "cite")`}, {`(ElementType & "data")`}, {`... 174 more ...`}, {`(ElementType & FunctionComponent\<...>)`} - Component used for the root node. Either a string to use a HTML element or a component. + +

Component used for the root node. Either a string to use a HTML element or a component.

+ className# @@ -37,7 +41,9 @@ import CNavLink from '@coreui/react/src/components/nav/CNavLink' {`string`} - A string of all className you want applied to the component. + +

A string of all className you want applied to the component.

+ disabled# @@ -45,7 +51,9 @@ import CNavLink from '@coreui/react/src/components/nav/CNavLink' {`boolean`} - Toggle the disabled state for the component. + +

Toggle the disabled state for the component.

+ href# @@ -53,7 +61,9 @@ import CNavLink from '@coreui/react/src/components/nav/CNavLink' {`string`} - The href attribute specifies the URL of the page the link goes to. + +

The href attribute specifies the URL of the page the link goes to.

+ diff --git a/packages/docs/content/api/CNavTitle.api.mdx b/packages/docs/content/api/CNavTitle.api.mdx index 83abb795..bab5f5f9 100644 --- a/packages/docs/content/api/CNavTitle.api.mdx +++ b/packages/docs/content/api/CNavTitle.api.mdx @@ -21,7 +21,9 @@ import CNavTitle from '@coreui/react/src/components/nav/CNavTitle' {`(ElementType & "symbol")`}, {`(ElementType & "object")`}, {`(ElementType & "li")`}, {`(ElementType & "slot")`}, {`(ElementType & "style")`}, {`... 174 more ...`}, {`(ElementType & FunctionComponent\<...>)`} - Component used for the root node. Either a string to use a HTML element or a component. + +

Component used for the root node. Either a string to use a HTML element or a component.

+ className# @@ -29,7 +31,9 @@ import CNavTitle from '@coreui/react/src/components/nav/CNavTitle' {`string`} - A string of all className you want applied to the component. + +

A string of all className you want applied to the component.

+ diff --git a/packages/docs/content/api/CNavbar.api.mdx b/packages/docs/content/api/CNavbar.api.mdx index 730f1c1e..1aaa1c87 100644 --- a/packages/docs/content/api/CNavbar.api.mdx +++ b/packages/docs/content/api/CNavbar.api.mdx @@ -21,7 +21,9 @@ import CNavbar from '@coreui/react/src/components/navbar/CNavbar' {`(ElementType & "symbol")`}, {`(ElementType & "object")`}, {`(ElementType & "nav")`}, {`(ElementType & "slot")`}, {`(ElementType & "style")`}, {`... 174 more ...`}, {`(ElementType & FunctionComponent\<...>)`} - Component used for the root node. Either a string to use a HTML element or a component. + +

Component used for the root node. Either a string to use a HTML element or a component.

+ className# @@ -29,7 +31,9 @@ import CNavbar from '@coreui/react/src/components/navbar/CNavbar' {`string`} - A string of all className you want applied to the component. + +

A string of all className you want applied to the component.

+ color# @@ -37,7 +41,9 @@ import CNavbar from '@coreui/react/src/components/navbar/CNavbar' {`'primary'`}, {`'secondary'`}, {`'success'`}, {`'danger'`}, {`'warning'`}, {`'info'`}, {`'dark'`}, {`'light'`}, {`string`} - Sets the color context of the component to one of CoreUI’s themed colors. + +

Sets the color context of the component to one of CoreUI’s themed colors.

+ colorScheme# @@ -45,7 +51,9 @@ import CNavbar from '@coreui/react/src/components/navbar/CNavbar' {`"dark"`}, {`"light"`} - Sets if the color of text should be colored for a light or dark background. + +

Sets if the color of text should be colored for a light or dark background.

+ container# @@ -53,7 +61,9 @@ import CNavbar from '@coreui/react/src/components/navbar/CNavbar' {`boolean`}, {`"sm"`}, {`"md"`}, {`"lg"`}, {`"xl"`}, {`"xxl"`}, {`"fluid"`} - Defines optional container wrapping children elements. + +

Defines optional container wrapping children elements.

+ expand# @@ -61,7 +71,9 @@ import CNavbar from '@coreui/react/src/components/navbar/CNavbar' {`boolean`}, {`"sm"`}, {`"md"`}, {`"lg"`}, {`"xl"`}, {`"xxl"`} - Defines the responsive breakpoint to determine when content collapses. + +

Defines the responsive breakpoint to determine when content collapses.

+ placement# @@ -69,7 +81,9 @@ import CNavbar from '@coreui/react/src/components/navbar/CNavbar' {`"fixed-top"`}, {`"fixed-bottom"`}, {`"sticky-top"`} - Place component in non-static positions. + +

Place component in non-static positions.

+ diff --git a/packages/docs/content/api/CNavbarBrand.api.mdx b/packages/docs/content/api/CNavbarBrand.api.mdx index 03d98309..cbb61ccf 100644 --- a/packages/docs/content/api/CNavbarBrand.api.mdx +++ b/packages/docs/content/api/CNavbarBrand.api.mdx @@ -21,7 +21,9 @@ import CNavbarBrand from '@coreui/react/src/components/navbar/CNavbarBrand' {`(ElementType & "symbol")`}, {`(ElementType & "object")`}, {`(ElementType & "a")`}, {`(ElementType & "slot")`}, {`(ElementType & "style")`}, {`... 174 more ...`}, {`(ElementType & FunctionComponent\<...>)`} - Component used for the root node. Either a string to use a HTML element or a component. + +

Component used for the root node. Either a string to use a HTML element or a component.

+ className# @@ -29,7 +31,9 @@ import CNavbarBrand from '@coreui/react/src/components/navbar/CNavbarBrand' {`string`} - A string of all className you want applied to the component. + +

A string of all className you want applied to the component.

+ href# @@ -37,7 +41,9 @@ import CNavbarBrand from '@coreui/react/src/components/navbar/CNavbarBrand' {`string`} - The href attribute specifies the URL of the page the link goes to. + +

The href attribute specifies the URL of the page the link goes to.

+ diff --git a/packages/docs/content/api/CNavbarNav.api.mdx b/packages/docs/content/api/CNavbarNav.api.mdx index 2c46edf3..577e403a 100644 --- a/packages/docs/content/api/CNavbarNav.api.mdx +++ b/packages/docs/content/api/CNavbarNav.api.mdx @@ -21,7 +21,9 @@ import CNavbarNav from '@coreui/react/src/components/navbar/CNavbarNav' {`(ElementType & "symbol")`}, {`(ElementType & "object")`}, {`(ElementType & "ul")`}, {`(ElementType & "slot")`}, {`(ElementType & "style")`}, {`... 174 more ...`}, {`(ElementType & FunctionComponent\<...>)`} - Component used for the root node. Either a string to use a HTML element or a component. + +

Component used for the root node. Either a string to use a HTML element or a component.

+ className# @@ -29,7 +31,9 @@ import CNavbarNav from '@coreui/react/src/components/navbar/CNavbarNav' {`string`} - A string of all className you want applied to the component. + +

A string of all className you want applied to the component.

+ diff --git a/packages/docs/content/api/CNavbarText.api.mdx b/packages/docs/content/api/CNavbarText.api.mdx index a7c58443..158f710f 100644 --- a/packages/docs/content/api/CNavbarText.api.mdx +++ b/packages/docs/content/api/CNavbarText.api.mdx @@ -21,7 +21,9 @@ import CNavbarText from '@coreui/react/src/components/navbar/CNavbarText' {`string`} - A string of all className you want applied to the base component. + +

A string of all className you want applied to the base component.

+ diff --git a/packages/docs/content/api/CNavbarToggler.api.mdx b/packages/docs/content/api/CNavbarToggler.api.mdx index ce474a31..38e4b19a 100644 --- a/packages/docs/content/api/CNavbarToggler.api.mdx +++ b/packages/docs/content/api/CNavbarToggler.api.mdx @@ -21,7 +21,9 @@ import CNavbarToggler from '@coreui/react/src/components/navbar/CNavbarToggler' {`string`} - A string of all className you want applied to the base component. + +

A string of all className you want applied to the base component.

+ diff --git a/packages/docs/content/api/COffcanvas.api.mdx b/packages/docs/content/api/COffcanvas.api.mdx index 744d2595..2b50ddc3 100644 --- a/packages/docs/content/api/COffcanvas.api.mdx +++ b/packages/docs/content/api/COffcanvas.api.mdx @@ -21,7 +21,9 @@ import COffcanvas from '@coreui/react/src/components/offcanvas/COffcanvas' {`boolean`}, {`"static"`} - Apply a backdrop on body while offcanvas is open. + +

Apply a backdrop on body while offcanvas is open.

+ className# @@ -29,7 +31,9 @@ import COffcanvas from '@coreui/react/src/components/offcanvas/COffcanvas' {`string`} - A string of all className you want applied to the base component. + +

A string of all className you want applied to the base component.

+ dark# @@ -37,7 +41,9 @@ import COffcanvas from '@coreui/react/src/components/offcanvas/COffcanvas' {`boolean`} - Sets a darker color scheme. + +

Sets a darker color scheme.

+ keyboard# @@ -45,7 +51,9 @@ import COffcanvas from '@coreui/react/src/components/offcanvas/COffcanvas' {`boolean`} - Closes the offcanvas when escape key is pressed. + +

Closes the offcanvas when escape key is pressed.

+ onHide# @@ -53,7 +61,9 @@ import COffcanvas from '@coreui/react/src/components/offcanvas/COffcanvas' {`() => void`} - Callback fired when the component requests to be hidden. + +

Callback fired when the component requests to be hidden.

+ onShow# @@ -61,7 +71,9 @@ import COffcanvas from '@coreui/react/src/components/offcanvas/COffcanvas' {`() => void`} - Callback fired when the component requests to be shown. + +

Callback fired when the component requests to be shown.

+ placement# @@ -69,7 +81,9 @@ import COffcanvas from '@coreui/react/src/components/offcanvas/COffcanvas' {`"start"`}, {`"end"`}, {`"top"`}, {`"bottom"`} - Components placement, there’s no default placement. + +

Components placement, there’s no default placement.

+ portal# @@ -77,7 +91,9 @@ import COffcanvas from '@coreui/react/src/components/offcanvas/COffcanvas' {`boolean`} - Generates modal using createPortal. + +

Generates modal using createPortal.

+ responsive#4.6.0+ @@ -85,7 +101,9 @@ import COffcanvas from '@coreui/react/src/components/offcanvas/COffcanvas' {`boolean`}, {`"sm"`}, {`"md"`}, {`"lg"`}, {`"xl"`}, {`"xxl"`} - Responsive offcanvas property hide content outside the viewport from a specified breakpoint and down. + +

Responsive offcanvas property hide content outside the viewport from a specified breakpoint and down.

+ scroll# @@ -93,7 +111,9 @@ import COffcanvas from '@coreui/react/src/components/offcanvas/COffcanvas' {`boolean`} - Allow body scrolling while offcanvas is open + +

Allow body scrolling while offcanvas is open

+ visible# @@ -101,7 +121,9 @@ import COffcanvas from '@coreui/react/src/components/offcanvas/COffcanvas' {`boolean`} - Toggle the visibility of offcanvas component. + +

Toggle the visibility of offcanvas component.

+ diff --git a/packages/docs/content/api/COffcanvasBody.api.mdx b/packages/docs/content/api/COffcanvasBody.api.mdx index 63a205df..a68dc896 100644 --- a/packages/docs/content/api/COffcanvasBody.api.mdx +++ b/packages/docs/content/api/COffcanvasBody.api.mdx @@ -21,7 +21,9 @@ import COffcanvasBody from '@coreui/react/src/components/offcanvas/COffcanvasBod {`string`} - A string of all className you want applied to the base component. + +

A string of all className you want applied to the base component.

+ diff --git a/packages/docs/content/api/COffcanvasHeader.api.mdx b/packages/docs/content/api/COffcanvasHeader.api.mdx index 5ca4bdd5..a505a208 100644 --- a/packages/docs/content/api/COffcanvasHeader.api.mdx +++ b/packages/docs/content/api/COffcanvasHeader.api.mdx @@ -21,7 +21,9 @@ import COffcanvasHeader from '@coreui/react/src/components/offcanvas/COffcanvasH {`string`} - A string of all className you want applied to the base component. + +

A string of all className you want applied to the base component.

+ diff --git a/packages/docs/content/api/COffcanvasTitle.api.mdx b/packages/docs/content/api/COffcanvasTitle.api.mdx index 5ff8759d..06c1ac6a 100644 --- a/packages/docs/content/api/COffcanvasTitle.api.mdx +++ b/packages/docs/content/api/COffcanvasTitle.api.mdx @@ -21,7 +21,9 @@ import COffcanvasTitle from '@coreui/react/src/components/offcanvas/COffcanvasTi {`(ElementType & "symbol")`}, {`(ElementType & "object")`}, {`(ElementType & "h5")`}, {`(ElementType & "slot")`}, {`(ElementType & "style")`}, {`... 174 more ...`}, {`(ElementType & FunctionComponent\<...>)`} - Component used for the root node. Either a string to use a HTML element or a component. + +

Component used for the root node. Either a string to use a HTML element or a component.

+ className# @@ -29,7 +31,9 @@ import COffcanvasTitle from '@coreui/react/src/components/offcanvas/COffcanvasTi {`string`} - A string of all className you want applied to the component. + +

A string of all className you want applied to the component.

+ diff --git a/packages/docs/content/api/CPagination.api.mdx b/packages/docs/content/api/CPagination.api.mdx index d1870dac..a0dfe5af 100644 --- a/packages/docs/content/api/CPagination.api.mdx +++ b/packages/docs/content/api/CPagination.api.mdx @@ -21,7 +21,9 @@ import CPagination from '@coreui/react/src/components/pagination/CPagination' {`"start"`}, {`"center"`}, {`"end"`} - Set the alignment of pagination components. + +

Set the alignment of pagination components.

+ className# @@ -29,7 +31,9 @@ import CPagination from '@coreui/react/src/components/pagination/CPagination' {`string`} - A string of all className you want applied to the base component. + +

A string of all className you want applied to the base component.

+ size# @@ -37,7 +41,9 @@ import CPagination from '@coreui/react/src/components/pagination/CPagination' {`"sm"`}, {`"lg"`} - Size the component small or large. + +

Size the component small or large.

+ diff --git a/packages/docs/content/api/CPaginationItem.api.mdx b/packages/docs/content/api/CPaginationItem.api.mdx index b8573635..71479d0a 100644 --- a/packages/docs/content/api/CPaginationItem.api.mdx +++ b/packages/docs/content/api/CPaginationItem.api.mdx @@ -21,7 +21,9 @@ import CPaginationItem from '@coreui/react/src/components/pagination/CPagination {`boolean`} - Toggle the active state for the component. + +

Toggle the active state for the component.

+ as# @@ -29,7 +31,9 @@ import CPaginationItem from '@coreui/react/src/components/pagination/CPagination {`(ElementType & string)`}, {`(ElementType & ComponentClass\)`}, {`(ElementType & FunctionComponent\)`} - Component used for the root node. Either a string to use a HTML element or a component. + +

Component used for the root node. Either a string to use a HTML element or a component.

+ disabled# @@ -37,7 +41,9 @@ import CPaginationItem from '@coreui/react/src/components/pagination/CPagination {`boolean`} - Toggle the disabled state for the component. + +

Toggle the disabled state for the component.

+ diff --git a/packages/docs/content/api/CPlaceholder.api.mdx b/packages/docs/content/api/CPlaceholder.api.mdx index 7247c5cc..7ad82151 100644 --- a/packages/docs/content/api/CPlaceholder.api.mdx +++ b/packages/docs/content/api/CPlaceholder.api.mdx @@ -21,7 +21,9 @@ import CPlaceholder from '@coreui/react/src/components/placeholder/CPlaceholder' {`"glow"`}, {`"wave"`} - Set animation type to better convey the perception of something being actively loaded. + +

Set animation type to better convey the perception of something being actively loaded.

+ as# @@ -29,7 +31,9 @@ import CPlaceholder from '@coreui/react/src/components/placeholder/CPlaceholder' {`(ElementType & "symbol")`}, {`(ElementType & "object")`}, {`(ElementType & "span")`}, {`(ElementType & "slot")`}, {`(ElementType & "style")`}, {`... 174 more ...`}, {`(ElementType & FunctionComponent\<...>)`} - Component used for the root node. Either a string to use a HTML element or a component. + +

Component used for the root node. Either a string to use a HTML element or a component.

+ className# @@ -37,7 +41,9 @@ import CPlaceholder from '@coreui/react/src/components/placeholder/CPlaceholder' {`string`} - A string of all className you want applied to the component. + +

A string of all className you want applied to the component.

+ color# @@ -45,7 +51,9 @@ import CPlaceholder from '@coreui/react/src/components/placeholder/CPlaceholder' {`'primary'`}, {`'secondary'`}, {`'success'`}, {`'danger'`}, {`'warning'`}, {`'info'`}, {`'dark'`}, {`'light'`}, {`string`} - Sets the color context of the component to one of CoreUI’s themed colors. + +

Sets the color context of the component to one of CoreUI’s themed colors.

+ lg# @@ -53,7 +61,9 @@ import CPlaceholder from '@coreui/react/src/components/placeholder/CPlaceholder' {`number`} - The number of columns on large devices (\<1200px). + +

The number of columns on large devices (<1200px).

+ md# @@ -61,7 +71,9 @@ import CPlaceholder from '@coreui/react/src/components/placeholder/CPlaceholder' {`number`} - The number of columns on medium devices (\<992px). + +

The number of columns on medium devices (<992px).

+ size# @@ -69,7 +81,9 @@ import CPlaceholder from '@coreui/react/src/components/placeholder/CPlaceholder' {`"xs"`}, {`"sm"`}, {`"lg"`} - Size the component extra small, small, or large. + +

Size the component extra small, small, or large.

+ sm# @@ -77,7 +91,9 @@ import CPlaceholder from '@coreui/react/src/components/placeholder/CPlaceholder' {`number`} - The number of columns on small devices (\<768px). + +

The number of columns on small devices (<768px).

+ xl# @@ -85,7 +101,9 @@ import CPlaceholder from '@coreui/react/src/components/placeholder/CPlaceholder' {`number`} - The number of columns on X-Large devices (\<1400px). + +

The number of columns on X-Large devices (<1400px).

+ xs# @@ -93,7 +111,9 @@ import CPlaceholder from '@coreui/react/src/components/placeholder/CPlaceholder' {`number`} - The number of columns on extra small devices (\<576px). + +

The number of columns on extra small devices (<576px).

+ xxl# @@ -101,7 +121,9 @@ import CPlaceholder from '@coreui/react/src/components/placeholder/CPlaceholder' {`number`} - The number of columns on XX-Large devices (≥1400px). + +

The number of columns on XX-Large devices (≥1400px).

+ diff --git a/packages/docs/content/api/CPopover.api.mdx b/packages/docs/content/api/CPopover.api.mdx index 784e2a0d..bfc98bd5 100644 --- a/packages/docs/content/api/CPopover.api.mdx +++ b/packages/docs/content/api/CPopover.api.mdx @@ -21,7 +21,9 @@ import CPopover from '@coreui/react/src/components/popover/CPopover' {`boolean`} - Apply a CSS fade transition to the popover. + +

Apply a CSS fade transition to the popover.

+ className# @@ -29,7 +31,9 @@ import CPopover from '@coreui/react/src/components/popover/CPopover' {`string`} - A string of all className you want applied to the component. + +

A string of all className you want applied to the component.

+ container#4.11.0+ @@ -37,7 +41,9 @@ import CPopover from '@coreui/react/src/components/popover/CPopover' {`Element`}, {`DocumentFragment`}, {`(() => Element | DocumentFragment)`} - Appends the react popover to a specific element. You can pass an HTML element or function that returns a single element. By default {`document.body`}. + +

Appends the react popover to a specific element. You can pass an HTML element or function that returns a single element. By default {`document.body`}.

+ content# @@ -45,7 +51,9 @@ import CPopover from '@coreui/react/src/components/popover/CPopover' {`ReactNode`} - Content node for your component. + +

Content node for your component.

+ delay#4.9.0+ @@ -53,7 +61,9 @@ import CPopover from '@coreui/react/src/components/popover/CPopover' {`number`}, {`{ show: number; hide: number; }`} - The delay for displaying and hiding the popover (in milliseconds). When a numerical value is provided, the delay applies to both the hide and show actions. The object structure for specifying the delay is as follows: delay: {`{ 'show': 500, 'hide': 100 }`}. + +

The delay for displaying and hiding the popover (in milliseconds). When a numerical value is provided, the delay applies to both the hide and show actions. The object structure for specifying the delay is as follows: delay: {`{ 'show': 500, 'hide': 100 }`}.

+ fallbackPlacements#4.9.0+ @@ -61,7 +71,9 @@ import CPopover from '@coreui/react/src/components/popover/CPopover' {`Placements`}, {`Placements[]`} - Specify the desired order of fallback placements by providing a list of placements as an array. The placements should be prioritized based on preference. + +

Specify the desired order of fallback placements by providing a list of placements as an array. The placements should be prioritized based on preference.

+ offset# @@ -69,7 +81,9 @@ import CPopover from '@coreui/react/src/components/popover/CPopover' {`[number, number]`} - Offset of the popover relative to its target. + +

Offset of the popover relative to its target.

+ onHide# @@ -77,7 +91,9 @@ import CPopover from '@coreui/react/src/components/popover/CPopover' {`() => void`} - Callback fired when the component requests to be hidden. + +

Callback fired when the component requests to be hidden.

+ onShow# @@ -85,7 +101,9 @@ import CPopover from '@coreui/react/src/components/popover/CPopover' {`() => void`} - Callback fired when the component requests to be shown. + +

Callback fired when the component requests to be shown.

+ placement# @@ -93,7 +111,9 @@ import CPopover from '@coreui/react/src/components/popover/CPopover' {`"auto"`}, {`"top"`}, {`"bottom"`}, {`"right"`}, {`"left"`} - Describes the placement of your component after Popper.js has applied all the modifiers that may have flipped or altered the originally provided placement property. + +

Describes the placement of your component after Popper.js has applied all the modifiers that may have flipped or altered the originally provided placement property.

+ title# @@ -101,7 +121,9 @@ import CPopover from '@coreui/react/src/components/popover/CPopover' {`ReactNode`} - Title node for your component. + +

Title node for your component.

+ trigger# @@ -109,7 +131,9 @@ import CPopover from '@coreui/react/src/components/popover/CPopover' {`'hover'`}, {`'focus'`}, {`'click'`} - Sets which event handlers you’d like provided to your toggle prop. You can specify one trigger or an array of them. + +

Sets which event handlers you’d like provided to your toggle prop. You can specify one trigger or an array of them.

+ visible# @@ -117,7 +141,9 @@ import CPopover from '@coreui/react/src/components/popover/CPopover' {`boolean`} - Toggle the visibility of popover component. + +

Toggle the visibility of popover component.

+ diff --git a/packages/docs/content/api/CProgress.api.mdx b/packages/docs/content/api/CProgress.api.mdx index efd6a125..1332aad0 100644 --- a/packages/docs/content/api/CProgress.api.mdx +++ b/packages/docs/content/api/CProgress.api.mdx @@ -21,7 +21,9 @@ import CProgress from '@coreui/react/src/components/progress/CProgress' {`boolean`} - Use to animate the stripes right to left via CSS3 animations. + +

Use to animate the stripes right to left via CSS3 animations.

+ className# @@ -29,7 +31,9 @@ import CProgress from '@coreui/react/src/components/progress/CProgress' {`string`} - A string of all className you want applied to the component. + +

A string of all className you want applied to the component.

+ color# @@ -37,7 +41,9 @@ import CProgress from '@coreui/react/src/components/progress/CProgress' {`'primary'`}, {`'secondary'`}, {`'success'`}, {`'danger'`}, {`'warning'`}, {`'info'`}, {`'dark'`}, {`'light'`}, {`string`} - Sets the color context of the component to one of CoreUI’s themed colors. + +

Sets the color context of the component to one of CoreUI’s themed colors.

+ height# @@ -45,7 +51,9 @@ import CProgress from '@coreui/react/src/components/progress/CProgress' {`number`} - Sets the height of the component. If you set that value the inner {`\`} will automatically resize accordingly. + +

Sets the height of the component. If you set that value the inner {`<CProgressBar>`} will automatically resize accordingly.

+ progressBarClassName#4.9.0+ @@ -53,7 +61,9 @@ import CProgress from '@coreui/react/src/components/progress/CProgress' {`string`} - A string of all className you want applied to the \ component. + +

A string of all className you want applied to the {`<CProgressBar>`} component.

+ thin# @@ -61,7 +71,9 @@ import CProgress from '@coreui/react/src/components/progress/CProgress' {`boolean`} - Makes progress bar thinner. + +

Makes progress bar thinner.

+ value# @@ -69,7 +81,9 @@ import CProgress from '@coreui/react/src/components/progress/CProgress' {`number`} - The percent to progress the ProgressBar (out of 100). + +

The percent to progress the ProgressBar (out of 100).

+ variant# @@ -77,7 +91,9 @@ import CProgress from '@coreui/react/src/components/progress/CProgress' {`"striped"`} - Set the progress bar variant to optional striped. + +

Set the progress bar variant to optional striped.

+ white# @@ -85,7 +101,9 @@ import CProgress from '@coreui/react/src/components/progress/CProgress' {`boolean`} - Change the default color to white. + +

Change the default color to white.

+ diff --git a/packages/docs/content/api/CProgressBar.api.mdx b/packages/docs/content/api/CProgressBar.api.mdx index 1e21b9c7..56197cb6 100644 --- a/packages/docs/content/api/CProgressBar.api.mdx +++ b/packages/docs/content/api/CProgressBar.api.mdx @@ -21,7 +21,9 @@ import CProgressBar from '@coreui/react/src/components/progress/CProgressBar' {`boolean`} - Use to animate the stripes right to left via CSS3 animations. + +

Use to animate the stripes right to left via CSS3 animations.

+ className# @@ -29,7 +31,9 @@ import CProgressBar from '@coreui/react/src/components/progress/CProgressBar' {`string`} - A string of all className you want applied to the component. + +

A string of all className you want applied to the component.

+ color# @@ -37,7 +41,9 @@ import CProgressBar from '@coreui/react/src/components/progress/CProgressBar' {`'primary'`}, {`'secondary'`}, {`'success'`}, {`'danger'`}, {`'warning'`}, {`'info'`}, {`'dark'`}, {`'light'`}, {`string`} - Sets the color context of the component to one of CoreUI’s themed colors. + +

Sets the color context of the component to one of CoreUI’s themed colors.

+ value# @@ -45,7 +51,9 @@ import CProgressBar from '@coreui/react/src/components/progress/CProgressBar' {`number`} - The percent to progress the ProgressBar. + +

The percent to progress the ProgressBar.

+ variant# @@ -53,7 +61,9 @@ import CProgressBar from '@coreui/react/src/components/progress/CProgressBar' {`"striped"`} - Set the progress bar variant to optional striped. + +

Set the progress bar variant to optional striped.

+ diff --git a/packages/docs/content/api/CProgressStacked.api.mdx b/packages/docs/content/api/CProgressStacked.api.mdx index 19f2beef..ce482129 100644 --- a/packages/docs/content/api/CProgressStacked.api.mdx +++ b/packages/docs/content/api/CProgressStacked.api.mdx @@ -21,7 +21,9 @@ import CProgressStacked from '@coreui/react/src/components/progress/CProgressSta {`string`} - A string of all className you want applied to the component. + +

A string of all className you want applied to the component.

+ diff --git a/packages/docs/content/api/CRow.api.mdx b/packages/docs/content/api/CRow.api.mdx index f2e0f907..f8f3b137 100644 --- a/packages/docs/content/api/CRow.api.mdx +++ b/packages/docs/content/api/CRow.api.mdx @@ -21,7 +21,9 @@ import CRow from '@coreui/react/src/components/grid/CRow' {`string`} - A string of all className you want applied to the base component. + +

A string of all className you want applied to the base component.

+ lg# @@ -29,7 +31,9 @@ import CRow from '@coreui/react/src/components/grid/CRow' {`{{ cols: 'auto' | number | string } | { gutter: number | string } | { gutterX: number | string } | { gutterY: number | string }}`} - The number of columns/offset/order on large devices (\<1200px). + +

The number of columns/offset/order on large devices (<1200px).

+ md# @@ -37,7 +41,9 @@ import CRow from '@coreui/react/src/components/grid/CRow' {`{{ cols: 'auto' | number | string } | { gutter: number | string } | { gutterX: number | string } | { gutterY: number | string }}`} - The number of columns/offset/order on medium devices (\<992px). + +

The number of columns/offset/order on medium devices (<992px).

+ sm# @@ -45,7 +51,9 @@ import CRow from '@coreui/react/src/components/grid/CRow' {`{{ cols: 'auto' | number | string } | { gutter: number | string } | { gutterX: number | string } | { gutterY: number | string }}`} - The number of columns/offset/order on small devices (\<768px). + +

The number of columns/offset/order on small devices (<768px).

+ xl# @@ -53,7 +61,9 @@ import CRow from '@coreui/react/src/components/grid/CRow' {`{{ cols: 'auto' | number | string } | { gutter: number | string } | { gutterX: number | string } | { gutterY: number | string }}`} - The number of columns/offset/order on X-Large devices (\<1400px). + +

The number of columns/offset/order on X-Large devices (<1400px).

+ xs# @@ -61,7 +71,9 @@ import CRow from '@coreui/react/src/components/grid/CRow' {`{{ cols: 'auto' | number | string } | { gutter: number | string } | { gutterX: number | string } | { gutterY: number | string }}`} - The number of columns/offset/order on extra small devices (\<576px). + +

The number of columns/offset/order on extra small devices (<576px).

+ xxl# @@ -69,7 +81,9 @@ import CRow from '@coreui/react/src/components/grid/CRow' {`{{ cols: 'auto' | number | string } | { gutter: number | string } | { gutterX: number | string } | { gutterY: number | string }}`} - The number of columns/offset/order on XX-Large devices (≥1400px). + +

The number of columns/offset/order on XX-Large devices (≥1400px).

+ diff --git a/packages/docs/content/api/CSidebar.api.mdx b/packages/docs/content/api/CSidebar.api.mdx index e251864c..7d7dd7d4 100644 --- a/packages/docs/content/api/CSidebar.api.mdx +++ b/packages/docs/content/api/CSidebar.api.mdx @@ -21,7 +21,9 @@ import CSidebar from '@coreui/react/src/components/sidebar/CSidebar' {`string`} - A string of all className you want applied to the component. + +

A string of all className you want applied to the component.

+ colorScheme# @@ -29,7 +31,9 @@ import CSidebar from '@coreui/react/src/components/sidebar/CSidebar' {`'dark'`}, {`'light'`} - Sets if the color of text should be colored for a light or dark dark background. + +

Sets if the color of text should be colored for a light or dark dark background.

+ narrow# @@ -37,7 +41,9 @@ import CSidebar from '@coreui/react/src/components/sidebar/CSidebar' {`boolean`} - Make sidebar narrow. + +

Make sidebar narrow.

+ onHide# @@ -45,7 +51,9 @@ import CSidebar from '@coreui/react/src/components/sidebar/CSidebar' {`() => void`} - Callback fired when the component requests to be hidden. + +

Callback fired when the component requests to be hidden.

+ onShow# @@ -53,7 +61,9 @@ import CSidebar from '@coreui/react/src/components/sidebar/CSidebar' {`() => void`} - Callback fired when the component requests to be shown. + +

Callback fired when the component requests to be shown.

+ onVisibleChange# @@ -61,7 +71,9 @@ import CSidebar from '@coreui/react/src/components/sidebar/CSidebar' {`(visible: boolean) => void`} - Event emitted after visibility of component changed. + +

Event emitted after visibility of component changed.

+ overlaid# @@ -69,7 +81,9 @@ import CSidebar from '@coreui/react/src/components/sidebar/CSidebar' {`boolean`} - Set sidebar to overlaid variant. + +

Set sidebar to overlaid variant.

+ placement# @@ -77,7 +91,9 @@ import CSidebar from '@coreui/react/src/components/sidebar/CSidebar' {`'start'`}, {`'end'`} - Components placement, there’s no default placement. + +

Components placement, there’s no default placement.

+ position# @@ -85,7 +101,9 @@ import CSidebar from '@coreui/react/src/components/sidebar/CSidebar' {`"fixed"`}, {`"sticky"`} - Place sidebar in non-static positions. + +

Place sidebar in non-static positions.

+ size# @@ -93,7 +111,9 @@ import CSidebar from '@coreui/react/src/components/sidebar/CSidebar' {`"sm"`}, {`"lg"`}, {`"xl"`} - Size the component small, large, or extra large. + +

Size the component small, large, or extra large.

+ unfoldable# @@ -101,7 +121,9 @@ import CSidebar from '@coreui/react/src/components/sidebar/CSidebar' {`boolean`} - Expand narrowed sidebar on hover. + +

Expand narrowed sidebar on hover.

+ visible# @@ -109,7 +131,9 @@ import CSidebar from '@coreui/react/src/components/sidebar/CSidebar' {`boolean`} - Toggle the visibility of sidebar component. + +

Toggle the visibility of sidebar component.

+ diff --git a/packages/docs/content/api/CSidebarBrand.api.mdx b/packages/docs/content/api/CSidebarBrand.api.mdx index fc56e0d0..55a39332 100644 --- a/packages/docs/content/api/CSidebarBrand.api.mdx +++ b/packages/docs/content/api/CSidebarBrand.api.mdx @@ -21,7 +21,9 @@ import CSidebarBrand from '@coreui/react/src/components/sidebar/CSidebarBrand' {`(ElementType & "symbol")`}, {`(ElementType & "object")`}, {`(ElementType & "a")`}, {`(ElementType & "slot")`}, {`(ElementType & "style")`}, {`... 174 more ...`}, {`(ElementType & FunctionComponent\<...>)`} - Component used for the root node. Either a string to use a HTML element or a component. + +

Component used for the root node. Either a string to use a HTML element or a component.

+ className# @@ -29,7 +31,9 @@ import CSidebarBrand from '@coreui/react/src/components/sidebar/CSidebarBrand' {`string`} - A string of all className you want applied to the component. + +

A string of all className you want applied to the component.

+ diff --git a/packages/docs/content/api/CSidebarFooter.api.mdx b/packages/docs/content/api/CSidebarFooter.api.mdx index ac4cc6b1..d3f357b2 100644 --- a/packages/docs/content/api/CSidebarFooter.api.mdx +++ b/packages/docs/content/api/CSidebarFooter.api.mdx @@ -21,7 +21,9 @@ import CSidebarFooter from '@coreui/react/src/components/sidebar/CSidebarFooter' {`string`} - A string of all className you want applied to the component. + +

A string of all className you want applied to the component.

+ diff --git a/packages/docs/content/api/CSidebarHeader.api.mdx b/packages/docs/content/api/CSidebarHeader.api.mdx index fae56074..ea6eaf7f 100644 --- a/packages/docs/content/api/CSidebarHeader.api.mdx +++ b/packages/docs/content/api/CSidebarHeader.api.mdx @@ -21,7 +21,9 @@ import CSidebarHeader from '@coreui/react/src/components/sidebar/CSidebarHeader' {`string`} - A string of all className you want applied to the component. + +

A string of all className you want applied to the component.

+ diff --git a/packages/docs/content/api/CSidebarNav.api.mdx b/packages/docs/content/api/CSidebarNav.api.mdx index 099b5949..dbc289a6 100644 --- a/packages/docs/content/api/CSidebarNav.api.mdx +++ b/packages/docs/content/api/CSidebarNav.api.mdx @@ -21,7 +21,9 @@ import CSidebarNav from '@coreui/react/src/components/sidebar/CSidebarNav' {`(ElementType & "symbol")`}, {`(ElementType & "object")`}, {`(ElementType & "ul")`}, {`(ElementType & "slot")`}, {`(ElementType & "style")`}, {`... 174 more ...`}, {`(ElementType & FunctionComponent\<...>)`} - Component used for the root node. Either a string to use a HTML element or a component. + +

Component used for the root node. Either a string to use a HTML element or a component.

+ className# @@ -29,7 +31,9 @@ import CSidebarNav from '@coreui/react/src/components/sidebar/CSidebarNav' {`string`} - A string of all className you want applied to the component. + +

A string of all className you want applied to the component.

+ diff --git a/packages/docs/content/api/CSidebarToggler.api.mdx b/packages/docs/content/api/CSidebarToggler.api.mdx index f35f392e..4c39a565 100644 --- a/packages/docs/content/api/CSidebarToggler.api.mdx +++ b/packages/docs/content/api/CSidebarToggler.api.mdx @@ -21,7 +21,9 @@ import CSidebarToggler from '@coreui/react/src/components/sidebar/CSidebarToggle {`string`} - A string of all className you want applied to the component. + +

A string of all className you want applied to the component.

+ diff --git a/packages/docs/content/api/CSpinner.api.mdx b/packages/docs/content/api/CSpinner.api.mdx index 48fc06f8..c072502a 100644 --- a/packages/docs/content/api/CSpinner.api.mdx +++ b/packages/docs/content/api/CSpinner.api.mdx @@ -21,7 +21,9 @@ import CSpinner from '@coreui/react/src/components/spinner/CSpinner' {`(ElementType & "symbol")`}, {`(ElementType & "object")`}, {`(ElementType & "div")`}, {`(ElementType & "slot")`}, {`(ElementType & "style")`}, {`... 174 more ...`}, {`(ElementType & FunctionComponent\<...>)`} - Component used for the root node. Either a string to use a HTML element or a component. + +

Component used for the root node. Either a string to use a HTML element or a component.

+ className# @@ -29,7 +31,9 @@ import CSpinner from '@coreui/react/src/components/spinner/CSpinner' {`string`} - A string of all className you want applied to the component. + +

A string of all className you want applied to the component.

+ color# @@ -37,7 +41,9 @@ import CSpinner from '@coreui/react/src/components/spinner/CSpinner' {`'primary'`}, {`'secondary'`}, {`'success'`}, {`'danger'`}, {`'warning'`}, {`'info'`}, {`'dark'`}, {`'light'`}, {`string`} - Sets the color context of the component to one of CoreUI’s themed colors. + +

Sets the color context of the component to one of CoreUI’s themed colors.

+ size# @@ -45,7 +51,9 @@ import CSpinner from '@coreui/react/src/components/spinner/CSpinner' {`"sm"`} - Size the component small. + +

Size the component small.

+ variant# @@ -53,7 +61,9 @@ import CSpinner from '@coreui/react/src/components/spinner/CSpinner' {`"border"`}, {`"grow"`} - Set the button variant to an outlined button or a ghost button. + +

Set the button variant to an outlined button or a ghost button.

+ visuallyHiddenLabel# @@ -61,7 +71,9 @@ import CSpinner from '@coreui/react/src/components/spinner/CSpinner' {`string`} - Set visually hidden label for accessibility purposes. + +

Set visually hidden label for accessibility purposes.

+ diff --git a/packages/docs/content/api/CTab.api.mdx b/packages/docs/content/api/CTab.api.mdx index 6ead7a6c..1d298ded 100644 --- a/packages/docs/content/api/CTab.api.mdx +++ b/packages/docs/content/api/CTab.api.mdx @@ -21,7 +21,9 @@ import CTab from '@coreui/react/src/components/tabs/CTab' {`string`} - A string of all className you want applied to the base component. + +

A string of all className you want applied to the base component.

+ disabled# @@ -29,7 +31,9 @@ import CTab from '@coreui/react/src/components/tabs/CTab' {`boolean`} - Toggle the disabled state for the component. + +

Toggle the disabled state for the component.

+ itemKey# @@ -37,7 +41,9 @@ import CTab from '@coreui/react/src/components/tabs/CTab' {`string`}, {`number`} - Item key. + +

Item key.

+ diff --git a/packages/docs/content/api/CTabContent.api.mdx b/packages/docs/content/api/CTabContent.api.mdx index 76755621..c57cbae0 100644 --- a/packages/docs/content/api/CTabContent.api.mdx +++ b/packages/docs/content/api/CTabContent.api.mdx @@ -21,7 +21,9 @@ import CTabContent from '@coreui/react/src/components/tabs/CTabContent' {`string`} - A string of all className you want applied to the base component. + +

A string of all className you want applied to the base component.

+ diff --git a/packages/docs/content/api/CTabList.api.mdx b/packages/docs/content/api/CTabList.api.mdx index 59fe0074..176e4fb7 100644 --- a/packages/docs/content/api/CTabList.api.mdx +++ b/packages/docs/content/api/CTabList.api.mdx @@ -21,7 +21,9 @@ import CTabList from '@coreui/react/src/components/tabs/CTabList' {`string`} - A string of all className you want applied to the base component. + +

A string of all className you want applied to the base component.

+ layout# @@ -29,7 +31,9 @@ import CTabList from '@coreui/react/src/components/tabs/CTabList' {`"fill"`}, {`"justified"`} - Specify a layout type for component. + +

Specify a layout type for component.

+ variant# @@ -37,7 +41,9 @@ import CTabList from '@coreui/react/src/components/tabs/CTabList' {`"pills"`}, {`"tabs"`}, {`"underline"`}, {`"underline-border"`} - Set the nav variant to tabs or pills. + +

Set the nav variant to tabs or pills.

+ diff --git a/packages/docs/content/api/CTabPane.api.mdx b/packages/docs/content/api/CTabPane.api.mdx index 96326f15..4d401d33 100644 --- a/packages/docs/content/api/CTabPane.api.mdx +++ b/packages/docs/content/api/CTabPane.api.mdx @@ -21,7 +21,9 @@ import CTabPane from '@coreui/react/src/components/tabs/CTabPane' {`string`} - A string of all className you want applied to the base component. + +

A string of all className you want applied to the base component.

+ onHide# @@ -29,7 +31,9 @@ import CTabPane from '@coreui/react/src/components/tabs/CTabPane' {`() => void`} - Callback fired when the component requests to be hidden. + +

Callback fired when the component requests to be hidden.

+ onShow# @@ -37,7 +41,9 @@ import CTabPane from '@coreui/react/src/components/tabs/CTabPane' {`() => void`} - Callback fired when the component requests to be shown. + +

Callback fired when the component requests to be shown.

+ transition#5.1.0+ @@ -45,7 +51,9 @@ import CTabPane from '@coreui/react/src/components/tabs/CTabPane' {`boolean`} - Enable fade in and fade out transition. + +

Enable fade in and fade out transition.

+ visible# @@ -53,7 +61,9 @@ import CTabPane from '@coreui/react/src/components/tabs/CTabPane' {`boolean`} - Toggle the visibility of component. + +

Toggle the visibility of component.

+ diff --git a/packages/docs/content/api/CTabPanel.api.mdx b/packages/docs/content/api/CTabPanel.api.mdx index db4df643..f8f092dd 100644 --- a/packages/docs/content/api/CTabPanel.api.mdx +++ b/packages/docs/content/api/CTabPanel.api.mdx @@ -21,7 +21,9 @@ import CTabPanel from '@coreui/react/src/components/tabs/CTabPanel' {`string`} - A string of all className you want applied to the base component. + +

A string of all className you want applied to the base component.

+ itemKey# @@ -29,7 +31,9 @@ import CTabPanel from '@coreui/react/src/components/tabs/CTabPanel' {`string`}, {`number`} - Item key. + +

Item key.

+ onHide# @@ -37,7 +41,9 @@ import CTabPanel from '@coreui/react/src/components/tabs/CTabPanel' {`() => void`} - Callback fired when the component requests to be hidden. + +

Callback fired when the component requests to be hidden.

+ onShow# @@ -45,7 +51,9 @@ import CTabPanel from '@coreui/react/src/components/tabs/CTabPanel' {`() => void`} - Callback fired when the component requests to be shown. + +

Callback fired when the component requests to be shown.

+ transition# @@ -53,7 +61,9 @@ import CTabPanel from '@coreui/react/src/components/tabs/CTabPanel' {`boolean`} - Enable fade in and fade out transition. + +

Enable fade in and fade out transition.

+ visible# @@ -61,7 +71,9 @@ import CTabPanel from '@coreui/react/src/components/tabs/CTabPanel' {`boolean`} - Toggle the visibility of component. + +

Toggle the visibility of component.

+ diff --git a/packages/docs/content/api/CTable.api.mdx b/packages/docs/content/api/CTable.api.mdx index b1f101b4..556807db 100644 --- a/packages/docs/content/api/CTable.api.mdx +++ b/packages/docs/content/api/CTable.api.mdx @@ -21,7 +21,9 @@ import CTable from '@coreui/react/src/components/table/CTable' {`string`} - Set the vertical aligment. + +

Set the vertical aligment.

+ borderColor# @@ -29,7 +31,9 @@ import CTable from '@coreui/react/src/components/table/CTable' {`'primary'`}, {`'secondary'`}, {`'success'`}, {`'danger'`}, {`'warning'`}, {`'info'`}, {`'dark'`}, {`'light'`}, {`string`} - Sets the border color of the component to one of CoreUI’s themed colors. + +

Sets the border color of the component to one of CoreUI’s themed colors.

+ bordered# @@ -37,7 +41,9 @@ import CTable from '@coreui/react/src/components/table/CTable' {`boolean`} - Add borders on all sides of the table and cells. + +

Add borders on all sides of the table and cells.

+ borderless# @@ -45,7 +51,9 @@ import CTable from '@coreui/react/src/components/table/CTable' {`boolean`} - Remove borders on all sides of the table and cells. + +

Remove borders on all sides of the table and cells.

+ caption# @@ -53,7 +61,9 @@ import CTable from '@coreui/react/src/components/table/CTable' {`string`} - Put the caption on the top if you set {`caption="top"`} of the table or set the text of the table caption. + +

Put the caption on the top if you set {`caption="top"`} of the table or set the text of the table caption.

+ captionTop#4.3.0+ @@ -61,7 +71,9 @@ import CTable from '@coreui/react/src/components/table/CTable' {`string`} - Set the text of the table caption and the caption on the top of the table. + +

Set the text of the table caption and the caption on the top of the table.

+ className# @@ -69,7 +81,9 @@ import CTable from '@coreui/react/src/components/table/CTable' {`string`} - A string of all className you want applied to the component. + +

A string of all className you want applied to the component.

+ color# @@ -77,7 +91,9 @@ import CTable from '@coreui/react/src/components/table/CTable' {`'primary'`}, {`'secondary'`}, {`'success'`}, {`'danger'`}, {`'warning'`}, {`'info'`}, {`'dark'`}, {`'light'`}, {`string`} - Sets the color context of the component to one of CoreUI’s themed colors. + +

Sets the color context of the component to one of CoreUI’s themed colors.

+ columns#4.3.0+ @@ -85,7 +101,18 @@ import CTable from '@coreui/react/src/components/table/CTable' {`(string | Column)[]`} - Prop for table columns configuration. If prop is not defined, table will display columns based on the first item keys, omitting keys that begins with underscore (e.g. '_props')

In columns prop each array item represents one column. Item might be specified in two ways:
String: each item define column name equal to item value.
Object: item is object with following keys available as column configuration:
- key (required)(String) - define column name equal to item key.
- label (String) - define visible label of column. If not defined, label will be generated automatically based on column name, by converting kebab-case and snake_case to individual words and capitalization of each word.
- _props (Object) - adds classes to all cels in column, ex. {`_props: { scope: 'col', className: 'custom-class' }`},
- _style (Object) - adds styles to the column header (useful for defining widths) + +

Prop for table columns configuration. If prop is not defined, table will display columns based on the first item keys, omitting keys that begins with underscore (e.g. '_props')

+

In columns prop each array item represents one column. Item might be specified in two ways:
+String: each item define column name equal to item value.
+Object: item is object with following keys available as column configuration:

+
    +
  • key (required)(String) - define column name equal to item key.
  • +
  • label (String) - define visible label of column. If not defined, label will be generated automatically based on column name, by converting kebab-case and snake_case to individual words and capitalization of each word.
  • +
  • _props (Object) - adds classes to all cels in column, ex. {`_props: { scope: 'col', className: 'custom-class' }`},
  • +
  • _style (Object) - adds styles to the column header (useful for defining widths)
  • +
+ footer#4.3.0+ @@ -93,7 +120,13 @@ import CTable from '@coreui/react/src/components/table/CTable' {`(string | FooterItem)[]`} - Array of objects or strings, where each element represents one cell in the table footer.

Example items:
{`['FooterCell', 'FooterCell', 'FooterCell']`}
or
{`[{ label: 'FooterCell', _props: { color: 'success' }, ...]`} + +

Array of objects or strings, where each element represents one cell in the table footer.

+

Example items:
+{`['FooterCell', 'FooterCell', 'FooterCell']`}
+or
+{`[{ label: 'FooterCell', _props: { color: 'success' }, ...]`}

+ hover# @@ -101,7 +134,9 @@ import CTable from '@coreui/react/src/components/table/CTable' {`boolean`} - Enable a hover state on table rows within a {`\`}. + +

Enable a hover state on table rows within a {`<CTableBody>`}.

+ items#4.3.0+ @@ -109,7 +144,11 @@ import CTable from '@coreui/react/src/components/table/CTable' {`Item[]`} - Array of objects, where each object represents one item - row in table. Additionally, you can add style classes to each row by passing them by '_props' key and to single cell by '_cellProps'.

Example item:
{`{ name: 'John' , age: 12, _props: { color: 'success' }, _cellProps: { age: { className: 'fw-bold'}}}`} + +

Array of objects, where each object represents one item - row in table. Additionally, you can add style classes to each row by passing them by 'props' key and to single cell by 'cellProps'.

+

Example item:
+{`{ name: 'John' , age: 12, _props: { color: 'success' }, _cellProps: { age: { className: 'fw-bold'}}}`}

+ responsive# @@ -117,7 +156,9 @@ import CTable from '@coreui/react/src/components/table/CTable' {`boolean`}, {`"sm"`}, {`"md"`}, {`"lg"`}, {`"xl"`}, {`"xxl"`} - Make any table responsive across all viewports or pick a maximum breakpoint with which to have a responsive table up to. + +

Make any table responsive across all viewports or pick a maximum breakpoint with which to have a responsive table up to.

+ small# @@ -125,7 +166,9 @@ import CTable from '@coreui/react/src/components/table/CTable' {`boolean`} - Make table more compact by cutting all cell {`padding`} in half. + +

Make table more compact by cutting all cell {`padding`} in half.

+ striped# @@ -133,7 +176,9 @@ import CTable from '@coreui/react/src/components/table/CTable' {`boolean`} - Add zebra-striping to any table row within the {`\`}. + +

Add zebra-striping to any table row within the {`<CTableBody>`}.

+ stripedColumns#4.3.0+ @@ -141,7 +186,9 @@ import CTable from '@coreui/react/src/components/table/CTable' {`boolean`} - Add zebra-striping to any table column. + +

Add zebra-striping to any table column.

+ tableFootProps#4.3.0+ @@ -149,7 +196,9 @@ import CTable from '@coreui/react/src/components/table/CTable' {`CTableFootProps`} - Properties that will be passed to the table footer component. + +

Properties that will be passed to the table footer component.

+ tableHeadProps#4.3.0+ @@ -157,7 +206,9 @@ import CTable from '@coreui/react/src/components/table/CTable' {`CTableHeadProps`} - Properties that will be passed to the table head component. + +

Properties that will be passed to the table head component.

+ diff --git a/packages/docs/content/api/CTableBody.api.mdx b/packages/docs/content/api/CTableBody.api.mdx index 8bfc35ea..fa015ba9 100644 --- a/packages/docs/content/api/CTableBody.api.mdx +++ b/packages/docs/content/api/CTableBody.api.mdx @@ -21,7 +21,9 @@ import CTableBody from '@coreui/react/src/components/table/CTableBody' {`string`} - A string of all className you want applied to the component. + +

A string of all className you want applied to the component.

+ color# @@ -29,7 +31,9 @@ import CTableBody from '@coreui/react/src/components/table/CTableBody' {`'primary'`}, {`'secondary'`}, {`'success'`}, {`'danger'`}, {`'warning'`}, {`'info'`}, {`'dark'`}, {`'light'`}, {`string`} - Sets the color context of the component to one of CoreUI’s themed colors. + +

Sets the color context of the component to one of CoreUI’s themed colors.

+ diff --git a/packages/docs/content/api/CTableCaption.api.mdx b/packages/docs/content/api/CTableCaption.api.mdx index b98bd598..73372f90 100644 --- a/packages/docs/content/api/CTableCaption.api.mdx +++ b/packages/docs/content/api/CTableCaption.api.mdx @@ -5,16 +5,6 @@ import { CTableCaption } from '@coreui/react' import CTableCaption from '@coreui/react/src/components/table/CTableCaption' ``` -
- - - - - - - - -
PropertyDefaultType
diff --git a/packages/docs/content/api/CTableDataCell.api.mdx b/packages/docs/content/api/CTableDataCell.api.mdx index 1c8c79ac..5c133fbd 100644 --- a/packages/docs/content/api/CTableDataCell.api.mdx +++ b/packages/docs/content/api/CTableDataCell.api.mdx @@ -21,7 +21,9 @@ import CTableDataCell from '@coreui/react/src/components/table/CTableDataCell' {`boolean`} - Highlight a table row or cell. + +

Highlight a table row or cell.

+ align# @@ -29,7 +31,9 @@ import CTableDataCell from '@coreui/react/src/components/table/CTableDataCell' {`string`} - Set the vertical aligment. + +

Set the vertical aligment.

+ className# @@ -37,7 +41,9 @@ import CTableDataCell from '@coreui/react/src/components/table/CTableDataCell' {`string`} - A string of all className you want applied to the component. + +

A string of all className you want applied to the component.

+ color# @@ -45,7 +51,9 @@ import CTableDataCell from '@coreui/react/src/components/table/CTableDataCell' {`'primary'`}, {`'secondary'`}, {`'success'`}, {`'danger'`}, {`'warning'`}, {`'info'`}, {`'dark'`}, {`'light'`}, {`string`} - Sets the color context of the component to one of CoreUI’s themed colors. + +

Sets the color context of the component to one of CoreUI’s themed colors.

+ diff --git a/packages/docs/content/api/CTableFoot.api.mdx b/packages/docs/content/api/CTableFoot.api.mdx index 87e1e2c8..005b256f 100644 --- a/packages/docs/content/api/CTableFoot.api.mdx +++ b/packages/docs/content/api/CTableFoot.api.mdx @@ -21,7 +21,9 @@ import CTableFoot from '@coreui/react/src/components/table/CTableFoot' {`string`} - A string of all className you want applied to the component. + +

A string of all className you want applied to the component.

+ color# @@ -29,7 +31,9 @@ import CTableFoot from '@coreui/react/src/components/table/CTableFoot' {`'primary'`}, {`'secondary'`}, {`'success'`}, {`'danger'`}, {`'warning'`}, {`'info'`}, {`'dark'`}, {`'light'`}, {`string`} - Sets the color context of the component to one of CoreUI’s themed colors. + +

Sets the color context of the component to one of CoreUI’s themed colors.

+ diff --git a/packages/docs/content/api/CTableHead.api.mdx b/packages/docs/content/api/CTableHead.api.mdx index 00b9bca3..2d4fdffb 100644 --- a/packages/docs/content/api/CTableHead.api.mdx +++ b/packages/docs/content/api/CTableHead.api.mdx @@ -21,7 +21,9 @@ import CTableHead from '@coreui/react/src/components/table/CTableHead' {`string`} - A string of all className you want applied to the component. + +

A string of all className you want applied to the component.

+ color# @@ -29,7 +31,9 @@ import CTableHead from '@coreui/react/src/components/table/CTableHead' {`'primary'`}, {`'secondary'`}, {`'success'`}, {`'danger'`}, {`'warning'`}, {`'info'`}, {`'dark'`}, {`'light'`}, {`string`} - Sets the color context of the component to one of CoreUI’s themed colors. + +

Sets the color context of the component to one of CoreUI’s themed colors.

+ diff --git a/packages/docs/content/api/CTableHeaderCell.api.mdx b/packages/docs/content/api/CTableHeaderCell.api.mdx index 1e1c963e..8e4a1175 100644 --- a/packages/docs/content/api/CTableHeaderCell.api.mdx +++ b/packages/docs/content/api/CTableHeaderCell.api.mdx @@ -21,7 +21,9 @@ import CTableHeaderCell from '@coreui/react/src/components/table/CTableHeaderCel {`string`} - A string of all className you want applied to the component. + +

A string of all className you want applied to the component.

+ color# @@ -29,7 +31,9 @@ import CTableHeaderCell from '@coreui/react/src/components/table/CTableHeaderCel {`'primary'`}, {`'secondary'`}, {`'success'`}, {`'danger'`}, {`'warning'`}, {`'info'`}, {`'dark'`}, {`'light'`}, {`string`} - Sets the color context of the component to one of CoreUI’s themed colors. + +

Sets the color context of the component to one of CoreUI’s themed colors.

+ diff --git a/packages/docs/content/api/CTableResponsiveWrapper.api.mdx b/packages/docs/content/api/CTableResponsiveWrapper.api.mdx index ff57b8c7..34bfbfeb 100644 --- a/packages/docs/content/api/CTableResponsiveWrapper.api.mdx +++ b/packages/docs/content/api/CTableResponsiveWrapper.api.mdx @@ -21,7 +21,9 @@ import CTableResponsiveWrapper from '@coreui/react/src/components/table/CTableRe {`boolean`}, {`"sm"`}, {`"md"`}, {`"lg"`}, {`"xl"`}, {`"xxl"`} - Make any table responsive across all viewports or pick a maximum breakpoint with which to have a responsive table up to. + +

Make any table responsive across all viewports or pick a maximum breakpoint with which to have a responsive table up to.

+ diff --git a/packages/docs/content/api/CTableRow.api.mdx b/packages/docs/content/api/CTableRow.api.mdx index c45094b8..7bd30762 100644 --- a/packages/docs/content/api/CTableRow.api.mdx +++ b/packages/docs/content/api/CTableRow.api.mdx @@ -21,7 +21,9 @@ import CTableRow from '@coreui/react/src/components/table/CTableRow' {`boolean`} - Highlight a table row or cell.. + +

Highlight a table row or cell..

+ align# @@ -29,7 +31,9 @@ import CTableRow from '@coreui/react/src/components/table/CTableRow' {`string`} - Set the vertical aligment. + +

Set the vertical aligment.

+ className# @@ -37,7 +41,9 @@ import CTableRow from '@coreui/react/src/components/table/CTableRow' {`string`} - A string of all className you want applied to the component. + +

A string of all className you want applied to the component.

+ color# @@ -45,7 +51,9 @@ import CTableRow from '@coreui/react/src/components/table/CTableRow' {`'primary'`}, {`'secondary'`}, {`'success'`}, {`'danger'`}, {`'warning'`}, {`'info'`}, {`'dark'`}, {`'light'`}, {`string`} - Sets the color context of the component to one of CoreUI’s themed colors. + +

Sets the color context of the component to one of CoreUI’s themed colors.

+ diff --git a/packages/docs/content/api/CTabs.api.mdx b/packages/docs/content/api/CTabs.api.mdx index 50d56cae..edade324 100644 --- a/packages/docs/content/api/CTabs.api.mdx +++ b/packages/docs/content/api/CTabs.api.mdx @@ -21,7 +21,9 @@ import CTabs from '@coreui/react/src/components/tabs/CTabs' {`string`}, {`number`} - The active item key. + +

The active item key.

+ className# @@ -29,7 +31,9 @@ import CTabs from '@coreui/react/src/components/tabs/CTabs' {`string`} - A string of all className you want applied to the base component. + +

A string of all className you want applied to the base component.

+ onChange# @@ -37,7 +41,9 @@ import CTabs from '@coreui/react/src/components/tabs/CTabs' {`(value: string | number) => void`} - The callback is fired when the active tab changes. + +

The callback is fired when the active tab changes.

+ diff --git a/packages/docs/content/api/CToast.api.mdx b/packages/docs/content/api/CToast.api.mdx index 4c623448..ab94a25f 100644 --- a/packages/docs/content/api/CToast.api.mdx +++ b/packages/docs/content/api/CToast.api.mdx @@ -21,7 +21,9 @@ import CToast from '@coreui/react/src/components/toast/CToast' {`boolean`} - Apply a CSS fade transition to the toast. + +

Apply a CSS fade transition to the toast.

+ autohide# @@ -29,7 +31,9 @@ import CToast from '@coreui/react/src/components/toast/CToast' {`boolean`} - Auto hide the toast. + +

Auto hide the toast.

+ className# @@ -37,7 +41,9 @@ import CToast from '@coreui/react/src/components/toast/CToast' {`string`} - A string of all className you want applied to the base component. + +

A string of all className you want applied to the base component.

+ color# @@ -45,7 +51,9 @@ import CToast from '@coreui/react/src/components/toast/CToast' {`'primary'`}, {`'secondary'`}, {`'success'`}, {`'danger'`}, {`'warning'`}, {`'info'`}, {`'dark'`}, {`'light'`}, {`string`} - Sets the color context of the component to one of CoreUI’s themed colors. + +

Sets the color context of the component to one of CoreUI’s themed colors.

+ delay# @@ -53,7 +61,9 @@ import CToast from '@coreui/react/src/components/toast/CToast' {`number`} - Delay hiding the toast (ms). + +

Delay hiding the toast (ms).

+ onClose# @@ -61,7 +71,9 @@ import CToast from '@coreui/react/src/components/toast/CToast' {`(index: number) => void`} - Callback fired when the component requests to be closed. + +

Callback fired when the component requests to be closed.

+ onShow# @@ -69,7 +81,9 @@ import CToast from '@coreui/react/src/components/toast/CToast' {`(index: number) => void`} - Callback fired when the component requests to be shown. + +

Callback fired when the component requests to be shown.

+ visible# @@ -77,7 +91,9 @@ import CToast from '@coreui/react/src/components/toast/CToast' {`boolean`} - Toggle the visibility of component. + +

Toggle the visibility of component.

+ diff --git a/packages/docs/content/api/CToastBody.api.mdx b/packages/docs/content/api/CToastBody.api.mdx index b5c2004f..22ec20e3 100644 --- a/packages/docs/content/api/CToastBody.api.mdx +++ b/packages/docs/content/api/CToastBody.api.mdx @@ -21,7 +21,9 @@ import CToastBody from '@coreui/react/src/components/toast/CToastBody' {`string`} - A string of all className you want applied to the base component. + +

A string of all className you want applied to the base component.

+ diff --git a/packages/docs/content/api/CToastClose.api.mdx b/packages/docs/content/api/CToastClose.api.mdx index f08ce983..7e16287a 100644 --- a/packages/docs/content/api/CToastClose.api.mdx +++ b/packages/docs/content/api/CToastClose.api.mdx @@ -21,7 +21,9 @@ import CToastClose from '@coreui/react/src/components/toast/CToastClose' {`boolean`} - Toggle the active state for the component. + +

Toggle the active state for the component.

+ as# @@ -29,7 +31,9 @@ import CToastClose from '@coreui/react/src/components/toast/CToastClose' {`(ElementType & string)`}, {`(ElementType & ComponentClass\)`}, {`(ElementType & FunctionComponent\)`} - Component used for the root node. Either a string to use a HTML element or a component. + +

Component used for the root node. Either a string to use a HTML element or a component.

+ className# @@ -37,7 +41,9 @@ import CToastClose from '@coreui/react/src/components/toast/CToastClose' {`string`} - A string of all className you want applied to the base component. + +

A string of all className you want applied to the base component.

+ dark# @@ -45,7 +51,9 @@ import CToastClose from '@coreui/react/src/components/toast/CToastClose' {`boolean`} - Invert the default color. + +

Invert the default color.

+ disabled# @@ -53,7 +61,9 @@ import CToastClose from '@coreui/react/src/components/toast/CToastClose' {`boolean`} - Toggle the disabled state for the component. + +

Toggle the disabled state for the component.

+ href# @@ -61,7 +71,9 @@ import CToastClose from '@coreui/react/src/components/toast/CToastClose' {`string`} - The href attribute specifies the URL of the page the link goes to. + +

The href attribute specifies the URL of the page the link goes to.

+ shape# @@ -69,7 +81,9 @@ import CToastClose from '@coreui/react/src/components/toast/CToastClose' {`'rounded'`}, {`'rounded-top'`}, {`'rounded-end'`}, {`'rounded-bottom'`}, {`'rounded-start'`}, {`'rounded-circle'`}, {`'rounded-pill'`}, {`'rounded-0'`}, {`'rounded-1'`}, {`'rounded-2'`}, {`'rounded-3'`}, {`string`} - Select the shape of the component. + +

Select the shape of the component.

+ size# @@ -77,7 +91,9 @@ import CToastClose from '@coreui/react/src/components/toast/CToastClose' {`"sm"`}, {`"lg"`} - Size the component small or large. + +

Size the component small or large.

+ type# @@ -85,7 +101,10 @@ import CToastClose from '@coreui/react/src/components/toast/CToastClose' {`"button"`}, {`"submit"`}, {`"reset"`} - Specifies the type of button. Always specify the type attribute for the {`\ -
-
-

React Modal body text goes here.

-
-
- - -
-
- - - -```jsx - - - React Modal title - - -

React Modal body text goes here.

-
- - Close - Save changes - -
-``` - -### Live demo - -Toggle a working React modal component demo by clicking the button below. It will slide down and fade in from the top of the page. - -export const LiveDemoExample = () => { - const [visible, setVisible] = useState(false) - return ( - <> - setVisible(!visible)}>Launch demo modal - setVisible(false)} - aria-labelledby="LiveDemoExampleLabel" - > - - Modal title - - -

Woohoo, you're reading this text in a modal!

-
- - setVisible(false)}> - Close - - Save changes - -
- - ) -} - - - - - -```jsx -const [visible, setVisible] = useState(false) -return ( - <> - setVisible(!visible)}>Launch demo modal - setVisible(false)} - aria-labelledby="LiveDemoExampleLabel" - > - - Modal title - - -

Woohoo, you're reading this text in a modal!

-
- - setVisible(false)}> - Close - - Save changes - -
- -) -``` - -### Static backdrop - -If you set a `backdrop` to `static`, your React modal component will behave as though the backdrop is static, meaning it will not close when clicking outside it. Click the button below to try it. - -export const StaticBackdropExample = () => { - const [visible, setVisible] = useState(false) - return ( - <> - setVisible(!visible)}>Launch static backdrop modal - setVisible(false)} - aria-labelledby="StaticBackdropExampleLabel" - > - - Modal title - - - I will not close if you click outside me. Don't even try to press escape key. - - - setVisible(false)}> - Close - - Save changes - - - - ) -} - - - - - -```jsx -const [visible, setVisible] = useState(false) -return ( - <> - setVisible(!visible)}>Launch static backdrop modal - setVisible(false)} - aria-labelledby="StaticBackdropExampleLabel" - > - - Modal title - - - I will not close if you click outside me. Don't even try to press escape key. - - - setVisible(false)}> - Close - - Save changes - - - -) -``` - -### Scrolling long content - -When modals become too long for the user's viewport or device, they scroll independent of the page itself. Try the demo below to see what we mean. - -export const ScrollingLongContentExample = () => { - const [visible, setVisible] = useState(false) - return ( - <> - setVisible(!visible)}>Launch demo modal - setVisible(false)} - aria-labelledby="ScrollingLongContentExampleLabel" - > - - Modal title - - -

- Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis - in, egestas eget quam. Morbi leo risus, porta ac consectetur ac, vestibulum at eros. -

-

- Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Vivamus sagittis - lacus vel augue laoreet rutrum faucibus dolor auctor. -

-

- Aenean lacinia bibendum nulla sed consectetur. Praesent commodo cursus magna, vel - scelerisque nisl consectetur et. Donec sed odio dui. Donec ullamcorper nulla non metus - auctor fringilla. -

-

- Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis - in, egestas eget quam. Morbi leo risus, porta ac consectetur ac, vestibulum at eros. -

-

- Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Vivamus sagittis - lacus vel augue laoreet rutrum faucibus dolor auctor. -

-

- Aenean lacinia bibendum nulla sed consectetur. Praesent commodo cursus magna, vel - scelerisque nisl consectetur et. Donec sed odio dui. Donec ullamcorper nulla non metus - auctor fringilla. -

-

- Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis - in, egestas eget quam. Morbi leo risus, porta ac consectetur ac, vestibulum at eros. -

-

- Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Vivamus sagittis - lacus vel augue laoreet rutrum faucibus dolor auctor. -

-

- Aenean lacinia bibendum nulla sed consectetur. Praesent commodo cursus magna, vel - scelerisque nisl consectetur et. Donec sed odio dui. Donec ullamcorper nulla non metus - auctor fringilla. -

-

- Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis - in, egestas eget quam. Morbi leo risus, porta ac consectetur ac, vestibulum at eros. -

-

- Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Vivamus sagittis - lacus vel augue laoreet rutrum faucibus dolor auctor. -

-

- Aenean lacinia bibendum nulla sed consectetur. Praesent commodo cursus magna, vel - scelerisque nisl consectetur et. Donec sed odio dui. Donec ullamcorper nulla non metus - auctor fringilla. -

-

- Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis - in, egestas eget quam. Morbi leo risus, porta ac consectetur ac, vestibulum at eros. -

-

- Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Vivamus sagittis - lacus vel augue laoreet rutrum faucibus dolor auctor. -

-

- Aenean lacinia bibendum nulla sed consectetur. Praesent commodo cursus magna, vel - scelerisque nisl consectetur et. Donec sed odio dui. Donec ullamcorper nulla non metus - auctor fringilla. -

-

- Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis - in, egestas eget quam. Morbi leo risus, porta ac consectetur ac, vestibulum at eros. -

-

- Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Vivamus sagittis - lacus vel augue laoreet rutrum faucibus dolor auctor. -

-

- Aenean lacinia bibendum nulla sed consectetur. Praesent commodo cursus magna, vel - scelerisque nisl consectetur et. Donec sed odio dui. Donec ullamcorper nulla non metus - auctor fringilla. -

-
- - setVisible(false)}> - Close - - Save changes - -
- - ) -} - - - - - -```jsx -const [visible, setVisible] = useState(false) -return ( - <> - setVisible(!visible)}>Launch demo modal - setVisible(false)} - aria-labelledby="ScrollingLongContentExampleLabel" - > - - Modal title - - -

- Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis - in, egestas eget quam. Morbi leo risus, porta ac consectetur ac, vestibulum at eros. -

-

- Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Vivamus sagittis lacus - vel augue laoreet rutrum faucibus dolor auctor. -

-

- Aenean lacinia bibendum nulla sed consectetur. Praesent commodo cursus magna, vel - scelerisque nisl consectetur et. Donec sed odio dui. Donec ullamcorper nulla non metus - auctor fringilla. -

-

- Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis - in, egestas eget quam. Morbi leo risus, porta ac consectetur ac, vestibulum at eros. -

-

- Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Vivamus sagittis lacus - vel augue laoreet rutrum faucibus dolor auctor. -

-

- Aenean lacinia bibendum nulla sed consectetur. Praesent commodo cursus magna, vel - scelerisque nisl consectetur et. Donec sed odio dui. Donec ullamcorper nulla non metus - auctor fringilla. -

-

- Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis - in, egestas eget quam. Morbi leo risus, porta ac consectetur ac, vestibulum at eros. -

-

- Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Vivamus sagittis lacus - vel augue laoreet rutrum faucibus dolor auctor. -

-

- Aenean lacinia bibendum nulla sed consectetur. Praesent commodo cursus magna, vel - scelerisque nisl consectetur et. Donec sed odio dui. Donec ullamcorper nulla non metus - auctor fringilla. -

-

- Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis - in, egestas eget quam. Morbi leo risus, porta ac consectetur ac, vestibulum at eros. -

-

- Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Vivamus sagittis lacus - vel augue laoreet rutrum faucibus dolor auctor. -

-

- Aenean lacinia bibendum nulla sed consectetur. Praesent commodo cursus magna, vel - scelerisque nisl consectetur et. Donec sed odio dui. Donec ullamcorper nulla non metus - auctor fringilla. -

-

- Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis - in, egestas eget quam. Morbi leo risus, porta ac consectetur ac, vestibulum at eros. -

-

- Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Vivamus sagittis lacus - vel augue laoreet rutrum faucibus dolor auctor. -

-

- Aenean lacinia bibendum nulla sed consectetur. Praesent commodo cursus magna, vel - scelerisque nisl consectetur et. Donec sed odio dui. Donec ullamcorper nulla non metus - auctor fringilla. -

-

- Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis - in, egestas eget quam. Morbi leo risus, porta ac consectetur ac, vestibulum at eros. -

-

- Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Vivamus sagittis lacus - vel augue laoreet rutrum faucibus dolor auctor. -

-

- Aenean lacinia bibendum nulla sed consectetur. Praesent commodo cursus magna, vel - scelerisque nisl consectetur et. Donec sed odio dui. Donec ullamcorper nulla non metus - auctor fringilla. -

-
- - setVisible(false)}> - Close - - Save changes - -
- -) -``` - -You can also create a scrollable react modal component that allows scroll the modal body by adding `scrollable` prop. - -export const ScrollingLongContentExample2 = () => { - const [visible, setVisible] = useState(false) - return ( - <> - setVisible(!visible)}>Launch demo modal - setVisible(false)} - aria-labelledby="ScrollingLongContentExampleLabel2" - > - - Modal title - - -

- Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis - in, egestas eget quam. Morbi leo risus, porta ac consectetur ac, vestibulum at eros. -

-

- Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Vivamus sagittis - lacus vel augue laoreet rutrum faucibus dolor auctor. -

-

- Aenean lacinia bibendum nulla sed consectetur. Praesent commodo cursus magna, vel - scelerisque nisl consectetur et. Donec sed odio dui. Donec ullamcorper nulla non metus - auctor fringilla. -

-

- Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis - in, egestas eget quam. Morbi leo risus, porta ac consectetur ac, vestibulum at eros. -

-

- Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Vivamus sagittis - lacus vel augue laoreet rutrum faucibus dolor auctor. -

-

- Aenean lacinia bibendum nulla sed consectetur. Praesent commodo cursus magna, vel - scelerisque nisl consectetur et. Donec sed odio dui. Donec ullamcorper nulla non metus - auctor fringilla. -

-

- Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis - in, egestas eget quam. Morbi leo risus, porta ac consectetur ac, vestibulum at eros. -

-

- Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Vivamus sagittis - lacus vel augue laoreet rutrum faucibus dolor auctor. -

-

- Aenean lacinia bibendum nulla sed consectetur. Praesent commodo cursus magna, vel - scelerisque nisl consectetur et. Donec sed odio dui. Donec ullamcorper nulla non metus - auctor fringilla. -

-

- Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis - in, egestas eget quam. Morbi leo risus, porta ac consectetur ac, vestibulum at eros. -

-

- Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Vivamus sagittis - lacus vel augue laoreet rutrum faucibus dolor auctor. -

-

- Aenean lacinia bibendum nulla sed consectetur. Praesent commodo cursus magna, vel - scelerisque nisl consectetur et. Donec sed odio dui. Donec ullamcorper nulla non metus - auctor fringilla. -

-

- Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis - in, egestas eget quam. Morbi leo risus, porta ac consectetur ac, vestibulum at eros. -

-

- Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Vivamus sagittis - lacus vel augue laoreet rutrum faucibus dolor auctor. -

-

- Aenean lacinia bibendum nulla sed consectetur. Praesent commodo cursus magna, vel - scelerisque nisl consectetur et. Donec sed odio dui. Donec ullamcorper nulla non metus - auctor fringilla. -

-

- Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis - in, egestas eget quam. Morbi leo risus, porta ac consectetur ac, vestibulum at eros. -

-

- Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Vivamus sagittis - lacus vel augue laoreet rutrum faucibus dolor auctor. -

-

- Aenean lacinia bibendum nulla sed consectetur. Praesent commodo cursus magna, vel - scelerisque nisl consectetur et. Donec sed odio dui. Donec ullamcorper nulla non metus - auctor fringilla. -

-
- - setVisible(false)}> - Close - - Save changes - -
- - ) -} - - - - - -```jsx -const [visible, setVisible] = useState(false) -return ( - <> - setVisible(!visible)}>Launch demo modal - setVisible(false)} - aria-labelledby="ScrollingLongContentExampleLabel2" - > - - Modal title - - -

- Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis - in, egestas eget quam. Morbi leo risus, porta ac consectetur ac, vestibulum at eros. -

-

- Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Vivamus sagittis lacus - vel augue laoreet rutrum faucibus dolor auctor. -

-

- Aenean lacinia bibendum nulla sed consectetur. Praesent commodo cursus magna, vel - scelerisque nisl consectetur et. Donec sed odio dui. Donec ullamcorper nulla non metus - auctor fringilla. -

-

- Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis - in, egestas eget quam. Morbi leo risus, porta ac consectetur ac, vestibulum at eros. -

-

- Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Vivamus sagittis lacus - vel augue laoreet rutrum faucibus dolor auctor. -

-

- Aenean lacinia bibendum nulla sed consectetur. Praesent commodo cursus magna, vel - scelerisque nisl consectetur et. Donec sed odio dui. Donec ullamcorper nulla non metus - auctor fringilla. -

-

- Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis - in, egestas eget quam. Morbi leo risus, porta ac consectetur ac, vestibulum at eros. -

-

- Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Vivamus sagittis lacus - vel augue laoreet rutrum faucibus dolor auctor. -

-

- Aenean lacinia bibendum nulla sed consectetur. Praesent commodo cursus magna, vel - scelerisque nisl consectetur et. Donec sed odio dui. Donec ullamcorper nulla non metus - auctor fringilla. -

-

- Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis - in, egestas eget quam. Morbi leo risus, porta ac consectetur ac, vestibulum at eros. -

-

- Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Vivamus sagittis lacus - vel augue laoreet rutrum faucibus dolor auctor. -

-

- Aenean lacinia bibendum nulla sed consectetur. Praesent commodo cursus magna, vel - scelerisque nisl consectetur et. Donec sed odio dui. Donec ullamcorper nulla non metus - auctor fringilla. -

-

- Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis - in, egestas eget quam. Morbi leo risus, porta ac consectetur ac, vestibulum at eros. -

-

- Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Vivamus sagittis lacus - vel augue laoreet rutrum faucibus dolor auctor. -

-

- Aenean lacinia bibendum nulla sed consectetur. Praesent commodo cursus magna, vel - scelerisque nisl consectetur et. Donec sed odio dui. Donec ullamcorper nulla non metus - auctor fringilla. -

-

- Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis - in, egestas eget quam. Morbi leo risus, porta ac consectetur ac, vestibulum at eros. -

-

- Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Vivamus sagittis lacus - vel augue laoreet rutrum faucibus dolor auctor. -

-

- Aenean lacinia bibendum nulla sed consectetur. Praesent commodo cursus magna, vel - scelerisque nisl consectetur et. Donec sed odio dui. Donec ullamcorper nulla non metus - auctor fringilla. -

-
- - setVisible(false)}> - Close - - Save changes - -
- -) -``` - -### Vertically centered - -Add `alignment="center` to `` to vertically center the React modal. - -export const VerticallyCenteredExample = () => { - const [visible, setVisible] = useState(false) - return ( - <> - setVisible(!visible)}>Vertically centered modal - setVisible(false)} - aria-labelledby="VerticallyCenteredExample" - > - - Modal title - - - Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis - in, egestas eget quam. Morbi leo risus, porta ac consectetur ac, vestibulum at eros. - - - setVisible(false)}> - Close - - Save changes - - - - ) -} - - - - - -```jsx -const [visible, setVisible] = useState(false) -return ( - <> - setVisible(!visible)}>Vertically centered modal - setVisible(false)} - aria-labelledby="VerticallyCenteredExample" - > - - Modal title - - - Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis in, - egestas eget quam. Morbi leo risus, porta ac consectetur ac, vestibulum at eros. - - - setVisible(false)}> - Close - - Save changes - - - -) -``` - -export const VerticallyCenteredScrollableExample = () => { - const [visible, setVisible] = useState(false) - return ( - <> - setVisible(!visible)}>Vertically centered scrollable modal - setVisible(false)} - aria-labelledby="VerticallyCenteredScrollableExample2" - > - - Modal title - - -

- Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis - in, egestas eget quam. Morbi leo risus, porta ac consectetur ac, vestibulum at eros. -

-

- Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Vivamus sagittis - lacus vel augue laoreet rutrum faucibus dolor auctor. -

-

- Aenean lacinia bibendum nulla sed consectetur. Praesent commodo cursus magna, vel - scelerisque nisl consectetur et. Donec sed odio dui. Donec ullamcorper nulla non metus - auctor fringilla. -

-

- Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis - in, egestas eget quam. Morbi leo risus, porta ac consectetur ac, vestibulum at eros. -

-

- Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Vivamus sagittis - lacus vel augue laoreet rutrum faucibus dolor auctor. -

-
- - setVisible(false)}> - Close - - Save changes - -
- - ) -} - - - - - -```jsx -const [visible, setVisible] = useState(false) -return ( - <> - setVisible(!visible)}>Vertically centered scrollable modal - setVisible(false)} - aria-labelledby="VerticallyCenteredScrollableExample2" - > - - Modal title - - -

- Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis - in, egestas eget quam. Morbi leo risus, porta ac consectetur ac, vestibulum at eros. -

-

- Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Vivamus sagittis lacus - vel augue laoreet rutrum faucibus dolor auctor. -

-

- Aenean lacinia bibendum nulla sed consectetur. Praesent commodo cursus magna, vel - scelerisque nisl consectetur et. Donec sed odio dui. Donec ullamcorper nulla non metus - auctor fringilla. -

-

- Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis - in, egestas eget quam. Morbi leo risus, porta ac consectetur ac, vestibulum at eros. -

-

- Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Vivamus sagittis lacus - vel augue laoreet rutrum faucibus dolor auctor. -

-
- - setVisible(false)}> - Close - - Save changes - -
- -) -``` - -### Tooltips and popovers - -`` and `` can be placed within react modals as needed. When modal components are closed, any tooltips and popovers within are also automatically dismissed. - -export const TooltipsAndPopoversExample = () => { - const [visible, setVisible] = useState(false) - return ( - <> - setVisible(!visible)}>Launch demo modal - setVisible(false)} - aria-labelledby="TooltipsAndPopoverExample" - > - - Modal title - - -
Popover in a modal
-

- This - - button - triggers a popover on click. -

-
-
Tooltips in a modal
-

- - This link - {' '} - and - - that link - have tooltips on hover. -

-
- - setVisible(false)}> - Close - - Save changes - -
- - ) -} - - - - - -```jsx -const [visible, setVisible] = useState(false) -return ( - <> - setVisible(!visible)}>Launch demo modal - setVisible(false)} - aria-labelledby="TooltipsAndPopoverExample" - > - - Modal title - - -
Popover in a modal
-

- This - - button - triggers a popover on click. -

-
-
Tooltips in a modal
-

- - This link - {' '} - and - - that link - have tooltips on hover. -

-
- - setVisible(false)}> - Close - - Save changes - -
- -) -``` - -### Toggle between modals - -Toggle between multiple modals with some clever placement of the `visible` props. **Please note multiple modals cannot be opened at the same time** — this method simply toggles between two separate modals. - -export const ToggleBetweenModalsExample = () => { - const [visible, setVisible] = useState(false) - const [visible2, setVisible2] = useState(false) - return ( - <> - setVisible(!visible)}>Open first modal - setVisible(false)} - aria-labelledby="ToggleBetweenModalsExample1" - > - - Modal 1 title - - -

Show a second modal and hide this one with the button below.

-
- - { - setVisible(false) - setVisible2(true) - }} - > - Open second modal - - -
- { - setVisible(true) - setVisible2(false) - }} - aria-labelledby="ToggleBetweenModalsExample2" - > - - Modal 2 title - - -

Hide this modal and show the first with the button below.

-
- - { - setVisible(true) - setVisible2(false) - }} - > - Back to first - - -
- - ) -} - - - - - -```jsx -const [visible, setVisible] = useState(false) -const [visible2, setVisible2] = useState(false) -return ( - <> - setVisible(!visible)}>Open first modal - setVisible(false)} - aria-labelledby="ToggleBetweenModalsExample1" - > - - Modal 1 title - - -

Show a second modal and hide this one with the button below.

-
- - { - setVisible(false) - setVisible2(true) - }} - > - Open second modal - - -
- { - setVisible(true) - setVisible2(false) - }} - aria-labelledby="ToggleBetweenModalsExample2" - > - - Modal 2 title - - -

Hide this modal and show the first with the button below.

-
- - { - setVisible(true) - setVisible2(false) - }} - > - Back to first - - -
- -) -``` - -### Change animation - -The variable `$modal-fade-transform` determines the transform state of React Modal component before the modal fade-in animation, whereas the variable `$modal-show-transform` determines the transform state of Modal component after the modal fade-in animation. - -If you want a zoom-in animation, for example, set `$modal-fade-transform: scale(.8)`. - -### Remove animation - -For modals that simply appear rather than fade into view, set `transition` to `false`. - -```jsx -... -``` - -### Accessibility - -Be sure to add `aria-labelledby="..."`, referencing the modal title, to `` Additionally, you may give a description of your modal dialog with `aria-describedby` on ``. Note that you don’t need to add `role="dialog`, `aria-hidden="true"`, and `aria-modal="true"` since we already add it. - -## Optional sizes - -Modals have three optional sizes, available via modifier classes to be placed on a ``. These sizes kick in at certain breakpoints to avoid horizontal scrollbars on narrower viewports. - -| Size | Property size | Modal max-width | -| ----------- | ------------- | --------------- | -| Small | `'sm'` | `300px` | -| Default | None | `500px` | -| Large | `'lg'` | `800px` | -| Extra large | `'xl'` | `1140px` | - -export const OptionalSizesExample = () => { - const [visibleXL, setVisibleXL] = useState(false) - const [visibleLg, setVisibleLg] = useState(false) - const [visibleSm, setVisibleSm] = useState(false) - return ( - <> - setVisibleXL(!visibleXL)}>Extra large modal - setVisibleLg(!visibleLg)}>Large modal - setVisibleSm(!visibleSm)}>Small modal - setVisibleXL(false)} - aria-labelledby="OptionalSizesExample1" - > - - Extra large modal - - ... - - setVisibleLg(false)} - aria-labelledby="OptionalSizesExample2" - > - - Large modal - - ... - - setVisibleSm(false)} - aria-labelledby="OptionalSizesExample3" - > - - Small modal - - ... - - - ) -} - - - - - -```jsx -const [visibleXL, setVisibleXL] = useState(false) -const [visibleLg, setVisibleLg] = useState(false) -const [visibleSm, setVisibleSm] = useState(false) -return ( - <> - setVisibleXL(!visibleXL)}>Extra large modal - setVisibleLg(!visibleLg)}>Large modal - setVisibleSm(!visibleSm)}>Small modal - setVisibleXL(false)} - aria-labelledby="OptionalSizesExample1" - > - - Extra large modal - - ... - - setVisibleLg(false)} - aria-labelledby="OptionalSizesExample2" - > - - Large modal - - ... - - setVisibleSm(false)} - aria-labelledby="OptionalSizesExample3" - > - - Small modal - - ... - - -) -``` - -## Fullscreen Modal - -Another override is the option to pop up a React modal component that covers the user viewport, available via property `fullscrean`. - -| Fullscrean | Availability | -| ---------- | -------------- | -| `true` | Always | -| `'sm'` | Below `576px` | -| `'md'` | Below `768px` | -| `'lg'` | Below `992px` | -| `'xl'` | Below `1200px` | -| `'xxl'` | Below `1400px` | - -export const FullscreenExample = () => { - const [visible, setVisible] = useState(false) - const [visibleSm, setVisibleSm] = useState(false) - const [visibleMd, setVisibleMd] = useState(false) - const [visibleLg, setVisibleLg] = useState(false) - const [visibleXL, setVisibleXL] = useState(false) - const [visibleXXL, setVisibleXXL] = useState(false) - return ( - <> - setVisible(!visible)}>Full screen - setVisibleSm(!visibleSm)}>Full screen below sm - setVisibleMd(!visibleMd)}>Full screen below md - setVisibleLg(!visibleLg)}>Full screen below lg - setVisibleXL(!visibleXL)}>Full screen below xl - setVisibleXXL(!visibleXXL)}>Full screen below xxl - setVisible(false)} - aria-labelledby="FullscreenExample1" - > - - Full screen - - ... - - setVisibleSm(false)} - aria-labelledby="FullscreenExample2" - > - - Full screen below sm - - ... - - setVisibleMd(false)} - aria-labelledby="FullscreenExample3" - > - - Full screen below md - - ... - - setVisibleLg(false)} - aria-labelledby="FullscreenExample4" - > - - Full screen below lg - - ... - - setVisibleXL(false)} - aria-labelledby="FullscreenExample5" - > - - Full screen below xl - - ... - - setVisibleXXL(false)} - aria-labelledby="FullscreenExample6" - > - - Full screen below xxl - - ... - - - ) -} - - - - - -```jsx -const [visible, setVisible] = useState(false) -const [visibleSm, setVisibleSm] = useState(false) -const [visibleMd, setVisibleMd] = useState(false) -const [visibleLg, setVisibleLg] = useState(false) -const [visibleXL, setVisibleXL] = useState(false) -const [visibleXXL, setVisibleXXL] = useState(false) -return ( - <> - setVisible(!visible)}>Full screen - setVisibleSm(!visibleSm)}>Full screen below sm - setVisibleMd(!visibleMd)}>Full screen below md - setVisibleLg(!visibleLg)}>Full screen below lg - setVisibleXL(!visibleXL)}>Full screen below xl - setVisibleXXL(!visibleXXL)}>Full screen below xxl - setVisible(false)} - aria-labelledby="FullscreenExample1" - > - - Full screen - - ... - - setVisibleSm(false)} - aria-labelledby="FullscreenExample2" - > - - Full screen below sm - - ... - - setVisibleMd(false)} - aria-labelledby="FullscreenExample3" - > - - Full screen below md - - ... - - setVisibleLg(false)} - aria-labelledby="FullscreenExample4" - > - - Full screen below lg - - ... - - setVisibleXL(false)} - aria-labelledby="FullscreenExample5" - > - - Full screen below xl - - ... - - setVisibleXXL(false)} - aria-labelledby="FullscreenExample6" - > - - Full screen below xxl - - ... - - -) -``` - -## Customizing - -### CSS variables - -React modals use local CSS variables on `.modal` and `.modal-backdrop` for enhanced real-time customization. Values for the CSS variables are set via Sass, so Sass customization is still supported, too. - - - - - -#### How to use CSS variables - -```jsx -const vars = { - '--my-css-var': 10, - '--my-another-css-var': 'red', -} -return ... -``` - -### SASS variables - - - -### SASS loops - -[Responsive fullscreen modals](#fullscreen-modal) are generated via the `$breakpoints` map and a loop in `scss/_modal.scss`. - - - -## API - -### CModal - -`markdown:CModal.api.mdx` - -### CModalBody - -`markdown:CModalBody.api.mdx` - -### CModalFooter - -`markdown:CModalFooter.api.mdx` - -### CModalHeader - -`markdown:CModalHeader.api.mdx` - -### CModalTitle - -`markdown:CModalTitle.api.mdx` diff --git a/packages/docs/content/components/modal/api.mdx b/packages/docs/content/components/modal/api.mdx new file mode 100644 index 00000000..294226af --- /dev/null +++ b/packages/docs/content/components/modal/api.mdx @@ -0,0 +1,32 @@ +--- +title: React Modal Component API +name: Modal API +description: Explore the API reference for the React Modal component and discover how to effectively utilize its props for customization. +route: /components/modal/ +--- + +import CModalAPI from '../../api/CModal.api.mdx' +import CModalBodyAPI from '../../api/CModalBody.api.mdx' +import CModalFooterAPI from '../../api/CModalFooter.api.mdx' +import CModalHeaderAPI from '../../api/CModalHeader.api.mdx' +import CModalTitleAPI from '../../api/CModalTitle.api.mdx' + +## CModal + + + +## CModalBody + + + +## CModalFooter + + + +## CModalHeader + + + +## CModalTitle + + diff --git a/packages/docs/content/components/modal/examples/ModalFullscreenExample.tsx b/packages/docs/content/components/modal/examples/ModalFullscreenExample.tsx new file mode 100644 index 00000000..267c0797 --- /dev/null +++ b/packages/docs/content/components/modal/examples/ModalFullscreenExample.tsx @@ -0,0 +1,99 @@ +import React, { useState } from 'react' +import { CButton, CModal, CModalBody, CModalHeader, CModalTitle } from '@coreui/react' + +export const ModalFullscreenExample = () => { + const [visible, setVisible] = useState(false) + const [visibleSm, setVisibleSm] = useState(false) + const [visibleMd, setVisibleMd] = useState(false) + const [visibleLg, setVisibleLg] = useState(false) + const [visibleXL, setVisibleXL] = useState(false) + const [visibleXXL, setVisibleXXL] = useState(false) + return ( + <> + setVisible(!visible)}> + Full screen + + setVisibleSm(!visibleSm)}> + Full screen below sm + + setVisibleMd(!visibleMd)}> + Full screen below md + + setVisibleLg(!visibleLg)}> + Full screen below lg + + setVisibleXL(!visibleXL)}> + Full screen below xl + + setVisibleXXL(!visibleXXL)}> + Full screen below xxl + + setVisible(false)} + aria-labelledby="FullscreenExample1" + > + + Full screen + + ... + + setVisibleSm(false)} + aria-labelledby="FullscreenExample2" + > + + Full screen below sm + + ... + + setVisibleMd(false)} + aria-labelledby="FullscreenExample3" + > + + Full screen below md + + ... + + setVisibleLg(false)} + aria-labelledby="FullscreenExample4" + > + + Full screen below lg + + ... + + setVisibleXL(false)} + aria-labelledby="FullscreenExample5" + > + + Full screen below xl + + ... + + setVisibleXXL(false)} + aria-labelledby="FullscreenExample6" + > + + Full screen below xxl + + ... + + + ) +} diff --git a/packages/docs/content/components/modal/examples/ModalLiveDemoExample.tsx b/packages/docs/content/components/modal/examples/ModalLiveDemoExample.tsx new file mode 100644 index 00000000..3bd28d2f --- /dev/null +++ b/packages/docs/content/components/modal/examples/ModalLiveDemoExample.tsx @@ -0,0 +1,29 @@ +import React, { useState } from 'react' +import { CButton, CModal, CModalBody, CModalFooter, CModalHeader, CModalTitle } from '@coreui/react' + +export const ModalLiveDemoExample = () => { + const [visible, setVisible] = useState(false) + return ( + <> + setVisible(!visible)}> + Launch demo modal + + setVisible(false)} + aria-labelledby="LiveDemoExampleLabel" + > + + Modal title + + Woohoo, you're reading this text in a modal! + + setVisible(false)}> + Close + + Save changes + + + + ) +} diff --git a/packages/docs/content/components/modal/examples/ModalOptionalSizesExample.tsx b/packages/docs/content/components/modal/examples/ModalOptionalSizesExample.tsx new file mode 100644 index 00000000..a082c37a --- /dev/null +++ b/packages/docs/content/components/modal/examples/ModalOptionalSizesExample.tsx @@ -0,0 +1,54 @@ +import React, { useState } from 'react' +import { CButton, CModal, CModalBody, CModalHeader, CModalTitle } from '@coreui/react' + +export const ModalOptionalSizesExample = () => { + const [visibleXL, setVisibleXL] = useState(false) + const [visibleLg, setVisibleLg] = useState(false) + const [visibleSm, setVisibleSm] = useState(false) + return ( + <> + setVisibleXL(!visibleXL)}> + Extra large modal + + setVisibleLg(!visibleLg)}> + Large modal + + setVisibleSm(!visibleSm)}> + Small modal + + setVisibleXL(false)} + aria-labelledby="OptionalSizesExample1" + > + + Extra large modal + + ... + + setVisibleLg(false)} + aria-labelledby="OptionalSizesExample2" + > + + Large modal + + ... + + setVisibleSm(false)} + aria-labelledby="OptionalSizesExample3" + > + + Small modal + + ... + + + ) +} diff --git a/packages/docs/content/components/modal/examples/ModalScrollingLongContent2Example.tsx b/packages/docs/content/components/modal/examples/ModalScrollingLongContent2Example.tsx new file mode 100644 index 00000000..0e4d9a95 --- /dev/null +++ b/packages/docs/content/components/modal/examples/ModalScrollingLongContent2Example.tsx @@ -0,0 +1,53 @@ +import React, { useState } from 'react' +import { CButton, CModal, CModalBody, CModalFooter, CModalHeader, CModalTitle } from '@coreui/react' + +export const ModalScrollingLongContent2Example = () => { + const [visible, setVisible] = useState(false) + return ( + <> + setVisible(!visible)}> + Vertically centered scrollable modal + + setVisible(false)} + aria-labelledby="VerticallyCenteredScrollableExample2" + > + + Modal title + + +

+ Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis + in, egestas eget quam. Morbi leo risus, porta ac consectetur ac, vestibulum at eros. +

+

+ Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Vivamus sagittis + lacus vel augue laoreet rutrum faucibus dolor auctor. +

+

+ Aenean lacinia bibendum nulla sed consectetur. Praesent commodo cursus magna, vel + scelerisque nisl consectetur et. Donec sed odio dui. Donec ullamcorper nulla non metus + auctor fringilla. +

+

+ Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis + in, egestas eget quam. Morbi leo risus, porta ac consectetur ac, vestibulum at eros. +

+

+ Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Vivamus sagittis + lacus vel augue laoreet rutrum faucibus dolor auctor. +

+
+ + setVisible(false)}> + Close + + Save changes + +
+ + ) +} diff --git a/packages/docs/content/components/modal/examples/ModalScrollingLongContentExample.tsx b/packages/docs/content/components/modal/examples/ModalScrollingLongContentExample.tsx new file mode 100644 index 00000000..33ab2119 --- /dev/null +++ b/packages/docs/content/components/modal/examples/ModalScrollingLongContentExample.tsx @@ -0,0 +1,108 @@ +import React, { useState } from 'react' +import { CButton, CModal, CModalBody, CModalFooter, CModalHeader, CModalTitle } from '@coreui/react' + +export const ModalScrollingLongContentExample = () => { + const [visible, setVisible] = useState(false) + return ( + <> + setVisible(!visible)}> + Launch demo modal + + setVisible(false)} + aria-labelledby="ScrollingLongContentExampleLabel" + > + + Modal title + + +

+ Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis + in, egestas eget quam. Morbi leo risus, porta ac consectetur ac, vestibulum at eros. +

+

+ Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Vivamus sagittis + lacus vel augue laoreet rutrum faucibus dolor auctor. +

+

+ Aenean lacinia bibendum nulla sed consectetur. Praesent commodo cursus magna, vel + scelerisque nisl consectetur et. Donec sed odio dui. Donec ullamcorper nulla non metus + auctor fringilla. +

+

+ Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis + in, egestas eget quam. Morbi leo risus, porta ac consectetur ac, vestibulum at eros. +

+

+ Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Vivamus sagittis + lacus vel augue laoreet rutrum faucibus dolor auctor. +

+

+ Aenean lacinia bibendum nulla sed consectetur. Praesent commodo cursus magna, vel + scelerisque nisl consectetur et. Donec sed odio dui. Donec ullamcorper nulla non metus + auctor fringilla. +

+

+ Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis + in, egestas eget quam. Morbi leo risus, porta ac consectetur ac, vestibulum at eros. +

+

+ Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Vivamus sagittis + lacus vel augue laoreet rutrum faucibus dolor auctor. +

+

+ Aenean lacinia bibendum nulla sed consectetur. Praesent commodo cursus magna, vel + scelerisque nisl consectetur et. Donec sed odio dui. Donec ullamcorper nulla non metus + auctor fringilla. +

+

+ Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis + in, egestas eget quam. Morbi leo risus, porta ac consectetur ac, vestibulum at eros. +

+

+ Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Vivamus sagittis + lacus vel augue laoreet rutrum faucibus dolor auctor. +

+

+ Aenean lacinia bibendum nulla sed consectetur. Praesent commodo cursus magna, vel + scelerisque nisl consectetur et. Donec sed odio dui. Donec ullamcorper nulla non metus + auctor fringilla. +

+

+ Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis + in, egestas eget quam. Morbi leo risus, porta ac consectetur ac, vestibulum at eros. +

+

+ Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Vivamus sagittis + lacus vel augue laoreet rutrum faucibus dolor auctor. +

+

+ Aenean lacinia bibendum nulla sed consectetur. Praesent commodo cursus magna, vel + scelerisque nisl consectetur et. Donec sed odio dui. Donec ullamcorper nulla non metus + auctor fringilla. +

+

+ Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis + in, egestas eget quam. Morbi leo risus, porta ac consectetur ac, vestibulum at eros. +

+

+ Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Vivamus sagittis + lacus vel augue laoreet rutrum faucibus dolor auctor. +

+

+ Aenean lacinia bibendum nulla sed consectetur. Praesent commodo cursus magna, vel + scelerisque nisl consectetur et. Donec sed odio dui. Donec ullamcorper nulla non metus + auctor fringilla. +

+
+ + setVisible(false)}> + Close + + Save changes + +
+ + ) +} diff --git a/packages/docs/content/components/modal/examples/ModalStaticBackdropExample.tsx b/packages/docs/content/components/modal/examples/ModalStaticBackdropExample.tsx new file mode 100644 index 00000000..859b1d89 --- /dev/null +++ b/packages/docs/content/components/modal/examples/ModalStaticBackdropExample.tsx @@ -0,0 +1,32 @@ +import React, { useState } from 'react' +import { CButton, CModal, CModalBody, CModalFooter, CModalHeader, CModalTitle } from '@coreui/react' + +export const ModalStaticBackdropExample = () => { + const [visible, setVisible] = useState(false) + return ( + <> + setVisible(!visible)}> + Launch static backdrop modal + + setVisible(false)} + aria-labelledby="StaticBackdropExampleLabel" + > + + Modal title + + + I will not close if you click outside me. Don't even try to press escape key. + + + setVisible(false)}> + Close + + Save changes + + + + ) +} diff --git a/packages/docs/content/components/modal/examples/ModalToggleBetweenModalsExample.tsx b/packages/docs/content/components/modal/examples/ModalToggleBetweenModalsExample.tsx new file mode 100644 index 00000000..ba6af0ff --- /dev/null +++ b/packages/docs/content/components/modal/examples/ModalToggleBetweenModalsExample.tsx @@ -0,0 +1,63 @@ +import React, { useState } from 'react' +import { CButton, CModal, CModalBody, CModalFooter, CModalHeader, CModalTitle } from '@coreui/react' + +export const ModalToggleBetweenModalsExample = () => { + const [visible, setVisible] = useState(false) + const [visible2, setVisible2] = useState(false) + return ( + <> + setVisible(!visible)}> + Open first modal + + setVisible(false)} + aria-labelledby="ToggleBetweenModalsExample1" + > + + Modal 1 title + + +

Show a second modal and hide this one with the button below.

+
+ + { + setVisible(false) + setVisible2(true) + }} + > + Open second modal + + +
+ { + setVisible(true) + setVisible2(false) + }} + aria-labelledby="ToggleBetweenModalsExample2" + > + + Modal 2 title + + +

Hide this modal and show the first with the button below.

+
+ + { + setVisible(true) + setVisible2(false) + }} + > + Back to first + + +
+ + ) +} diff --git a/packages/docs/content/components/modal/examples/ModalTooltipsAndPopoversExample.tsx b/packages/docs/content/components/modal/examples/ModalTooltipsAndPopoversExample.tsx new file mode 100644 index 00000000..46d73846 --- /dev/null +++ b/packages/docs/content/components/modal/examples/ModalTooltipsAndPopoversExample.tsx @@ -0,0 +1,61 @@ +import React, { useState } from 'react' +import { + CButton, + CModal, + CModalBody, + CModalFooter, + CModalHeader, + CModalTitle, + CLink, + CPopover, + CTooltip, +} from '@coreui/react' + +export const ModalTooltipsAndPopoversExample = () => { + const [visible, setVisible] = useState(false) + return ( + <> + setVisible(!visible)}> + Launch demo modal + + setVisible(false)} + aria-labelledby="TooltipsAndPopoverExample" + > + + Modal title + + +
Popover in a modal
+

+ This + + button + {' '} + triggers a popover on click. +

+
+
Tooltips in a modal
+

+ + This link + {' '} + and + + that link + {' '} + have tooltips on hover. +

+
+ + setVisible(false)}> + Close + + Save changes + +
+ + ) +} diff --git a/packages/docs/content/components/modal/examples/ModalVerticallyCenteredExample.tsx b/packages/docs/content/components/modal/examples/ModalVerticallyCenteredExample.tsx new file mode 100644 index 00000000..f2f43f4e --- /dev/null +++ b/packages/docs/content/components/modal/examples/ModalVerticallyCenteredExample.tsx @@ -0,0 +1,33 @@ +import React, { useState } from 'react' +import { CButton, CModal, CModalBody, CModalFooter, CModalHeader, CModalTitle } from '@coreui/react' + +export const ModalVerticallyCenteredExample = () => { + const [visible, setVisible] = useState(false) + return ( + <> + setVisible(!visible)}> + Vertically centered modal + + setVisible(false)} + aria-labelledby="VerticallyCenteredExample" + > + + Modal title + + + Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis + in, egestas eget quam. Morbi leo risus, porta ac consectetur ac, vestibulum at eros. + + + setVisible(false)}> + Close + + Save changes + + + + ) +} diff --git a/packages/docs/content/components/modal/examples/ModalVerticallyCenteredScrollableExample.tsx b/packages/docs/content/components/modal/examples/ModalVerticallyCenteredScrollableExample.tsx new file mode 100644 index 00000000..0cc92aea --- /dev/null +++ b/packages/docs/content/components/modal/examples/ModalVerticallyCenteredScrollableExample.tsx @@ -0,0 +1,53 @@ +import React, { useState } from 'react' +import { CButton, CModal, CModalBody, CModalFooter, CModalHeader, CModalTitle } from '@coreui/react' + +export const ModalVerticallyCenteredScrollableExample = () => { + const [visible, setVisible] = useState(false) + return ( + <> + setVisible(!visible)}> + Vertically centered scrollable modal + + setVisible(false)} + aria-labelledby="VerticallyCenteredScrollableExample2" + > + + Modal title + + +

+ Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis + in, egestas eget quam. Morbi leo risus, porta ac consectetur ac, vestibulum at eros. +

+

+ Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Vivamus sagittis + lacus vel augue laoreet rutrum faucibus dolor auctor. +

+

+ Aenean lacinia bibendum nulla sed consectetur. Praesent commodo cursus magna, vel + scelerisque nisl consectetur et. Donec sed odio dui. Donec ullamcorper nulla non metus + auctor fringilla. +

+

+ Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis + in, egestas eget quam. Morbi leo risus, porta ac consectetur ac, vestibulum at eros. +

+

+ Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Vivamus sagittis + lacus vel augue laoreet rutrum faucibus dolor auctor. +

+
+ + setVisible(false)}> + Close + + Save changes + +
+ + ) +} diff --git a/packages/docs/content/components/modal/index.mdx b/packages/docs/content/components/modal/index.mdx new file mode 100644 index 00000000..449ee1ff --- /dev/null +++ b/packages/docs/content/components/modal/index.mdx @@ -0,0 +1,146 @@ +--- +title: React Modal Component +name: Modal +description: React Modal component offers a lightweight, multi-purpose popup to add dialogs to yours. Learn how to customize CoreUI React modal components easily. Multiple examples and tutorial. +route: /components/modal/ +other_frameworks: modal +--- + +## How to use React Modal Component? + +### Static modal component example + +Below is a static react modal component example (meaning its `position` and `display` have been overridden). Included are the modal header, modal body (required for `padding`), and modal footer (optional). We ask that you include react modal headers with dismiss actions whenever possible, or provide another explicit dismiss action. + + +
+
+
+
+
React Modal title
+ +
+
+

React Modal body text goes here.

+
+
+ + +
+
+
+
+
+```jsx + + + React Modal title + + +

React Modal body text goes here.

+
+ + Close + Save changes + +
+``` + +### Live demo + +Toggle a working React modal component demo by clicking the button below. It will slide down and fade in from the top of the page. + + + +### Static backdrop + +If you set a `backdrop` to `static`, your React modal component will behave as though the backdrop is static, meaning it will not close when clicking outside it. Click the button below to try it. + + + +### Scrolling long content + +When modals become too long for the user's viewport or device, they scroll independent of the page itself. Try the demo below to see what we mean. + + + +You can also create a scrollable react modal component that allows scroll the modal body by adding `scrollable` prop. + + + +### Vertically centered + +Add `alignment="center` to `` to vertically center the React modal. + + + + + +### Tooltips and popovers + +`` and `` can be placed within react modals as needed. When modal components are closed, any tooltips and popovers within are also automatically dismissed. + + + +### Toggle between modals + +Toggle between multiple modals with some clever placement of the `visible` props. **Please note multiple modals cannot be opened at the same time** — this method simply toggles between two separate modals. + + + +### Change animation + +The variable `$modal-fade-transform` determines the transform state of React Modal component before the modal fade-in animation, whereas the variable `$modal-show-transform` determines the transform state of Modal component after the modal fade-in animation. + +If you want a zoom-in animation, for example, set `$modal-fade-transform: scale(.8)`. + +### Remove animation + +For modals that simply appear rather than fade into view, set `transition` to `false`. + +```jsx +... +``` + +### Accessibility + +Be sure to add `aria-labelledby="..."`, referencing the modal title, to `` Additionally, you may give a description of your modal dialog with `aria-describedby` on ``. Note that you don’t need to add `role="dialog`, `aria-hidden="true"`, and `aria-modal="true"` since we already add it. + +## Optional sizes + +Modals have three optional sizes, available via modifier classes to be placed on a ``. These sizes kick in at certain breakpoints to avoid horizontal scrollbars on narrower viewports. + + +| Size | Property size | Modal max-width | +| ----------- | ------------- | --------------- | +| Small | `'sm'` | `300px` | +| Default | None | `500px` | +| Large | `'lg'` | `800px` | +| Extra large | `'xl'` | `1140px` | + + + +## Fullscreen Modal + +Another override is the option to pop up a React modal component that covers the user viewport, available via property `fullscrean`. + +| Fullscrean | Availability | +| ---------- | -------------- | +| `true` | Always | +| `'sm'` | Below `576px` | +| `'md'` | Below `768px` | +| `'lg'` | Below `992px` | +| `'xl'` | Below `1200px` | +| `'xxl'` | Below `1400px` | + + + +## API + +Check out the documentation below for a comprehensive guide to all the props you can use with the components mentioned here. + +- [<CModal />](./api/#cmodal) +- [<CModalBody />](./api/#cmodalbody) +- [<CModalFooter />](./api/#cmodalfooter) +- [<CModalHeader />](./api/#cmodalheader) +- [<CModalTitle />](./api/#cmodaltitle) diff --git a/packages/docs/content/components/modal/styling.mdx b/packages/docs/content/components/modal/styling.mdx new file mode 100644 index 00000000..b5efe465 --- /dev/null +++ b/packages/docs/content/components/modal/styling.mdx @@ -0,0 +1,45 @@ +--- +title: React Modal Component Styling +name: Modal Styling +description: Learn how to customize the React Modal component with CSS classes, variables, and SASS for flexible styling and seamless integration into your design. +route: /components/modal/ +--- + +{/* ### CSS class names + +React Modal comes with built-in class names that make styling super simple. Here’s a quick rundown of what you can use: + + */} + +### CSS variables + +React Modal supports CSS variables for easy customization. These variables are set via SASS but allow direct overrides in your stylesheets or inline styles. + + + + + +#### How to use CSS variables + +```jsx +const customVars = { + '--cui-modal-color': '#555', + '--cui-modal-bg': '#efefef', +} + +return {/* Modal content */} +``` + +### SASS variables + + + +### SASS loops + +[Responsive fullscreen modals](#fullscreen-modal) are generated via the `$breakpoints` map and a loop in `scss/_modal.scss`. + + diff --git a/packages/docs/content/components/navbar.mdx b/packages/docs/content/components/navbar.mdx deleted file mode 100644 index 3cf2d2cf..00000000 --- a/packages/docs/content/components/navbar.mdx +++ /dev/null @@ -1,1475 +0,0 @@ ---- -title: React Navbar Component -name: Navbar -description: Documentation and examples for the React navbar powerful, responsive navigation header component. Includes support for branding, links, dropdowns, and more. -menu: Components -route: /components/navbar -other_frameworks: navbar ---- - -import { useState } from 'react' -import { - CButton, - CContainer, - CCloseButton, - CCollapse, - CDropdown, - CDropdownDivider, - CDropdownHeader, - CDropdownItem, - CDropdownItemPlain, - CDropdownMenu, - CDropdownToggle, - CForm, - CFormInput, - CInputGroup, - CInputGroupText, - CNav, - CNavItem, - CNavLink, - CNavbar, - CNavbarBrand, - CNavbarNav, - CNavbarText, - CNavbarToggler, - COffcanvas, - COffcanvasBody, - COffcanvasHeader, - COffcanvasTitle, -} from '@coreui/react/src/index' - -import CoreUISignetImg from './../assets/images/brand/coreui-signet.svg' - -## Supported content - -`` come with built-in support for a handful of sub-components. Choose from the following as needed: - -- `` for your company, product, or project name. -- `` for a full-height and lightweight navigation (including support for dropdowns). -- `` for use with our collapse plugin and other [navigation toggling](#responsive-behaviors) behaviors. -- Flex and spacing utilities for any form controls and actions. -- `` for adding vertically centered strings of text. -- `` for grouping and hiding navbar contents by a parent breakpoint. - -Here's an example of all the sub-components included in a responsive light-themed navbar that automatically collapses at the `lg` (large) breakpoint. - -## Basic usage - -export const BasicUsageExample = () => { - const [visible, setVisible] = useState(false) - return ( - <> - - - Navbar - setVisible(!visible)} /> - - - - - Home - - - - Link - - - Dropdown button - - Action - Another action - - Something else here - - - - - Disabled - - - - - - - Search - - - - - - - ) -} - - - - - -```jsx -const [visible, setVisible] = useState(false) -return ( - <> - - - Navbar - setVisible(!visible)} /> - - - - - Home - - - - Link - - - Dropdown button - - Action - Another action - - Something else here - - - - - Disabled - - - - - - - Search - - - - - - -) -``` - -### Brand - -The `` can be applied to most elements, but an anchor works best, as some elements might require utility classes or custom styles. - -```jsx preview - - - Navbar - - -
- - - Navbar - - -``` - -Adding images to the `` will likely always require custom styles or utilities to properly size. Here are some examples to demonstrate. - -```jsx preview - - - - - - - -``` - -```jsx preview - - - - CoreUI - - - -``` - -### Nav - -`` navigation is based on ``. **Navigation in navbars will also grow to occupy as much horizontal space as possible** to keep your navbar contents securely aligned. - -export const NavExample = () => { - const [visible, setVisible] = useState(false) - return ( - <> - - - Navbar - setVisible(!visible)} - /> - - - - - Home - - - - Features - - - Pricing - - - - Disabled - - - - - - - - ) -} - - - - - -```jsx -const [visible, setVisible] = useState(false) -return ( - <> - - - Navbar - setVisible(!visible)} - /> - - - - - Home - - - - Features - - - Pricing - - - - Disabled - - - - - - - -) -``` - -And because we use classes for our navs, you can avoid the list-based approach entirely if you like. - -export const NavExample2 = () => { - const [visible, setVisible] = useState(false) - return ( - <> - - - Navbar - setVisible(!visible)} - /> - - - - Home - - Features - Pricing - - Disabled - - - - - - - ) -} - - - - - -```jsx -const [visible, setVisible] = useState(false) -return ( - <> - - - Navbar - setVisible(!visible)} - /> - - - - Home - - Features - Pricing - - Disabled - - - - - - -) -``` - -You can also use dropdowns in your navbar. Please note that `` component requires `variant="nav-item"`. - -export const NavDropdownExample = () => { - const [visible, setVisible] = useState(false) - return ( - <> - - - Navbar - setVisible(!visible)} - /> - - - - - Home - - - - Features - - - Pricing - - - Dropdown link - - Action - Another action - - Something else here - - - - - - - - ) -} - - - - - -```jsx -const [visible, setVisible] = useState(false) -return ( - <> - - - Navbar - setVisible(!visible)} - /> - - - - - Home - - - - Features - - - Pricing - - - Dropdown link - - Action - Another action - - Something else here - - - - - - - -) -``` - -### Forms - -Place various form controls and components within a navbar: - -```jsx preview - - - - - - Search - - - - -``` - -Immediate child elements of `` use flex layout and will default to `justify-content: space-between`. Use additional [flex utilities](https://coreui.io/docs/utilities/flex/) as needed to adjust this behavior. - -```jsx preview - - - Navbar - - - - Search - - - - -``` - -Input groups work, too. If your navbar is an entire form, or mostly a form, you can use the `` element as the container and save some HTML. - -```jsx preview - - - - @ - - - - -``` - -Various buttons are supported as part of these navbar forms, too. This is also a great reminder that vertical alignment utilities can be used to align different sized elements. - -```jsx preview - - - - Main button - - - Smaller button - - - -``` - -### Text - -Navbars may contain bits of text with the help of ``. This class adjusts vertical alignment and horizontal spacing for strings of text. - -```jsx preview - - - Navbar text with an inline element - - -``` - -## Color schemes - -Theming the navbar has never been easier thanks to the combination of theming classes and `background-color` utilities. Set `colorScheme="light"` for use with light background colors, or `colorScheme="dark"` for dark background colors. Then, customize with `.bg-*` utilities. - -export const ColorSchemesExample = () => { - const [visible, setVisible] = useState(false) - return ( - <> - - - Navbar - setVisible(!visible)} - /> - - - - - Home - - - - Link - - - Dropdown button - - Action - Another action - - Something else here - - - - - Disabled - - - - - - - Search - - - - - -
- - - Navbar - setVisible(!visible)} - /> - - - - - Home - - - - Link - - - Dropdown button - - Action - Another action - - Something else here - - - - - Disabled - - - - - - - Search - - - - - -
- - - Navbar - setVisible(!visible)} - /> - - - - - Home - - - - Link - - - Dropdown button - - Action - Another action - - Something else here - - - - - Disabled - - - - - - - Search - - - - - - - ) -} - - - - - -```jsx -const [visible, setVisible] = useState(false) -return ( - <> - - - Navbar - setVisible(!visible)} - /> - - - - - Home - - - - Link - - - Dropdown button - - Action - Another action - - Something else here - - - - - Disabled - - - - - - - Search - - - - - - - - Navbar - setVisible(!visible)} - /> - - - - - Home - - - - Link - - - Dropdown button - - Action - Another action - - Something else here - - - - - Disabled - - - - - - - Search - - - - - - - - Navbar - setVisible(!visible)} - /> - - - - - Home - - - - Link - - - Dropdown button - - Action - Another action - - Something else here - - - - - Disabled - - - - - - - Search - - - - - - -) -``` - -## Containers - -Although it's not required, you can wrap a `` in a `` to center it on a page–though note that an inner container is still required. Or you can add a container inside the `` to only center the contents of a [fixed or static top navbar](#placement). - -```jsx preview - - - - Navbar - - - -``` - -Use any of the responsive containers to change how wide the content in your navbar is presented. - -```jsx preview - - - Navbar - - -``` - -## Placement - -Use our `placement` properly to place navbars in non-static positions. Choose from fixed to the top, fixed to the bottom, or stickied to the top (scrolls with the page until it reaches the top, then stays there). Fixed navbars use `position: fixed`, meaning they're pulled from the normal flow of the DOM and may require custom CSS (e.g., `padding-top` on the ``) to prevent overlap with other elements. - -Also note that **`.sticky-top` uses `position: sticky`, which [isn't fully supported in every browser](https://caniuse.com/css-sticky)**. - -```jsx preview - - - Default - - -``` - -```jsx preview - - - Fixed top - - -``` - -```jsx preview - - - Fixed bottom - - -``` - -```jsx preview - - - Sticky top - - -``` - -## Responsive behaviors - -Navbars can use ``, ``, and `expand="{sm|md|lg|xl|xxl}"` property to determine when their content collapses behind a button. In combination with other utilities, you can easily choose when to show or hide particular elements. - -For navbars that never collapse, add the `expand` boolean property on the ``. For navbars that always collapse, don't add any property. - -### Toggler - -Navbar togglers are left-aligned by default, but should they follow a sibling element like a ``, they'll automatically be aligned to the far right. Reversing your markup will reverse the placement of the toggler. Below are examples of different toggle styles. - -With no `` shown at the smallest breakpoint: - -export const ResponsiveBehaviorsExample = () => { - const [visible, setVisible] = useState(false) - return ( - <> - - - setVisible(!visible)} - /> - - Hidden brand - - - - Home - - - - Link - - - - Disabled - - - - - - - Search - - - - - - - ) -} - - - - - -```jsx -const [visible, setVisible] = useState(false) -return ( - <> - - - setVisible(!visible)} - /> - - Hidden brand - - - - Home - - - - Link - - - - Disabled - - - - - - - Search - - - - - - -) -``` - -With a brand name shown on the left and toggler on the right: - -export const ResponsiveBehaviorsExample2 = () => { - const [visible, setVisible] = useState(false) - return ( - <> - - - Navbar - setVisible(!visible)} - /> - - - - - Home - - - - Link - - - - Disabled - - - - - - - Search - - - - - - - ) -} - - - - - -```jsx -const [visible, setVisible] = useState(false) -return ( - <> - - - Navbar - setVisible(!visible)} - /> - - - - - Home - - - - Link - - - - Disabled - - - - - - - Search - - - - - - -) -``` - -With a toggler on the left and brand name on the right: - -export const ResponsiveBehaviorsExample3 = () => { - const [visible, setVisible] = useState(false) - return ( - <> - - - setVisible(!visible)} - /> - Navbar - - - - - Home - - - - Link - - - - Disabled - - - - - - - Search - - - - - - - ) -} - - - - - -```jsx -const [visible, setVisible] = useState(false) -return ( - <> - - - setVisible(!visible)} - /> - Navbar - - - - - Home - - - - Link - - - - Disabled - - - - - - - Search - - - - - - -) -``` - -### External content - -Sometimes you want to use the collapse plugin to trigger a container element for content that structurally sits outside of the ``. - -export const ExternalContentExample = () => { - const [visible, setVisible] = useState(false) - return ( - <> - -
-
Collapsed content
- Toggleable via the navbar brand. -
-
- - - setVisible(!visible)} - /> - - - - ) -} - - - - - -```jsx -const [visible, setVisible] = useState(false) -return ( - <> - -
-
Collapsed content
- Toggleable via the navbar brand. -
-
- - - setVisible(!visible)} - /> - - - -) -``` - -### Offcanvas - -Transform your expanding and collapsing navbar into an offcanvas drawer with the offcanvas plugin. We extend both the offcanvas default styles and use our `expand="*"` prop to create a dynamic and flexible navigation sidebar. - -In the example below, to create an offcanvas navbar that is always collapsed across all breakpoints, omit the `expand="*"` prop entirely. - -export const OffcanvasExample = () => { - const [visible, setVisible] = useState(false) - return ( - - - Offcanvas navbar - setVisible(!visible)} - /> - setVisible(false)}> - - Offcanvas - setVisible(false)} /> - - - - - - Home - - - - Link - - - Dropdown button - - Action - Another action - - Something else here - - - - - Disabled - - - - - - - Search - - - - - - - ) -} - - - - - -```jsx -const [visible, setVisible] = useState(false) -return ( - - - Offcanvas navbar - setVisible(!visible)} - /> - setVisible(false)}> - - Offcanvas - setVisible(false)} /> - - - - - - Home - - - - Link - - - Dropdown button - - Action - Another action - - Something else here - - - - - Disabled - - - - - - - Search - - - - - - -) -``` - -To create an offcanvas navbar that expands into a normal navbar at a specific breakpoint like `xxl`, use `expand="xxl"` property. - -export const OffcanvasExample2 = () => { - const [visible, setVisible] = useState(false) - return ( - - - Offcanvas navbar - setVisible(!visible)} - /> - setVisible(false)}> - - Offcanvas - setVisible(false)} /> - - - - - - Home - - - - Link - - - Dropdown button - - Action - Another action - - Something else here - - - - - Disabled - - - - - - - Search - - - - - - - ) -} - - - - - -```jsx -const [visible, setVisible] = useState(false) -return ( - - Offcanvas navbar - - setVisible(!visible)} - /> - setVisible(false)}> - - Offcanvas - setVisible(false)} /> - - - - - - Home - - - - Link - - - Dropdown button - - Action - Another action - - Something else here - - - - - Disabled - - - - - - - Search - - - - - - -) -``` - -## Customizing - -### CSS variables - -React navbars use local CSS variables on `.navbar` for enhanced real-time customization. Values for the CSS variables are set via Sass, so Sass customization is still supported, too. - - - -Some additional CSS variables are also present on `.navbar-nav`: - - - -Customization through CSS variables can be seen on the `.navbar-dark` class where we override specific values without adding duplicate CSS selectors. - - - -#### How to use CSS variables - -```jsx -const vars = { - '--my-css-var': 10, - '--my-another-css-var': "red" -} -return ... -``` - -### SASS variables - -Variables for all navbars: - - - -Variables for the [dark navbar](#color-schemes): - - - -### SASS loops - -[Responsive navbar expand/collapse classes](#responsive-behaviors) (e.g., `.navbar-expand-lg`) are combined with the `$breakpoints` map and generated through a loop in `scss/_navbar.scss`. - - - -## API - -### CNavbar - -`markdown:CNavbar.api.mdx` - -### CNavbarBrand - -`markdown:CNavbarBrand.api.mdx` - -### CNavbarNav - -`markdown:CNavbarNav.api.mdx` - -### CNavbarText - -`markdown:CNavbarText.api.mdx` - -### CNavbarToggler - -`markdown:CNavbarToggler.api.mdx` diff --git a/packages/docs/content/components/navbar/api.mdx b/packages/docs/content/components/navbar/api.mdx new file mode 100644 index 00000000..5170c089 --- /dev/null +++ b/packages/docs/content/components/navbar/api.mdx @@ -0,0 +1,32 @@ +--- +title: React Navbar Component API +name: Navbar API +description: Explore the API reference for the React Navbar component and discover how to effectively utilize its props for customization. +route: /components/navbar/ +--- + +import CNavbarAPI from '../../api/CNavbar.api.mdx' +import CNavbarBrandAPI from '../../api/CNavbarBrand.api.mdx' +import CNavbarNavAPI from '../../api/CNavbarNav.api.mdx' +import CNavbarTextAPI from '../../api/CNavbarText.api.mdx' +import CNavbarTogglerAPI from '../../api/CNavbarToggler.api.mdx' + +## CNavbar + + + +## CNavbarBrand + + + +## CNavbarNav + + + +## CNavbarText + + + +## CNavbarToggler + + diff --git a/packages/docs/content/components/navbar/examples/NavbarBrand2Example.tsx b/packages/docs/content/components/navbar/examples/NavbarBrand2Example.tsx new file mode 100644 index 00000000..68b914e9 --- /dev/null +++ b/packages/docs/content/components/navbar/examples/NavbarBrand2Example.tsx @@ -0,0 +1,16 @@ +import React from 'react' +import { CContainer, CNavbar, CNavbarBrand } from '@coreui/react' + +import CoreUISignetImg from './../../../assets/images/brand/coreui-signet.svg' + +export const NavbarBrand2Example = () => { + return ( + + + + + + + + ) +} diff --git a/packages/docs/content/components/navbar/examples/NavbarBrand3Example.tsx b/packages/docs/content/components/navbar/examples/NavbarBrand3Example.tsx new file mode 100644 index 00000000..6b362f56 --- /dev/null +++ b/packages/docs/content/components/navbar/examples/NavbarBrand3Example.tsx @@ -0,0 +1,23 @@ +import React from 'react' +import { CContainer, CNavbar, CNavbarBrand } from '@coreui/react' + +import CoreUISignetImg from './../../../assets/images/brand/coreui-signet.svg' + +export const NavbarBrand3Example = () => { + return ( + + + + {' '} + CoreUI + + + + ) +} diff --git a/packages/docs/content/components/navbar/examples/NavbarBrandExample.tsx b/packages/docs/content/components/navbar/examples/NavbarBrandExample.tsx new file mode 100644 index 00000000..a351cf18 --- /dev/null +++ b/packages/docs/content/components/navbar/examples/NavbarBrandExample.tsx @@ -0,0 +1,22 @@ +import React from 'react' +import { CContainer, CNavbar, CNavbarBrand } from '@coreui/react' + +export const NavbarBrandExample = () => { + return ( + <> + {/* As a link */} + + + Navbar + + + + {/* As a heading */} + + + Navbar + + + + ) +} diff --git a/packages/docs/content/components/navbar/examples/NavbarColorSchemesExample.tsx b/packages/docs/content/components/navbar/examples/NavbarColorSchemesExample.tsx new file mode 100644 index 00000000..6c53aca8 --- /dev/null +++ b/packages/docs/content/components/navbar/examples/NavbarColorSchemesExample.tsx @@ -0,0 +1,155 @@ +import React, { useState } from 'react' +import { + CButton, + CCollapse, + CContainer, + CDropdown, + CDropdownDivider, + CDropdownItem, + CDropdownMenu, + CDropdownToggle, + CForm, + CFormInput, + CNavbar, + CNavbarBrand, + CNavbarNav, + CNavbarToggler, + CNavItem, + CNavLink, +} from '@coreui/react' + +export const NavbarColorSchemesExample = () => { + const [visible, setVisible] = useState(false) + return ( + <> + + + Navbar + setVisible(!visible)} + /> + + + + + Home + + + + Link + + + Dropdown button + + Action + Another action + + Something else here + + + + + Disabled + + + + + + + Search + + + + + +
+ + + Navbar + setVisible(!visible)} + /> + + + + + Home + + + + Link + + + Dropdown button + + Action + Another action + + Something else here + + + + + Disabled + + + + + + + Search + + + + + +
+ + + Navbar + setVisible(!visible)} + /> + + + + + Home + + + + Link + + + Dropdown button + + Action + Another action + + Something else here + + + + + Disabled + + + + + + + Search + + + + + + + ) +} diff --git a/packages/docs/content/components/navbar/examples/NavbarContainers2Example.tsx b/packages/docs/content/components/navbar/examples/NavbarContainers2Example.tsx new file mode 100644 index 00000000..ed6e3978 --- /dev/null +++ b/packages/docs/content/components/navbar/examples/NavbarContainers2Example.tsx @@ -0,0 +1,12 @@ +import React from 'react' +import { CContainer, CNavbar, CNavbarBrand } from '@coreui/react' + +export const NavbarContainers2Example = () => { + return ( + + + Navbar + + + ) +} diff --git a/packages/docs/content/components/navbar/examples/NavbarContainersExample.tsx b/packages/docs/content/components/navbar/examples/NavbarContainersExample.tsx new file mode 100644 index 00000000..dbe22b98 --- /dev/null +++ b/packages/docs/content/components/navbar/examples/NavbarContainersExample.tsx @@ -0,0 +1,14 @@ +import React from 'react' +import { CContainer, CNavbar, CNavbarBrand } from '@coreui/react' + +export const NavbarContainersExample = () => { + return ( + + + + Navbar + + + + ) +} diff --git a/packages/docs/content/components/navbar/examples/NavbarExample.tsx b/packages/docs/content/components/navbar/examples/NavbarExample.tsx new file mode 100644 index 00000000..076b00d9 --- /dev/null +++ b/packages/docs/content/components/navbar/examples/NavbarExample.tsx @@ -0,0 +1,63 @@ +import React, { useState } from 'react' +import { + CButton, + CCollapse, + CContainer, + CDropdown, + CDropdownDivider, + CDropdownItem, + CDropdownMenu, + CDropdownToggle, + CForm, + CFormInput, + CNavbar, + CNavbarBrand, + CNavbarNav, + CNavbarToggler, + CNavItem, + CNavLink, +} from '@coreui/react' + +export const NavbarExample = () => { + const [visible, setVisible] = useState(false) + return ( + + + Navbar + setVisible(!visible)} /> + + + + + Home + + + + Link + + + Dropdown button + + Action + Another action + + Something else here + + + + + Disabled + + + + + + + Search + + + + + + ) +} diff --git a/packages/docs/content/components/navbar/examples/NavbarForms2Example.tsx b/packages/docs/content/components/navbar/examples/NavbarForms2Example.tsx new file mode 100644 index 00000000..727ff2af --- /dev/null +++ b/packages/docs/content/components/navbar/examples/NavbarForms2Example.tsx @@ -0,0 +1,18 @@ +import React from 'react' +import { CButton, CContainer, CForm, CFormInput, CNavbar, CNavbarBrand } from '@coreui/react' + +export const NavbarForms2Example = () => { + return ( + + + Navbar + + + + Search + + + + + ) +} diff --git a/packages/docs/content/components/navbar/examples/NavbarForms3Example.tsx b/packages/docs/content/components/navbar/examples/NavbarForms3Example.tsx new file mode 100644 index 00000000..55bbf35f --- /dev/null +++ b/packages/docs/content/components/navbar/examples/NavbarForms3Example.tsx @@ -0,0 +1,15 @@ +import React from 'react' +import { CForm, CFormInput, CInputGroup, CInputGroupText, CNavbar } from '@coreui/react' + +export const NavbarForms3Example = () => { + return ( + + + + @ + + + + + ) +} diff --git a/packages/docs/content/components/navbar/examples/NavbarForms4Example.tsx b/packages/docs/content/components/navbar/examples/NavbarForms4Example.tsx new file mode 100644 index 00000000..cf58e561 --- /dev/null +++ b/packages/docs/content/components/navbar/examples/NavbarForms4Example.tsx @@ -0,0 +1,17 @@ +import React from 'react' +import { CButton, CForm, CNavbar } from '@coreui/react' + +export const NavbarForms4Example = () => { + return ( + + + + Main button + + + Smaller button + + + + ) +} diff --git a/packages/docs/content/components/navbar/examples/NavbarFormsExample.tsx b/packages/docs/content/components/navbar/examples/NavbarFormsExample.tsx new file mode 100644 index 00000000..2b1e28c6 --- /dev/null +++ b/packages/docs/content/components/navbar/examples/NavbarFormsExample.tsx @@ -0,0 +1,17 @@ +import React from 'react' +import { CButton, CContainer, CForm, CFormInput, CNavbar } from '@coreui/react' + +export const NavbarFormsExample = () => { + return ( + + + + + + Search + + + + + ) +} diff --git a/packages/docs/content/components/navbar/examples/NavbarNav2Example.tsx b/packages/docs/content/components/navbar/examples/NavbarNav2Example.tsx new file mode 100644 index 00000000..55711a87 --- /dev/null +++ b/packages/docs/content/components/navbar/examples/NavbarNav2Example.tsx @@ -0,0 +1,40 @@ +import React, { useState } from 'react' +import { + CCollapse, + CContainer, + CNavbar, + CNavbarBrand, + CNavbarNav, + CNavbarToggler, + CNavLink, +} from '@coreui/react' + +export const NavbarNav2Example = () => { + const [visible, setVisible] = useState(false) + return ( + <> + + + Navbar + setVisible(!visible)} + /> + + + + Home + + Features + Pricing + + Disabled + + + + + + + ) +} diff --git a/packages/docs/content/components/navbar/examples/NavbarNav3Example.tsx b/packages/docs/content/components/navbar/examples/NavbarNav3Example.tsx new file mode 100644 index 00000000..680917b9 --- /dev/null +++ b/packages/docs/content/components/navbar/examples/NavbarNav3Example.tsx @@ -0,0 +1,58 @@ +import React, { useState } from 'react' +import { + CCollapse, + CContainer, + CDropdown, + CDropdownDivider, + CDropdownItem, + CDropdownMenu, + CDropdownToggle, + CNavbar, + CNavbarBrand, + CNavbarNav, + CNavbarToggler, + CNavItem, + CNavLink, +} from '@coreui/react' + +export const NavbarNav3Example = () => { + const [visible, setVisible] = useState(false) + return ( + <> + + + Navbar + setVisible(!visible)} + /> + + + + + Home + + + + Features + + + Pricing + + + Dropdown link + + Action + Another action + + Something else here + + + + + + + + ) +} diff --git a/packages/docs/content/components/navbar/examples/NavbarNavExample.tsx b/packages/docs/content/components/navbar/examples/NavbarNavExample.tsx new file mode 100644 index 00000000..2fecb2ae --- /dev/null +++ b/packages/docs/content/components/navbar/examples/NavbarNavExample.tsx @@ -0,0 +1,49 @@ +import React, { useState } from 'react' +import { + CCollapse, + CContainer, + CNavbar, + CNavbarBrand, + CNavbarNav, + CNavbarToggler, + CNavItem, + CNavLink, +} from '@coreui/react' + +export const NavbarNavExample = () => { + const [visible, setVisible] = useState(false) + return ( + <> + + + Navbar + setVisible(!visible)} + /> + + + + + Home + + + + Features + + + Pricing + + + + Disabled + + + + + + + + ) +} diff --git a/packages/docs/content/components/navbar/examples/NavbarPlacementExample.tsx b/packages/docs/content/components/navbar/examples/NavbarPlacementExample.tsx new file mode 100644 index 00000000..7c40977e --- /dev/null +++ b/packages/docs/content/components/navbar/examples/NavbarPlacementExample.tsx @@ -0,0 +1,12 @@ +import React from 'react' +import { CContainer, CNavbar, CNavbarBrand } from '@coreui/react' + +export const NavbarPlacementExample = () => { + return ( + + + Default + + + ) +} diff --git a/packages/docs/content/components/navbar/examples/NavbarPlacementFixedBottomExample.tsx b/packages/docs/content/components/navbar/examples/NavbarPlacementFixedBottomExample.tsx new file mode 100644 index 00000000..a7d302f1 --- /dev/null +++ b/packages/docs/content/components/navbar/examples/NavbarPlacementFixedBottomExample.tsx @@ -0,0 +1,12 @@ +import React from 'react' +import { CContainer, CNavbar, CNavbarBrand } from '@coreui/react' + +export const NavbarPlacementFixedBottomExample = () => { + return ( + + + Fixed bottom + + + ) +} diff --git a/packages/docs/content/components/navbar/examples/NavbarPlacementFixedTopExample.tsx b/packages/docs/content/components/navbar/examples/NavbarPlacementFixedTopExample.tsx new file mode 100644 index 00000000..38ad1b61 --- /dev/null +++ b/packages/docs/content/components/navbar/examples/NavbarPlacementFixedTopExample.tsx @@ -0,0 +1,12 @@ +import React from 'react' +import { CContainer, CNavbar, CNavbarBrand } from '@coreui/react' + +export const NavbarPlacementFixedTopExample = () => { + return ( + + + Fixed top + + + ) +} diff --git a/packages/docs/content/components/navbar/examples/NavbarPlacementStickyTopExample.tsx b/packages/docs/content/components/navbar/examples/NavbarPlacementStickyTopExample.tsx new file mode 100644 index 00000000..470ac1a2 --- /dev/null +++ b/packages/docs/content/components/navbar/examples/NavbarPlacementStickyTopExample.tsx @@ -0,0 +1,12 @@ +import React from 'react' +import { CContainer, CNavbar, CNavbarBrand } from '@coreui/react' + +export const NavbarPlacementStickyTopExample = () => { + return ( + + + Sticky top + + + ) +} diff --git a/packages/docs/content/components/navbar/examples/NavbarResponsiveExternalContentExample.tsx b/packages/docs/content/components/navbar/examples/NavbarResponsiveExternalContentExample.tsx new file mode 100644 index 00000000..98e6b7eb --- /dev/null +++ b/packages/docs/content/components/navbar/examples/NavbarResponsiveExternalContentExample.tsx @@ -0,0 +1,25 @@ +import React, { useState } from 'react' +import { CCollapse, CContainer, CNavbar, CNavbarToggler } from '@coreui/react' + +export const NavbarResponsiveExternalContentExample = () => { + const [visible, setVisible] = useState(false) + return ( + <> + +
+
Collapsed content
+ Toggleable via the navbar brand. +
+
+ + + setVisible(!visible)} + /> + + + + ) +} diff --git a/packages/docs/content/components/navbar/examples/NavbarResponsiveOffcanvas2Example.tsx b/packages/docs/content/components/navbar/examples/NavbarResponsiveOffcanvas2Example.tsx new file mode 100644 index 00000000..89300d73 --- /dev/null +++ b/packages/docs/content/components/navbar/examples/NavbarResponsiveOffcanvas2Example.tsx @@ -0,0 +1,83 @@ +import React, { useState } from 'react' +import { + CButton, + CCloseButton, + CContainer, + CDropdown, + CDropdownItem, + CDropdownDivider, + CDropdownMenu, + CDropdownToggle, + CForm, + CFormInput, + CNavbar, + CNavbarBrand, + CNavbarNav, + CNavbarToggler, + CNavItem, + CNavLink, + COffcanvas, + COffcanvasBody, + COffcanvasHeader, + COffcanvasTitle, +} from '@coreui/react' + +export const NavbarResponsiveOffcanvas2Example = () => { + const [visible, setVisible] = useState(false) + return ( + + + Offcanvas navbar + setVisible(!visible)} + /> + setVisible(false)} + > + + Offcanvas + setVisible(false)} /> + + + + + + Home + + + + Link + + + Dropdown button + + Action + Another action + + Something else here + + + + + Disabled + + + + + + + Search + + + + + + + ) +} diff --git a/packages/docs/content/components/navbar/examples/NavbarResponsiveOffcanvasExample.tsx b/packages/docs/content/components/navbar/examples/NavbarResponsiveOffcanvasExample.tsx new file mode 100644 index 00000000..5017ef5b --- /dev/null +++ b/packages/docs/content/components/navbar/examples/NavbarResponsiveOffcanvasExample.tsx @@ -0,0 +1,83 @@ +import React, { useState } from 'react' +import { + CButton, + CCloseButton, + CContainer, + CDropdown, + CDropdownItem, + CDropdownDivider, + CDropdownMenu, + CDropdownToggle, + CForm, + CFormInput, + CNavbar, + CNavbarBrand, + CNavbarNav, + CNavbarToggler, + CNavItem, + CNavLink, + COffcanvas, + COffcanvasBody, + COffcanvasHeader, + COffcanvasTitle, +} from '@coreui/react' + +export const NavbarResponsiveOffcanvasExample = () => { + const [visible, setVisible] = useState(false) + return ( + + + Offcanvas navbar + setVisible(!visible)} + /> + setVisible(false)} + > + + Offcanvas + setVisible(false)} /> + + + + + + Home + + + + Link + + + Dropdown button + + Action + Another action + + Something else here + + + + + Disabled + + + + + + + Search + + + + + + + ) +} diff --git a/packages/docs/content/components/navbar/examples/NavbarResponsiveToggler2Example.tsx b/packages/docs/content/components/navbar/examples/NavbarResponsiveToggler2Example.tsx new file mode 100644 index 00000000..21d7c752 --- /dev/null +++ b/packages/docs/content/components/navbar/examples/NavbarResponsiveToggler2Example.tsx @@ -0,0 +1,55 @@ +import React, { useState } from 'react' +import { + CButton, + CCollapse, + CContainer, + CForm, + CFormInput, + CNavbar, + CNavbarBrand, + CNavbarNav, + CNavbarToggler, + CNavItem, + CNavLink, +} from '@coreui/react' + +export const NavbarResponsiveToggler2Example = () => { + const [visible, setVisible] = useState(false) + return ( + <> + + + Navbar + setVisible(!visible)} + /> + + + + + Home + + + + Link + + + + Disabled + + + + + + + Search + + + + + + + ) +} diff --git a/packages/docs/content/components/navbar/examples/NavbarResponsiveToggler3Example.tsx b/packages/docs/content/components/navbar/examples/NavbarResponsiveToggler3Example.tsx new file mode 100644 index 00000000..df353538 --- /dev/null +++ b/packages/docs/content/components/navbar/examples/NavbarResponsiveToggler3Example.tsx @@ -0,0 +1,55 @@ +import React, { useState } from 'react' +import { + CButton, + CCollapse, + CContainer, + CForm, + CFormInput, + CNavbar, + CNavbarBrand, + CNavbarNav, + CNavbarToggler, + CNavItem, + CNavLink, +} from '@coreui/react' + +export const NavbarResponsiveToggler3Example = () => { + const [visible, setVisible] = useState(false) + return ( + <> + + + setVisible(!visible)} + /> + Navbar + + + + + Home + + + + Link + + + + Disabled + + + + + + + Search + + + + + + + ) +} diff --git a/packages/docs/content/components/navbar/examples/NavbarResponsiveTogglerExample.tsx b/packages/docs/content/components/navbar/examples/NavbarResponsiveTogglerExample.tsx new file mode 100644 index 00000000..21abfd2a --- /dev/null +++ b/packages/docs/content/components/navbar/examples/NavbarResponsiveTogglerExample.tsx @@ -0,0 +1,55 @@ +import React, { useState } from 'react' +import { + CButton, + CCollapse, + CContainer, + CForm, + CFormInput, + CNavbar, + CNavbarBrand, + CNavbarNav, + CNavbarToggler, + CNavItem, + CNavLink, +} from '@coreui/react' + +export const NavbarResponsiveTogglerExample = () => { + const [visible, setVisible] = useState(false) + return ( + <> + + + setVisible(!visible)} + /> + + Hidden brand + + + + Home + + + + Link + + + + Disabled + + + + + + + Search + + + + + + + ) +} diff --git a/packages/docs/content/components/navbar/examples/NavbarText.tsx b/packages/docs/content/components/navbar/examples/NavbarText.tsx new file mode 100644 index 00000000..b015c47a --- /dev/null +++ b/packages/docs/content/components/navbar/examples/NavbarText.tsx @@ -0,0 +1,12 @@ +import React from 'react' +import { CContainer, CNavbar, CNavbarText } from '@coreui/react' + +export const NavbarText = () => { + return ( + + + Navbar text with an inline element + + + ) +} diff --git a/packages/docs/content/components/navbar/index.mdx b/packages/docs/content/components/navbar/index.mdx new file mode 100644 index 00000000..ec5b2792 --- /dev/null +++ b/packages/docs/content/components/navbar/index.mdx @@ -0,0 +1,187 @@ +--- +title: React Navbar Component +name: Navbar +description: Documentation and examples for the React navbar powerful, responsive navigation header component. Includes support for branding, links, dropdowns, and more. +route: /components/navbar/ +other_frameworks: navbar +--- + +import { useState } from 'react' +import { + CButton, + CContainer, + CCloseButton, + CCollapse, + CDropdown, + CDropdownDivider, + CDropdownHeader, + CDropdownItem, + CDropdownItemPlain, + CDropdownMenu, + CDropdownToggle, + CForm, + CFormInput, + CInputGroup, + CInputGroupText, + CNav, + CNavItem, + CNavLink, + CNavbar, + CNavbarBrand, + CNavbarNav, + CNavbarText, + CNavbarToggler, + COffcanvas, + COffcanvasBody, + COffcanvasHeader, + COffcanvasTitle, +} from '@coreui/react/src/index' + +import CoreUISignetImg from './../../assets/images/brand/coreui-signet.svg' + +## Supported content + +`` come with built-in support for a handful of sub-components. Choose from the following as needed: + +- `` for your company, product, or project name. +- `` for a full-height and lightweight navigation (including support for dropdowns). +- `` for use with our collapse plugin and other [navigation toggling](#responsive-behaviors) behaviors. +- Flex and spacing utilities for any form controls and actions. +- `` for adding vertically centered strings of text. +- `` for grouping and hiding navbar contents by a parent breakpoint. + +Here's an example of all the sub-components included in a responsive light-themed navbar that automatically collapses at the `lg` (large) breakpoint. + +## Basic usage + + + +### Brand + +The `` can be applied to most elements, but an anchor works best, as some elements might require utility classes or custom styles. + + + +Adding images to the `` will likely always require custom styles or utilities to properly size. Here are some examples to demonstrate. + + + + + +### Nav + +`` navigation is based on ``. **Navigation in navbars will also grow to occupy as much horizontal space as possible** to keep your navbar contents securely aligned. + + + +And because we use classes for our navs, you can avoid the list-based approach entirely if you like. + + + +You can also use dropdowns in your navbar. Please note that `` component requires `variant="nav-item"`. + + + +### Forms + +Place various form controls and components within a navbar: + + + +Immediate child elements of `` use flex layout and will default to `justify-content: space-between`. Use additional [flex utilities](https://coreui.io/docs/utilities/flex/) as needed to adjust this behavior. + + + +Input groups work, too. If your navbar is an entire form, or mostly a form, you can use the `` element as the container and save some HTML. + + + +Various buttons are supported as part of these navbar forms, too. This is also a great reminder that vertical alignment utilities can be used to align different sized elements. + + + +### Text + +Navbars may contain bits of text with the help of ``. This class adjusts vertical alignment and horizontal spacing for strings of text. + + + +## Color schemes + +Theming the navbar has never been easier thanks to the combination of theming classes and `background-color` utilities. Set `colorScheme="light"` for use with light background colors, or `colorScheme="dark"` for dark background colors. Then, customize with `.bg-*` utilities. + + + +## Containers + +Although it's not required, you can wrap a `` in a `` to center it on a page–though note that an inner container is still required. Or you can add a container inside the `` to only center the contents of a [fixed or static top navbar](#placement). + + + +Use any of the responsive containers to change how wide the content in your navbar is presented. + + + +## Placement + +Use our `placement` properly to place navbars in non-static positions. Choose from fixed to the top, fixed to the bottom, or stickied to the top (scrolls with the page until it reaches the top, then stays there). Fixed navbars use `position: fixed`, meaning they're pulled from the normal flow of the DOM and may require custom CSS (e.g., `padding-top` on the ``) to prevent overlap with other elements. + +Also note that **`.sticky-top` uses `position: sticky`, which [isn't fully supported in every browser](https://caniuse.com/css-sticky)**. + + + + + + + + + +## Responsive behaviors + +Navbars can use ``, ``, and `expand="{sm|md|lg|xl|xxl}"` property to determine when their content collapses behind a button. In combination with other utilities, you can easily choose when to show or hide particular elements. + +For navbars that never collapse, add the `expand` boolean property on the ``. For navbars that always collapse, don't add any property. + +### Toggler + +Navbar togglers are left-aligned by default, but should they follow a sibling element like a ``, they'll automatically be aligned to the far right. Reversing your markup will reverse the placement of the toggler. Below are examples of different toggle styles. + +With no `` shown at the smallest breakpoint: + + + +With a brand name shown on the left and toggler on the right: + + + +With a toggler on the left and brand name on the right: + + + +### External content + +Sometimes you want to use the collapse plugin to trigger a container element for content that structurally sits outside of the ``. + + + +### Offcanvas + +Transform your expanding and collapsing navbar into an offcanvas drawer with the offcanvas plugin. We extend both the offcanvas default styles and use our `expand="*"` prop to create a dynamic and flexible navigation sidebar. + +In the example below, to create an offcanvas navbar that is always collapsed across all breakpoints, omit the `expand="*"` prop entirely. + + + +To create an offcanvas navbar that expands into a normal navbar at a specific breakpoint like `xxl`, use `expand="xxl"` property. + + + +## API + +Check out the documentation below for a comprehensive guide to all the props you can use with the components mentioned here. + +- [<CNavbar />](./api/#cnavbar) +- [<CNavbarBrand />](./api/#cnavbarbrand) +- [<CNavbarNav />](./api/#cnavbarnav) +- [<CNavbarText />](./api/#cnavbartext) +- [<CNavbarToggler />](./api/#cnavbartoggler) \ No newline at end of file diff --git a/packages/docs/content/components/navbar/styling.mdx b/packages/docs/content/components/navbar/styling.mdx new file mode 100644 index 00000000..afcb447f --- /dev/null +++ b/packages/docs/content/components/navbar/styling.mdx @@ -0,0 +1,57 @@ +--- +title: React Navbar Component Styling +name: Navbar Styling +description: Learn how to customize the React Navbar component with CSS classes, variables, and SASS for flexible styling and seamless integration into your design. +route: /components/navbar/ +--- + +{/* ### CSS class names + +React Navbar comes with built-in class names that make styling super simple. Here’s a quick rundown of what you can use: + + */} + +### CSS variables + +React navbars use local CSS variables on `.navbar` for enhanced real-time customization. Values for the CSS variables are set via Sass, so Sass customization is still supported, too. + + + +Some additional CSS variables are also present on `.navbar-nav`: + + + +Customization through CSS variables can be seen on the `.navbar-dark` class where we override specific values without adding duplicate CSS selectors. + + + +#### How to use CSS variables + +```jsx +const customVars = { + '--cui-navbar-color': '#24e484', + '--cui-navbar-hover-color': '1a1a1a', +} + +return {/* Navbar content */} +``` + +### SASS variables + +Variables for all navbars: + + + +Variables for the [dark navbar](#color-schemes): + + + +### SASS loops + +[Responsive navbar expand/collapse classes](#responsive-behaviors) (e.g., `.navbar-expand-lg`) are combined with the `$breakpoints` map and generated through a loop in `scss/_navbar.scss`. + + diff --git a/packages/docs/content/components/navs-tabs/api.mdx b/packages/docs/content/components/navs-tabs/api.mdx new file mode 100644 index 00000000..4c78c048 --- /dev/null +++ b/packages/docs/content/components/navs-tabs/api.mdx @@ -0,0 +1,32 @@ +--- +title: React Navs & Tabs Components API +name: Navs & Tabs API +description: Explore the API reference for the React Navs & Tabs components and discover how to effectively utilize its props for customization. +route: /components/navs-tabs/ +--- + +import CNavAPI from '../../api/CNav.api.mdx' +import CNavItemAPI from '../../api/CNavItem.api.mdx' +import CNavLinkAPI from '../../api/CNavLink.api.mdx' +import CTabContentAPI from '../../api/CTabContent.api.mdx' +import CTabPaneAPI from '../../api/CTabPane.api.mdx' + +## CNav + + + +## CNavItem + + + +## CNavLink + + + +## CTabContent + + + +## CTabPane + + diff --git a/packages/docs/content/components/navs-tabs.mdx b/packages/docs/content/components/navs-tabs/index.mdx similarity index 93% rename from packages/docs/content/components/navs-tabs.mdx rename to packages/docs/content/components/navs-tabs/index.mdx index 86f52b5c..45f64bb7 100644 --- a/packages/docs/content/components/navs-tabs.mdx +++ b/packages/docs/content/components/navs-tabs/index.mdx @@ -2,8 +2,7 @@ title: React Navs & Tabs Components name: Navs & Tabs description: Documentation and examples for how to use CoreUI's included React navigation components. -menu: Components -route: /components/navs-tabs +route: /components/navs-tabs/ other_frameworks: navs-tabs --- @@ -652,68 +651,12 @@ return ( ) ``` -## Customizing - -### CSS variables - -React navs use local CSS variables on `.nav`, `.nav-tabs`, `.nav-pills`, `.nav-underline` and `.nav-underline-border` for enhanced real-time customization. Values for the CSS variables are set via Sass, so Sass customization is still supported, too. - -On the `.nav` base class: - - - -On the `.nav-tabs` modifier class: - - - -On the `.nav-pills` modifier class: - - - -Added in v5.0.0 - -On the `.nav-underline` modifier class: - - - -Added in v5.0.0 - -On the `.nav-underline-border` modifier class: - - - -#### How to use CSS variables - -```jsx -const vars = { - '--my-css-var': 10, - '--my-another-css-var': "red" -} -return ... -``` - -### SASS variables - - - ## API -### CNav - -`markdown:CNav.api.mdx` - -### CNavItem - -`markdown:CNavItem.api.mdx` - -### CNavLink - -`markdown:CNavLink.api.mdx` - -### CTabContent - -`markdown:CTabContent.api.mdx` - -### CTabPane +Check out the documentation below for a comprehensive guide to all the props you can use with the components mentioned here. -`markdown:CTabPane.api.mdx` +- [<CNav />](./api/#cnav) +- [<CNavItem />](./api/#cnavitem) +- [<CNavLink />](./api/#cnavlink) +- [<CTabContent />](./api/#ctabcontent) +- [<CTabPane />](./api/#ctabpane) \ No newline at end of file diff --git a/packages/docs/content/components/navs-tabs/styling.mdx b/packages/docs/content/components/navs-tabs/styling.mdx new file mode 100644 index 00000000..1452d67b --- /dev/null +++ b/packages/docs/content/components/navs-tabs/styling.mdx @@ -0,0 +1,59 @@ +--- +title: React Navs & Tabs Components Styling +name: Navs & Tabs Styling +description: Learn how to customize the React Navs & Tabs components with CSS classes, variables, and SASS for flexible styling and seamless integration into your design. +route: /components/navs-tabs/ +--- + +{/* ### CSS class names + +React Navbar comes with built-in class names that make styling super simple. Here’s a quick rundown of what you can use: + + */} + +### CSS variables + +React navs use local CSS variables on `.nav`, `.nav-tabs`, `.nav-pills`, `.nav-underline` and `.nav-underline-border` for enhanced real-time customization. Values for the CSS variables are set via Sass, so Sass customization is still supported, too. + +On the `.nav` base class: + + + +On the `.nav-tabs` modifier class: + + + +On the `.nav-pills` modifier class: + + + +Added in v5.0.0 + +On the `.nav-underline` modifier class: + + + +Added in v5.0.0 + +On the `.nav-underline-border` modifier class: + + + +#### How to use CSS variables + +```jsx +const customVars = { + '--cui-nav-link-color': '#555', + '--cui-nav-link-disabled-color': '#afaeef', +} + +return {/* Nav content */} +``` + +### SASS variables + + diff --git a/packages/docs/content/components/offcanvas/api.mdx b/packages/docs/content/components/offcanvas/api.mdx new file mode 100644 index 00000000..28b85299 --- /dev/null +++ b/packages/docs/content/components/offcanvas/api.mdx @@ -0,0 +1,27 @@ +--- +title: React Offcanvas Component API +name: Offcanvas API +description: Explore the API reference for the React Offcanvas component and discover how to effectively utilize its props for customization. +route: /components/offcanvas/ +--- + +import COffcanvasAPI from '../../api/COffcanvas.api.mdx' +import COffcanvasBodyAPI from '../../api/COffcanvasBody.api.mdx' +import COffcanvasHeaderAPI from '../../api/COffcanvasHeader.api.mdx' +import COffcanvasTitleAPI from '../../api/COffcanvasTitle.api.mdx' + +## COffcanvas + + + +## COffcanvasBody + + + +## COffcanvasHeader + + + +## COffcanvasTitle + + diff --git a/packages/docs/content/components/offcanvas.mdx b/packages/docs/content/components/offcanvas/index.mdx similarity index 97% rename from packages/docs/content/components/offcanvas.mdx rename to packages/docs/content/components/offcanvas/index.mdx index 37ac21d0..c2811ace 100644 --- a/packages/docs/content/components/offcanvas.mdx +++ b/packages/docs/content/components/offcanvas/index.mdx @@ -2,8 +2,7 @@ title: React Offcanvas Component name: Offcanvas description: React alert component allows build hidden sidebars into your project for navigation, shopping carts. -menu: Components -route: /components/offcanvas +route: /components/offcanvas/ other_frameworks: offcanvas --- @@ -450,18 +449,9 @@ return ... ## API -### COffcanvas +Check out the documentation below for a comprehensive guide to all the props you can use with the components mentioned here. -`markdown:COffcanvas.api.mdx` - -### COffcanvasBody - -`markdown:COffcanvasBody.api.mdx` - -### COffcanvasHeader - -`markdown:COffcanvasHeader.api.mdx` - -### COffcanvasTitle - -`markdown:COffcanvasTitle.api.mdx` +- [<COffcanvas />](./api/#coffcanvas) +- [<COffcanvasBody />](./api/#coffcanvasbody) +- [<COffcanvasHeader />](./api/#coffcanvasheader) +- [<COffcanvasTitle />](./api/#coffcanvastitle) \ No newline at end of file diff --git a/packages/docs/content/components/offcanvas/styling.mdx b/packages/docs/content/components/offcanvas/styling.mdx new file mode 100644 index 00000000..5f005a5f --- /dev/null +++ b/packages/docs/content/components/offcanvas/styling.mdx @@ -0,0 +1,38 @@ +--- +title: React Offcanvas Component Styling +name: Offcanvas Styling +description: Learn how to customize the React Offcanvas component with CSS classes, variables, and SASS for flexible styling and seamless integration into your design. +route: /components/offcanvas/ +--- + +{/* ### CSS class names + +React Offcanvas comes with built-in class names that make styling super simple. Here’s a quick rundown of what you can use: + + */} + +### CSS variables + +React offcanvas uses local CSS variables on `.offcanvas` for enhanced real-time customization. Values for the CSS variables are set via Sass, so Sass customization is still supported, too. + + + +#### How to use CSS variables + +```jsx +const customVars = { + '--cui-offcanvas-color': '#555', + '--cui-offcanvas-bg': '#fff', +} + +return {/* Offcanvas content */} +``` + +### SASS variables + + + diff --git a/packages/docs/content/components/pagination/api.mdx b/packages/docs/content/components/pagination/api.mdx new file mode 100644 index 00000000..8bc21ca8 --- /dev/null +++ b/packages/docs/content/components/pagination/api.mdx @@ -0,0 +1,17 @@ +--- +title: React Pagination Component API +name: Pagination API +description: Explore the API reference for the React Pagination component and discover how to effectively utilize its props for customization. +route: /components/pagination/ +--- + +import CPaginationAPI from '../../api/CPagination.api.mdx' +import CPaginationItemAPI from '../../api/CPaginationItem.api.mdx' + +## CPagination + + + +## CPaginationItem + + diff --git a/packages/docs/content/components/pagination.mdx b/packages/docs/content/components/pagination/index.mdx similarity index 85% rename from packages/docs/content/components/pagination.mdx rename to packages/docs/content/components/pagination/index.mdx index 4562715f..7c335981 100644 --- a/packages/docs/content/components/pagination.mdx +++ b/packages/docs/content/components/pagination/index.mdx @@ -2,8 +2,7 @@ title: React Pagination Component name: Pagination description: Documentation and examples for showing pagination to indicate a series of related content exists across multiple pages. -menu: Components -route: /components/pagination +route: /components/pagination/ other_frameworks: pagination --- @@ -111,34 +110,9 @@ Change the alignment of pagination components with `align` property. ``` -## Customizing - -### CSS variables - -React pagination use local CSS variables on `.pagination` for enhanced real-time customization. Values for the CSS variables are set via Sass, so Sass customization is still supported, too. - - - -#### How to use CSS variables - -```jsx -const vars = { - '--my-css-var': 10, - '--my-another-css-var': "red" -} -return ... -``` - -### SASS variables - - - ## API -### CPagination - -`markdown:CPagination.api.mdx` - -### CPaginationItem +Check out the documentation below for a comprehensive guide to all the props you can use with the components mentioned here. -`markdown:CPaginationItem.api.mdx` +- [<CPagination />](./api/#coffcanvas) +- [<CPaginationItem />](./api/#coffcanvasbody) \ No newline at end of file diff --git a/packages/docs/content/components/pagination/styling.mdx b/packages/docs/content/components/pagination/styling.mdx new file mode 100644 index 00000000..61a52f76 --- /dev/null +++ b/packages/docs/content/components/pagination/styling.mdx @@ -0,0 +1,38 @@ +--- +title: React Pagination Component Styling +name: Pagination Styling +description: Learn how to customize the React Pagination component with CSS classes, variables, and SASS for flexible styling and seamless integration into your design. +route: /components/pagination/ +--- + +{/* ### CSS class names + +React Pagination comes with built-in class names that make styling super simple. Here’s a quick rundown of what you can use: + + */} + +### CSS variables + +React pagination uses local CSS variables on `.pagination` for enhanced real-time customization. Values for the CSS variables are set via Sass, so Sass customization is still supported, too. + + + +#### How to use CSS variables + +```jsx +const customVars = { + '--cui-pagination-color': '#555', + '--cui-pagination-bg': '#fff', +} + +return {/* Pagination content */} +``` + +### SASS variables + + + diff --git a/packages/docs/content/components/placeholder/api.mdx b/packages/docs/content/components/placeholder/api.mdx new file mode 100644 index 00000000..eb237cd5 --- /dev/null +++ b/packages/docs/content/components/placeholder/api.mdx @@ -0,0 +1,12 @@ +--- +title: React Placeholder Component API +name: Placeholder API +description: Explore the API reference for the React Placeholder component and discover how to effectively utilize its props for customization. +route: /components/placeholder/ +--- + +import CPlaceholderAPI from '../../api/CPlaceholder.api.mdx' + +## CPlaceholder + + diff --git a/packages/docs/content/components/placeholder.mdx b/packages/docs/content/components/placeholder/index.mdx similarity index 94% rename from packages/docs/content/components/placeholder.mdx rename to packages/docs/content/components/placeholder/index.mdx index b2debab1..644f3b3a 100644 --- a/packages/docs/content/components/placeholder.mdx +++ b/packages/docs/content/components/placeholder/index.mdx @@ -2,8 +2,7 @@ title: React Placeholder Component name: Placeholder description: Use loading react placeholders for your components or pages to indicate something may still be loading. -menu: Components -route: /components/placeholder +route: /components/placeholder/ other_frameworks: placeholder --- @@ -18,7 +17,7 @@ import { CPlaceholder, } from '@coreui/react/src/index' -import ReactImg from './../assets/images/react.jpg' +import ReactImg from './../../assets/images/react.jpg' ## About @@ -132,14 +131,8 @@ Animate placeholders with `animation="glow"` or `animation="wave"` to better con ``` -## Customizing - -### SASS variables - - - ## API -### CPlaceholder +Check out the documentation below for a comprehensive guide to all the props you can use with the components mentioned here. -`markdown:CPlaceholder.api.mdx` +- [<CPlaceholder />](./api/#cplaceholder) diff --git a/packages/docs/content/components/placeholder/styling.mdx b/packages/docs/content/components/placeholder/styling.mdx new file mode 100644 index 00000000..1f1e84b8 --- /dev/null +++ b/packages/docs/content/components/placeholder/styling.mdx @@ -0,0 +1,20 @@ +--- +title: React Placeholder Component Styling +name: Placeholder Styling +description: Learn how to customize the React Placeholder component with CSS classes, variables, and SASS for flexible styling and seamless integration into your design. +route: /components/placeholder/ +--- + +{/* ### CSS class names + +React Placeholder comes with built-in class names that make styling super simple. Here’s a quick rundown of what you can use: + + */} + +### SASS variables + + diff --git a/packages/docs/content/components/popover/api.mdx b/packages/docs/content/components/popover/api.mdx new file mode 100644 index 00000000..cff7ebe7 --- /dev/null +++ b/packages/docs/content/components/popover/api.mdx @@ -0,0 +1,12 @@ +--- +title: React Popover Component API +name: Popover API +description: Explore the API reference for the React Popover component and discover how to effectively utilize its props for customization. +route: /components/popover/ +--- + +import CPopoverAPI from '../../api/CPopover.api.mdx' + +## CPopover + + diff --git a/packages/docs/content/components/popover.mdx b/packages/docs/content/components/popover/index.mdx similarity index 89% rename from packages/docs/content/components/popover.mdx rename to packages/docs/content/components/popover/index.mdx index ea2cdbc0..7db36c60 100644 --- a/packages/docs/content/components/popover.mdx +++ b/packages/docs/content/components/popover/index.mdx @@ -2,8 +2,7 @@ title: React Popover Component name: Popover description: Documentation and examples for adding React popovers, like those found in iOS, to any element on your site. -menu: Components -route: /components/popover +route: /components/popover/ other_frameworks: popover --- @@ -184,31 +183,8 @@ For disabled popover triggers, you may also prefer `trigger={['hover', 'focus']} ``` - -## Customizing - -### CSS variables - -React popovers use local CSS variables on `.popover` for enhanced real-time customization. Values for the CSS variables are set via Sass, so Sass customization is still supported, too. - - - -#### How to use CSS variables - -```jsx -const vars = { - '--my-css-var': 10, - '--my-another-css-var': 'red', -} -return ... -``` - -### SASS variables - - - ## API -### CPopover +Check out the documentation below for a comprehensive guide to all the props you can use with the components mentioned here. -`markdown:CPopover.api.mdx` +- [<CPopover />](./api/#cpopover) \ No newline at end of file diff --git a/packages/docs/content/components/popover/styling.mdx b/packages/docs/content/components/popover/styling.mdx new file mode 100644 index 00000000..f0060be3 --- /dev/null +++ b/packages/docs/content/components/popover/styling.mdx @@ -0,0 +1,37 @@ +--- +title: React Popover Component Styling +name: Popover Styling +description: Learn how to customize the React Popover component with CSS classes, variables, and SASS for flexible styling and seamless integration into your design. +route: /components/popover/ +--- + +{/* ### CSS class names + +React Popover comes with built-in class names that make styling super simple. Here’s a quick rundown of what you can use: + + */} + +### CSS variables + +React Popover supports CSS variables for easy customization. These variables are set via SASS but allow direct overrides in your stylesheets or inline styles. + + + +#### How to use CSS variables + +```jsx +const customVars = { + '--cui-popover-body-color': '#888', + '--cui-popover-bg': '#f2f4f6', +} + +return {/* Popover content */} +``` + +### SASS variables + + diff --git a/packages/docs/content/components/progress/api.mdx b/packages/docs/content/components/progress/api.mdx new file mode 100644 index 00000000..6718ee10 --- /dev/null +++ b/packages/docs/content/components/progress/api.mdx @@ -0,0 +1,17 @@ +--- +title: React Progress Component API +name: Progress API +description: Explore the API reference for the React Progress component and discover how to effectively utilize its props for customization. +route: /components/progress/ +--- + +import CProgressAPI from '../../api/CProgress.api.mdx' +import CProgressBarAPI from '../../api/CProgressBar.api.mdx' + +## CProgress + + + +## CProgressBar + + diff --git a/packages/docs/content/components/progress.mdx b/packages/docs/content/components/progress/index.mdx similarity index 88% rename from packages/docs/content/components/progress.mdx rename to packages/docs/content/components/progress/index.mdx index 905b7cb8..331e0106 100644 --- a/packages/docs/content/components/progress.mdx +++ b/packages/docs/content/components/progress/index.mdx @@ -2,8 +2,7 @@ title: React Progress Component name: Progress description: Documentation and examples for using React progress bars featuring support for stacked bars, animated backgrounds, and text labels. -menu: Components -route: /components/progress +route: /components/progress/ other_frameworks: progress --- @@ -151,34 +150,9 @@ The striped gradient can also be animated. Add `animated` property to ` ``` -## Customizing - -### CSS variables - -React progress bars use local CSS variables on `.progress` for enhanced real-time customization. Values for the CSS variables are set via Sass, so Sass customization is still supported, too. - - - -#### How to use CSS variables - -```jsx -const vars = { - '--my-css-var': 10, - '--my-another-css-var': "red" -} -return ... -``` - -### SASS variables - - - ## API -### CProgress - -`markdown:CProgress.api.mdx` - -### CProgressBar +Check out the documentation below for a comprehensive guide to all the props you can use with the components mentioned here. -`markdown:CProgressBar.api.mdx` +- [<CProgress />](./api/#cprogress) +- [<CProgressBar />](./api/#cprogressbar) diff --git a/packages/docs/content/components/progress/styling.mdx b/packages/docs/content/components/progress/styling.mdx new file mode 100644 index 00000000..c96613f8 --- /dev/null +++ b/packages/docs/content/components/progress/styling.mdx @@ -0,0 +1,37 @@ +--- +title: React Progress Component Styling +name: Progress Styling +description: Learn how to customize the React Progress component with CSS classes, variables, and SASS for flexible styling and seamless integration into your design. +route: /components/progress/ +--- + +{/* ### CSS class names + +React Progress comes with built-in class names that make styling super simple. Here’s a quick rundown of what you can use: + + */} + +### CSS variables + +React Progress supports CSS variables for easy customization. These variables are set via SASS but allow direct overrides in your stylesheets or inline styles. + + + +#### How to use CSS variables + +```jsx +const customVars = { + '--cui-progress-bar-color': '#888', + '--cui-progress-bar-bg': '#f2f4f6', +} + +return ... +``` + +### SASS variables + + diff --git a/packages/docs/content/components/sidebar/api.mdx b/packages/docs/content/components/sidebar/api.mdx new file mode 100644 index 00000000..92b6b112 --- /dev/null +++ b/packages/docs/content/components/sidebar/api.mdx @@ -0,0 +1,38 @@ +--- +title: React Sidebar Component API +name: Sidebar API +description: Explore the API reference for the React Sidebar component and discover how to effectively utilize its props for customization. +route: /components/widgets/ +--- + +import CSidebarAPI from '../../api/CSidebar.api.mdx' +import CSidebarBrandAPI from '../../api/CSidebarBrand.api.mdx' +import CSidebarFooterAPI from '../../api/CSidebarFooter.api.mdx' +import CSidebarHeaderAPI from '../../api/CSidebarHeader.api.mdx' +import CSidebarNavAPI from '../../api/CSidebarNav.api.mdx' +import CSidebarTogglerAPI from '../../api/CSidebarToggler.api.mdx' + +## CSidebar + + + +## CSidebarBrand + + + +## CSidebarFooter + + + +## CSidebarHeader + + + +## CSidebarNav + + + +## CSidebarToggler + + + diff --git a/packages/docs/content/components/sidebar.mdx b/packages/docs/content/components/sidebar/index.mdx similarity index 96% rename from packages/docs/content/components/sidebar.mdx rename to packages/docs/content/components/sidebar/index.mdx index a2367350..ce372eb8 100644 --- a/packages/docs/content/components/sidebar.mdx +++ b/packages/docs/content/components/sidebar/index.mdx @@ -2,8 +2,7 @@ title: React Sidebar Component name: Sidebar description: -menu: Components -route: /components/sidebar +route: /components/sidebar/ other_frameworks: sidebar --- @@ -278,28 +277,14 @@ return ... -## API - -### CSidebar - -`markdown:CSidebar.api.mdx` - -### CSidebarBrand - -`markdown:CSidebarBrand.api.mdx` - -### CSidebarFooter -`markdown:CSidebarFooter.api.mdx` - -### CSidebarHeader - -`markdown:CSidebarHeader.api.mdx` - -### CSidebarNav - -`markdown:CSidebarNav.api.mdx` +## API -### CSidebarToggler +Check out the documentation below for a comprehensive guide to all the props you can use with the components mentioned here. -`markdown:CSidebarToggler.api.mdx` +- [<CSidebar />](./api/#csidebar) +- [<CSidebarBrand />](./api/#csidebarbrand) +- [<CSidebarFooter />](./api/#csidebarfooter) +- [<CSidebarHeader />](./api/#csidebarheader) +- [<CSidebarNav />](./api/#csidebarnav) +- [<CSidebarToggler />](./api/#csidebartoggler) diff --git a/packages/docs/content/components/sidebar/styling.mdx b/packages/docs/content/components/sidebar/styling.mdx new file mode 100644 index 00000000..0a5ab0bd --- /dev/null +++ b/packages/docs/content/components/sidebar/styling.mdx @@ -0,0 +1,39 @@ +--- +title: React Sidebar Component Styling +name: Sidebar Styling +description: Learn how to customize the React Sidebar component with CSS classes, variables, and SASS for flexible styling and seamless integration into your design. +route: /components/sidebar/ +--- + +### CSS variables + +React sidebars use local CSS variables on `.sidebar` and `.sidebar-backdrop` for enhanced real-time customization. Values for the CSS variables are set via Sass, so Sass customization is still supported, too. + + + + + + + + + + + + + +#### How to use CSS variables + +```jsx +const customVars = { + '--cui-sidebar-bg': '#121212', + '--cui-sidebar-color': '#eee', +} + +return {/* Sidebar content */} +``` + +### SASS variables + + + + diff --git a/packages/docs/content/components/spinner/api.mdx b/packages/docs/content/components/spinner/api.mdx new file mode 100644 index 00000000..dd8cd57a --- /dev/null +++ b/packages/docs/content/components/spinner/api.mdx @@ -0,0 +1,12 @@ +--- +title: React Spinner Component API +name: Spinner API +description: Explore the API reference for the React Spinner component and discover how to effectively utilize its props for customization. +route: /components/spinner/ +--- + +import CSpinnerAPI from '../../api/CSpinner.api.mdx' + +## CSpinner + + diff --git a/packages/docs/content/components/spinner.mdx b/packages/docs/content/components/spinner/index.mdx similarity index 76% rename from packages/docs/content/components/spinner.mdx rename to packages/docs/content/components/spinner/index.mdx index dc977bda..8a2e0698 100644 --- a/packages/docs/content/components/spinner.mdx +++ b/packages/docs/content/components/spinner/index.mdx @@ -2,8 +2,7 @@ title: React Spinner Component name: Spinner description: Indicate the loading state of a component or page with CoreUI spinners, built entirely with HTML, CSS, and no JavaScript. -menu: Components -route: /components/spinner +route: /components/spinner/ other_frameworks: spinner --- @@ -146,48 +145,8 @@ Use spinners within buttons to indicate an action is currently processing or tak ``` -## Customizing - -### CSS variables - -React spinners use local CSS variables on `.spinner-border` and `.spinner-grow` for enhanced real-time customization. Values for the CSS variables are set via Sass, so Sass customization is still supported, too. - -Border spinner variables: - - - -Growing spinner variables: - - - -For both spinners, small spinner modifier classes are used to update the values of these CSS variables as needed. For example, the `.spinner-border-sm` class does the following: - - - -#### How to use CSS variables - -```jsx -const vars = { - '--my-css-var': 10, - '--my-another-css-var': "red" -} -return ... -``` - -### SASS variables - - - -### Keyframes - -Used for creating the CSS animations for our spinners. Included in `_spinners.scss`. - - - - - ## API -### CSpinner +Check out the documentation below for a comprehensive guide to all the props you can use with the components mentioned here. -`markdown:CSpinner.api.mdx` \ No newline at end of file +- [<CSpinner />](./api/#cspinner) \ No newline at end of file diff --git a/packages/docs/content/components/spinner/styling.mdx b/packages/docs/content/components/spinner/styling.mdx new file mode 100644 index 00000000..237b8817 --- /dev/null +++ b/packages/docs/content/components/spinner/styling.mdx @@ -0,0 +1,55 @@ +--- +title: React Spinner Component Styling +name: Spinner Styling +description: Learn how to customize the React Spinner component with CSS classes, variables, and SASS for flexible styling and seamless integration into your design. +route: /components/spinner/ +--- + +{/* ### CSS class names + +React Spinner comes with built-in class names that make styling super simple. Here’s a quick rundown of what you can use: + + */} + +### CSS variables + +React spinners use local CSS variables on `.spinner-border` and `.spinner-grow` for enhanced real-time customization. Values for the CSS variables are set via Sass, so Sass customization is still supported, too. + +Border spinner variables: + + + +Growing spinner variables: + + + +For both spinners, small spinner modifier classes are used to update the values of these CSS variables as needed. For example, the `.spinner-border-sm` class does the following: + + + +#### How to use CSS variables + +```jsx +const customVars = { + '--cui-spinner-width': '3rem', + '--cui-spinner-height': '3rem', +} + +return ... +``` + +### SASS variables + + + +### Keyframes + +Used for creating the CSS animations for our spinners. Included in `_spinners.scss`. + + + + diff --git a/packages/docs/content/components/table/api.mdx b/packages/docs/content/components/table/api.mdx new file mode 100644 index 00000000..12670487 --- /dev/null +++ b/packages/docs/content/components/table/api.mdx @@ -0,0 +1,42 @@ +--- +title: React Table Component API +name: Table API +description: Explore the API reference for the React Table component and discover how to effectively utilize its props for customization. +route: /components/table/ +--- + +import CTableAPI from '../../api/CTable.api.mdx' +import CTableBodyAPI from '../../api/CTableBody.api.mdx' +import CTableDataCellAPI from '../../api/CTableDataCell.api.mdx' +import CTableFootAPI from '../../api/CTableFoot.api.mdx' +import CTableHeadAPI from '../../api/CTableHead.api.mdx' +import CTableHeaderCellAPI from '../../api/CTableHeaderCell.api.mdx' +import CTableRowAPI from '../../api/CTableRow.api.mdx' + +## CTable + + + +## CTableBody + + + +## CTableDataCell + + + +## CTableFoot + + + +## CTableHead + + + +## CTableHeaderCell + + + +## CTableRow + + diff --git a/packages/docs/content/components/table.mdx b/packages/docs/content/components/table/index.mdx similarity index 98% rename from packages/docs/content/components/table.mdx rename to packages/docs/content/components/table/index.mdx index a62cb451..2458d0d3 100644 --- a/packages/docs/content/components/table.mdx +++ b/packages/docs/content/components/table/index.mdx @@ -2,8 +2,7 @@ title: React Table Component name: Table description: Documentation and examples for opt-in styling of tables. -menu: Components -route: /components/table +route: /components/table/ other_frameworks: table --- @@ -1634,30 +1633,12 @@ Responsive tables allow tables to be scrolled horizontally with ease. Make any t ## API -### CTable +Check out the documentation below for a comprehensive guide to all the props you can use with the components mentioned here. -`markdown:CTable.api.mdx` - -### CTableBody - -`markdown:CTableBody.api.mdx` - -### CTableDataCell - -`markdown:CTableDataCell.api.mdx` - -### CTableFoot - -`markdown:CTableFoot.api.mdx` - -### CTableHead - -`markdown:CTableHead.api.mdx` - -### CTableHeaderCell - -`markdown:CTableHeaderCell.api.mdx` - -### CTableRow - -`markdown:CTableRow.api.mdx` +- [<CTable />](./api/#ctable) +- [<CTableBody />](./api/#ctablebody) +- [<CTableDataCell />](./api/#ctabledatacell) +- [<CTableFoot />](./api/#ctablefoot) +- [<CTableHead />](./api/#ctablehead) +- [<CTableHeaderCell />](./api/#ctableheadercell) +- [<CTableRow />](./api/#ctablerow) diff --git a/packages/docs/content/components/table/styling.mdx b/packages/docs/content/components/table/styling.mdx new file mode 100644 index 00000000..bb6cc2e7 --- /dev/null +++ b/packages/docs/content/components/table/styling.mdx @@ -0,0 +1,24 @@ +--- +title: React Table Component Styling +name: Table Styling +description: Learn how to customize the React Table component with CSS classes, variables, and SASS for flexible styling and seamless integration into your design. +route: /components/table/ +--- + +{/* ### CSS class names + +React Table comes with built-in class names that make styling super simple. Here’s a quick rundown of what you can use: + + */} + +### SASS variables + + + +### SASS loops + + diff --git a/packages/docs/content/components/tabs/api.mdx b/packages/docs/content/components/tabs/api.mdx new file mode 100644 index 00000000..6618ca60 --- /dev/null +++ b/packages/docs/content/components/tabs/api.mdx @@ -0,0 +1,32 @@ +--- +title: React Tabs Component API +name: Tabs API +description: Explore the API reference for the React Tabs component and discover how to effectively utilize its props for customization. +route: /components/tabs/ +--- + +import CTabAPI from '../../api/CTab.api.mdx' +import CTabContentAPI from '../../api/CTabContent.api.mdx' +import CTabListAPI from '../../api/CTabList.api.mdx' +import CTabPanelAPI from '../../api/CTabPanel.api.mdx' +import CTabsAPI from '../../api/CTabs.api.mdx' + +## CTab + + + +## CTabContent + + + +## CTabList + + + +## CTabPanel + + + +## CTabs + + diff --git a/packages/docs/content/components/tabs.mdx b/packages/docs/content/components/tabs/index.mdx similarity index 89% rename from packages/docs/content/components/tabs.mdx rename to packages/docs/content/components/tabs/index.mdx index 03fd7a76..f55f7341 100644 --- a/packages/docs/content/components/tabs.mdx +++ b/packages/docs/content/components/tabs/index.mdx @@ -2,8 +2,7 @@ title: React Tabs Components name: Tabs description: The CoreUI React Tabs component provides a flexible and accessible way to create tabbed navigation in your application. It supports various styles and configurations to meet different design requirements. -menu: Components -route: /components/tabs +route: /components/tabs/ since: 5.1.0 --- @@ -283,65 +282,12 @@ This example demonstrates how to manually set `aria-selected`, `aria-controls`, End: Moves focus to the last tab. -## Customizing - -### CSS variables - -React tabs use local CSS variables on `.nav`, `.nav-tabs`, `.nav-pills`, `.nav-underline` and `.nav-underline-border` for enhanced real-time customization. Values for the CSS variables are set via Sass, so Sass customization is still supported, too. - -On the `.nav` base class: - - - -On the `.nav-tabs` modifier class: - - - -On the `.nav-pills` modifier class: - - - -On the `.nav-underline` modifier class: - - - -On the `.nav-underline-border` modifier class: - - - -#### How to use CSS variables - -```jsx -const vars = { - '--my-css-var': 10, - '--my-another-css-var': "red" -} -return ... -``` - -### SASS variables - - - ## API -### CTab - -`markdown:CTab.api.mdx` - -### CTabContent - -`markdown:CTabContent.api.mdx` - -### CTabList - -`markdown:CTabList.api.mdx` - -### CTabPanel - -`markdown:CTabPanel.api.mdx` - -### CTabs - -`markdown:CTabs.api.mdx` +Check out the documentation below for a comprehensive guide to all the props you can use with the components mentioned here. +- [<CTab />](./api/#ctab) +- [<CTabContent />](./api/#ctabcontent) +- [<CTabList />](./api/#ctablist) +- [<CTabPanel />](./api/#ctabpanel) +- [<CTabs />](./api/#ctabs) diff --git a/packages/docs/content/components/tabs/styling.mdx b/packages/docs/content/components/tabs/styling.mdx new file mode 100644 index 00000000..f07a85fc --- /dev/null +++ b/packages/docs/content/components/tabs/styling.mdx @@ -0,0 +1,49 @@ +--- +title: React Tabs Component Styling +name: Tabs Styling +description: Learn how to customize the React Tabs component with CSS classes, variables, and SASS for flexible styling and seamless integration into your design. +route: /components/tabs/ +--- + +### CSS variables + +React navs use local CSS variables on `.nav`, `.nav-tabs`, `.nav-pills`, `.nav-underline` and `.nav-underline-border` for enhanced real-time customization. Values for the CSS variables are set via Sass, so Sass customization is still supported, too. + +On the `.nav` base class: + + + +On the `.nav-tabs` modifier class: + + + +On the `.nav-pills` modifier class: + + + +Added in v5.0.0 + +On the `.nav-underline` modifier class: + + + +Added in v5.0.0 + +On the `.nav-underline-border` modifier class: + + + +#### How to use CSS variables + +```jsx +const customVars = { + '--cui-nav-link-color': '#555', + '--cui-nav-link-disabled-color': '#afaeef', +} + +return {/* Tabs content */} +``` + +### SASS variables + + diff --git a/packages/docs/content/components/toast/api.mdx b/packages/docs/content/components/toast/api.mdx new file mode 100644 index 00000000..c6543960 --- /dev/null +++ b/packages/docs/content/components/toast/api.mdx @@ -0,0 +1,32 @@ +--- +title: React Toast Component API +name: Toast API +description: Explore the API reference for the React Toast component and discover how to effectively utilize its props for customization. +route: /components/toast/ +--- + +import CToastAPI from '../../api/CToast.api.mdx' +import CToastHeaderAPI from '../../api/CToastHeader.api.mdx' +import CToastBodyAPI from '../../api/CToastBody.api.mdx' +import CToastCloseAPI from '../../api/CToastClose.api.mdx' +import CToasterAPI from '../../api/CToaster.api.mdx' + +## CToast + + + +## CToastHeader + + + +## CToastBody + + + +## CToastClose + + + +## CToaster + + diff --git a/packages/docs/content/components/toast.mdx b/packages/docs/content/components/toast/index.mdx similarity index 90% rename from packages/docs/content/components/toast.mdx rename to packages/docs/content/components/toast/index.mdx index dae24a37..1a33ce89 100644 --- a/packages/docs/content/components/toast.mdx +++ b/packages/docs/content/components/toast/index.mdx @@ -2,8 +2,7 @@ title: React Toast Component name: Toast description: Push notifications to your visitors with a toast, a lightweight and easily customizable alert message. -menu: Components -route: /components/toast +route: /components/toast/ other_frameworks: toast --- @@ -236,46 +235,12 @@ Building on the above example, you can create different toast color schemes with ``` -## Customizing - -### CSS variables - -React toasts use local CSS variables on `.toast` for enhanced real-time customization. Values for the CSS variables are set via Sass, so Sass customization is still supported, too. - - - -#### How to use CSS variables - -```jsx -const vars = { - '--my-css-var': 10, - '--my-another-css-var': "red" -} -return ... -``` - -### SASS variables - - - ## API -### CToast - -`markdown:CToast.api.mdx` - -### CToastHeader - -`markdown:CToastHeader.api.mdx` - -### CToastBody - -`markdown:CToastBody.api.mdx` - -### CToastClose - -`markdown:CToastClose.api.mdx` - -### CToaster +Check out the documentation below for a comprehensive guide to all the props you can use with the components mentioned here. -`markdown:CToaster.api.mdx` +- [<CToast />](./api/#ctoast) +- [<CToastHeader />](./api/#ctoastheader) +- [<CToastBody />](./api/#ctoastbody) +- [<CToastClose />](./api/#ctoastclose) +- [<CToaster />](./api/#ctoaster) diff --git a/packages/docs/content/components/toast/styling.mdx b/packages/docs/content/components/toast/styling.mdx new file mode 100644 index 00000000..75babf3e --- /dev/null +++ b/packages/docs/content/components/toast/styling.mdx @@ -0,0 +1,27 @@ +--- +title: React Toast Component Styling +name: Toast Styling +description: Learn how to customize the React Toast component with CSS classes, variables, and SASS for flexible styling and seamless integration into your design. +route: /components/toast/ +--- + +### CSS variables + +React Toast supports CSS variables for easy customization. These variables are set via SASS but allow direct overrides in your stylesheets or inline styles. + + + +#### How to use CSS variables + +```jsx +const customVars = { + '--cui-toast-spacing': '2rem', + '--cui-toast-color': '#f2f3f4', +} + +return {/* Toast content */} +``` + +### SASS variables + + diff --git a/packages/docs/content/components/tooltip/api.mdx b/packages/docs/content/components/tooltip/api.mdx new file mode 100644 index 00000000..edfa37ac --- /dev/null +++ b/packages/docs/content/components/tooltip/api.mdx @@ -0,0 +1,12 @@ +--- +title: React Tooltip Component API +name: Tooltip API +description: Explore the API reference for the React Tooltip component and discover how to effectively utilize its props for customization. +route: /components/tooltip/ +--- + +import CTooltipAPI from '../../api/CTooltip.api.mdx' + +## CTooltip + + diff --git a/packages/docs/content/components/tooltip.mdx b/packages/docs/content/components/tooltip/index.mdx similarity index 96% rename from packages/docs/content/components/tooltip.mdx rename to packages/docs/content/components/tooltip/index.mdx index 6c148a82..05e13361 100644 --- a/packages/docs/content/components/tooltip.mdx +++ b/packages/docs/content/components/tooltip/index.mdx @@ -2,8 +2,7 @@ title: React Tooltip Component name: Tooltip description: Documentation and examples for adding React Tooltips. -menu: Components -route: /components/tooltip +route: /components/tooltip/ other_frameworks: tooltip --- @@ -186,6 +185,6 @@ return ... ## API -### CTooltip +Check out the documentation below for a comprehensive guide to all the props you can use with the components mentioned here. -`markdown:CTooltip.api.mdx` +- [<CTooltip />](./api/#ctooltip) diff --git a/packages/docs/content/components/tooltip/styling.mdx b/packages/docs/content/components/tooltip/styling.mdx new file mode 100644 index 00000000..92798da2 --- /dev/null +++ b/packages/docs/content/components/tooltip/styling.mdx @@ -0,0 +1,27 @@ +--- +title: React Tooltip Component Styling +name: Tooltip Styling +description: Learn how to customize the React Tooltip component with CSS classes, variables, and SASS for flexible styling and seamless integration into your design. +route: /components/tooltip/ +--- + +### CSS variables + +React Tooltip supports CSS variables for easy customization. These variables are set via SASS but allow direct overrides in your stylesheets or inline styles. + + + +#### How to use CSS variables + +```jsx +const customVars = { + '--cui-tooltip-color': '#888', + '--cui-tooltip-bg': '#f2f4f6', +} + +return {/* Tooltip content */} +``` + +### SASS variables + + diff --git a/packages/docs/content/components/widgets/api.mdx b/packages/docs/content/components/widgets/api.mdx new file mode 100644 index 00000000..86fe7fa8 --- /dev/null +++ b/packages/docs/content/components/widgets/api.mdx @@ -0,0 +1,38 @@ +--- +title: React Widgets Component API +name: Widgets API +description: Explore the API reference for the React Widget and discover how to effectively utilize its props for customization. +route: /components/widgets/ +--- + +import CWidgetStatsAAPI from '../../api/CWidgetStatsA.api.mdx' +import CWidgetStatsBAPI from '../../api/CWidgetStatsB.api.mdx' +import CWidgetStatsCAPI from '../../api/CWidgetStatsC.api.mdx' +import CWidgetStatsDAPI from '../../api/CWidgetStatsD.api.mdx' +import CWidgetStatsEAPI from '../../api/CWidgetStatsE.api.mdx' +import CWidgetStatsFAPI from '../../api/CWidgetStatsF.api.mdx' + +## CWidgetStatsA + + + +## CWidgetStatsB + + + +## CWidgetStatsC + + + +## CWidgetStatsD + + + +## CWidgetStatsE + + + +## CWidgetStatsF + + + diff --git a/packages/docs/content/components/widgets.mdx b/packages/docs/content/components/widgets/index.mdx similarity index 98% rename from packages/docs/content/components/widgets.mdx rename to packages/docs/content/components/widgets/index.mdx index 6c08ef69..2fd39781 100644 --- a/packages/docs/content/components/widgets.mdx +++ b/packages/docs/content/components/widgets/index.mdx @@ -2,8 +2,7 @@ title: React Widgets name: Widgets description: React widget components give information about the app statistics. -menu: Components -route: /components/widgets +route: /components/widgets/ --- import CIcon from '@coreui/icons-react' @@ -1443,26 +1442,11 @@ import { ## API -### CWidgetStatsA +Check out the documentation below for a comprehensive guide to all the props you can use with the components mentioned here. -`markdown:CWidgetStatsA.api.mdx` - -### CWidgetStatsB - -`markdown:CWidgetStatsB.api.mdx` - -### CWidgetStatsC - -`markdown:CWidgetStatsC.api.mdx` - -### CWidgetStatsD - -`markdown:CWidgetStatsD.api.mdx` - -### CWidgetStatsE - -`markdown:CWidgetStatsE.api.mdx` - -### CWidgetStatsF - -`markdown:CWidgetStatsF.api.mdx` +- [<CWidgetStatsA />](./api/#cwidgetstatsa) +- [<CWidgetStatsB />](./api/#cwidgetstatsb) +- [<CWidgetStatsC />](./api/#cwidgetstatsc) +- [<CWidgetStatsD />](./api/#cwidgetstatsd) +- [<CWidgetStatsE />](./api/#cwidgetstatse) +- [<CWidgetStatsF />](./api/#cwidgetstatsf) diff --git a/packages/docs/content/forms/checkbox.mdx b/packages/docs/content/forms/checkbox.mdx deleted file mode 100644 index 70b87ac8..00000000 --- a/packages/docs/content/forms/checkbox.mdx +++ /dev/null @@ -1,127 +0,0 @@ ---- -title: React Checkbox Components -name: Checkbox -description: Create consistent cross-browser and cross-device checkboxes with our React checkbox components. -menu: Forms -route: /forms/checkbox -other_frameworks: checkbox ---- - -import { useEffect, useRef } from 'react' -import { - CButton, - CFormCheck, -} from '@coreui/react/src/index' - -## Approach - -Browser default checkboxes and radios are replaced with the help of ``. Checkboxes are for selecting one or several options in a list. - -## Checkboxes - -```jsx preview - - -``` - -### Indeterminate - -Checkboxes can utilize the `:indeterminate` pseudo-class when manually set via `indeterminate` property. - -```jsx preview - -``` - -### Disabled - -Add the `disabled` attribute and the associated `