diff --git a/package.json b/package.json index f27bd5f4..91b0b416 100644 --- a/package.json +++ b/package.json @@ -22,17 +22,17 @@ "test:update": "npm-run-all charts:test:update icons:test:update lib:test:update" }, "devDependencies": { - "@typescript-eslint/eslint-plugin": "^8.12.1", - "@typescript-eslint/parser": "^8.12.1", + "@typescript-eslint/eslint-plugin": "^8.18.1", + "@typescript-eslint/parser": "^8.18.1", "eslint": "8.57.0", "eslint-config-prettier": "^9.1.0", "eslint-plugin-prettier": "^5.2.1", "eslint-plugin-react": "^7.37.2", - "eslint-plugin-react-hooks": "^5.0.0", - "eslint-plugin-unicorn": "^56.0.0", - "lerna": "^8.1.8", + "eslint-plugin-react-hooks": "^5.1.0", + "eslint-plugin-unicorn": "^56.0.1", + "lerna": "^8.1.9", "npm-run-all": "^4.1.5", - "prettier": "^3.3.3" + "prettier": "^3.4.2" }, "overrides": { "gatsby-remark-external-links": { diff --git a/packages/coreui-react/package.json b/packages/coreui-react/package.json index e106f5a0..a878d9d0 100644 --- a/packages/coreui-react/package.json +++ b/packages/coreui-react/package.json @@ -46,15 +46,15 @@ "prop-types": "^15.8.1" }, "devDependencies": { - "@rollup/plugin-commonjs": "^28.0.1", - "@rollup/plugin-node-resolve": "^15.3.0", - "@rollup/plugin-typescript": "^12.1.1", - "@testing-library/jest-dom": "^6.6.2", - "@testing-library/react": "^16.0.1", + "@rollup/plugin-commonjs": "^28.0.2", + "@rollup/plugin-node-resolve": "^16.0.0", + "@rollup/plugin-typescript": "^12.1.2", + "@testing-library/jest-dom": "^6.6.3", + "@testing-library/react": "^16.1.0", "@types/jest": "^29.5.14", - "@types/react": "18.3.12", - "@types/react-dom": "^18.3.1", - "@types/react-transition-group": "^4.4.11", + "@types/react": "18.3.17", + "@types/react-dom": "^18.3.5", + "@types/react-transition-group": "^4.4.12", "classnames": "^2.5.1", "cross-env": "^7.0.3", "jest": "^29.7.0", @@ -62,10 +62,10 @@ "react": "^18.3.1", "react-dom": "^18.3.1", "react-transition-group": "^4.4.5", - "rollup": "^4.24.2", + "rollup": "^4.28.1", "ts-jest": "^29.2.5", - "tslib": "^2.8.0", - "typescript": "^5.6.3" + "tslib": "^2.8.1", + "typescript": "^5.7.2" }, "peerDependencies": { "react": ">=17", diff --git a/packages/coreui-react/src/components/accordion/CAccordion.tsx b/packages/coreui-react/src/components/accordion/CAccordion.tsx index 5504f915..9fe4c634 100644 --- a/packages/coreui-react/src/components/accordion/CAccordion.tsx +++ b/packages/coreui-react/src/components/accordion/CAccordion.tsx @@ -2,78 +2,25 @@ import React, { createContext, forwardRef, HTMLAttributes, useState } from 'reac import PropTypes from 'prop-types' import classNames from 'classnames' -import { mergeClassNames } from '../../utils' - export interface CAccordionProps extends HTMLAttributes { /** - * Determines which accordion item is currently active (expanded) by default. - * Accepts a number or string corresponding to the `itemKey` of the desired accordion item. - * - * @example - * ... + * The active item key. */ activeItemKey?: number | string - /** - * 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. - * - * @default false - * - * @example - * ... + * Make accordion items stay open when another item is opened */ alwaysOpen?: boolean - /** - * Allows you to apply custom CSS classes to the React Accordion for enhanced styling and theming. - * - * @example - * ... + * A string of all className you want applied to the base component. */ className?: 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. - * - * @example - * const customClasses = { - * ACCORDION: 'custom-accordion', - * ACCORDION_FLUSH: 'custom-accordion-flush' - * } - * ... - */ - customClassNames?: Partial - - /** - * 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. - * - * @default false - * - * @example - * ... + * Removes the default background-color, some borders, and some rounded corners to render accordions edge-to-edge with their parent container. */ flush?: boolean } -export const ACCORDION_CLASS_NAMES = { - /** - * Base class for the accordion container. - */ - ACCORDION: 'accordion', - - /** - * Applied when the `flush` prop is enabled. - */ - ACCORDION_FLUSH: 'accordion-flush', -} - export interface CAccordionContextProps { _activeItemKey?: number | string alwaysOpen?: boolean @@ -83,24 +30,12 @@ export interface CAccordionContextProps { export const CAccordionContext = createContext({} as CAccordionContextProps) export const CAccordion = forwardRef( - ( - { children, activeItemKey, alwaysOpen = false, className, customClassNames, flush, ...rest }, - ref, - ) => { + ({ children, activeItemKey, alwaysOpen = false, className, flush, ...rest }, ref) => { const [_activeItemKey, setActiveKey] = useState(activeItemKey) - const mergedClassNames = mergeClassNames( - ACCORDION_CLASS_NAMES, - customClassNames, - ) - return (
diff --git a/packages/coreui-react/src/components/accordion/CAccordionBody.tsx b/packages/coreui-react/src/components/accordion/CAccordionBody.tsx index 00d48964..532f3ff6 100644 --- a/packages/coreui-react/src/components/accordion/CAccordionBody.tsx +++ b/packages/coreui-react/src/components/accordion/CAccordionBody.tsx @@ -5,60 +5,21 @@ import classNames from 'classnames' import { CAccordionItemContext } from './CAccordionItem' import { CCollapse } from './../collapse/CCollapse' -import { mergeClassNames } from '../../utils' export interface CAccordionBodyProps extends HTMLAttributes { /** - * Allows you to apply custom CSS classes to the React Accordion Body for enhanced styling and theming. - * - * @example - * ... + * A string of all className you want applied to the base component. */ className?: 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. - * - * @example - * const customClasses = { - * ACCORDION_COLLAPSE: 'custom-collapse-class', - * ACCORDION_BODY: 'custom-body-class', - * } - * ... - */ - customClassNames?: Partial -} - -export const ACCORDION_BODY_CLASS_NAMES = { - /** - * Used for managing collapsible behavior in the accordion body. - */ - ACCORDION_COLLAPSE: 'accordion-collapse', - - /** - * Styles the main content container inside the accordion. - */ - ACCORDION_BODY: 'accordion-body', } export const CAccordionBody = forwardRef( - ({ children, className, customClassNames, ...rest }, ref) => { - const { id, visible } = useContext(CAccordionItemContext) - - const mergedClassNames = mergeClassNames( - ACCORDION_BODY_CLASS_NAMES, - customClassNames, - ) + ({ children, className, ...rest }, ref) => { + const { visible } = useContext(CAccordionItemContext) return ( - -
+ +
{children}
diff --git a/packages/coreui-react/src/components/accordion/CAccordionButton.tsx b/packages/coreui-react/src/components/accordion/CAccordionButton.tsx index e6bc38a4..2a54e345 100644 --- a/packages/coreui-react/src/components/accordion/CAccordionButton.tsx +++ b/packages/coreui-react/src/components/accordion/CAccordionButton.tsx @@ -4,49 +4,21 @@ import classNames from 'classnames' import { CAccordionItemContext } from './CAccordionItem' -import { mergeClassNames } from '../../utils' - export interface CAccordionButtonProps extends HTMLAttributes { /** - * Styles the clickable element in the accordion header. + * A string of all className you want applied to the base component. */ className?: 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. - * - * @example - * const customClasses = { - * ACCORDION_BUTTON: 'custom-button-class', - * } - * ... - */ - customClassNames?: Partial -} - -export const CLASS_NAMES = { - ACCORDION_BUTTON: 'accordion-button', } export const CAccordionButton = forwardRef( - ({ children, className, customClassNames, ...rest }, ref) => { + ({ children, className, ...rest }, ref) => { const { id, visible, setVisible } = useContext(CAccordionItemContext) - const mergedClassNames = mergeClassNames(CLASS_NAMES, customClassNames) - return (
-able> -
diff --git a/packages/docs/content/api/CCharts.api.mdx b/packages/docs/content/api/CCharts.api.mdx index df4faa63..51f32ed4 100644 --- a/packages/docs/content/api/CCharts.api.mdx +++ b/packages/docs/content/api/CCharts.api.mdx @@ -15,21 +15,25 @@ import CChartBar from '@coreui/react-chartjs/src/CCharts' - - className# + + className# undefined {`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# + + customTooltips# {`true`} {`boolean`} - Enables custom html based tooltips instead of standard tooltips. + +

Enables custom html based tooltips instead of standard tooltips.

+ data# @@ -37,39 +41,49 @@ 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# + + fallbackContent# undefined {`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# + + getDatasetAtEvent# undefined {`(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# + + getElementAtEvent# undefined {`(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# + + getElementsAtEvent# undefined {`(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,10 +151,10 @@ 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.

+ -able> - diff --git a/packages/docs/content/api/CCloseButton.api.mdx b/packages/docs/content/api/CCloseButton.api.mdx index 46f59259..c6d34b32 100644 --- a/packages/docs/content/api/CCloseButton.api.mdx +++ b/packages/docs/content/api/CCloseButton.api.mdx @@ -15,13 +15,15 @@ import CCloseButton from '@coreui/react/src/components/close-button/CCloseButton - - className# + + className# undefined {`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..f9e0847f 100644 --- a/packages/docs/content/api/CCol.api.mdx +++ b/packages/docs/content/api/CCol.api.mdx @@ -15,13 +15,15 @@ import CCol from '@coreui/react/src/components/grid/CCol' - - className# + + className# undefined {`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..08d54233 100644 --- a/packages/docs/content/api/CCollapse.api.mdx +++ b/packages/docs/content/api/CCollapse.api.mdx @@ -15,13 +15,15 @@ import CCollapse from '@coreui/react/src/components/collapse/CCollapse' - - className# + + className# undefined {`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,23 +31,29 @@ 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# + + onHide# undefined {`() => void`} - Callback fired when the component requests to be hidden. + +

Callback fired when the component requests to be hidden.

+ - - onShow# + + onShow# undefined {`() => 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..48cafc0c 100644 --- a/packages/docs/content/api/CContainer.api.mdx +++ b/packages/docs/content/api/CContainer.api.mdx @@ -15,13 +15,15 @@ import CContainer from '@coreui/react/src/components/grid/CContainer' - - className# + + className# undefined {`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..e5393293 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,23 +31,35 @@ 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# + + autoClose# {`true`} {`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# + + className# undefined {`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,23 +97,29 @@ 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+ + + onHide#4.9.0+ undefined {`() => void`} - Callback fired when the component requests to be hidden. + +

Callback fired when the component requests to be hidden.

+ - - onShow# + + onShow# undefined {`() => 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..dc8842ea 100644 --- a/packages/docs/content/api/CDropdownDivider.api.mdx +++ b/packages/docs/content/api/CDropdownDivider.api.mdx @@ -15,13 +15,15 @@ import CDropdownDivider from '@coreui/react/src/components/dropdown/CDropdownDiv - - className# + + className# undefined {`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..f4793433 100644 --- a/packages/docs/content/api/CDropdownHeader.api.mdx +++ b/packages/docs/content/api/CDropdownHeader.api.mdx @@ -21,15 +21,19 @@ 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# + + className# undefined {`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..c427f418 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,15 +31,19 @@ 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# + + className# undefined {`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..a8be60ec 100644 --- a/packages/docs/content/api/CDropdownItemPlain.api.mdx +++ b/packages/docs/content/api/CDropdownItemPlain.api.mdx @@ -21,15 +21,19 @@ 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# + + className# undefined {`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..30989ae0 100644 --- a/packages/docs/content/api/CDropdownMenu.api.mdx +++ b/packages/docs/content/api/CDropdownMenu.api.mdx @@ -21,15 +21,19 @@ 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# + + className# undefined {`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..9cb992f8 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,15 +41,19 @@ import CDropdownToggle from '@coreui/react/src/components/dropdown/CDropdownTogg {`boolean`} - Enables pseudo element caret on toggler. + +

Enables pseudo element caret on toggler.

+ - - className# + + className# undefined {`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,15 +91,19 @@ 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+ + + navLink#5.0.0+ {`true`} {`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..f54439f0 100644 --- a/packages/docs/content/api/CFooter.api.mdx +++ b/packages/docs/content/api/CFooter.api.mdx @@ -15,13 +15,15 @@ import CFooter from '@coreui/react/src/components/footer/CFooter' - - className# + + className# undefined {`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..5c6b86dc 100644 --- a/packages/docs/content/api/CForm.api.mdx +++ b/packages/docs/content/api/CForm.api.mdx @@ -15,13 +15,15 @@ import CForm from '@coreui/react/src/components/form/CForm' - - className# + + className# undefined {`string`} - A string of all className you want applied to the component. + +

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

+ validated# @@ -29,7 +31,9 @@ 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 you set it {`true`}, all validation styles will be applied to the forms component.

+ diff --git a/packages/docs/content/api/CFormCheck.api.mdx b/packages/docs/content/api/CFormCheck.api.mdx index 59fcbea7..2798a834 100644 --- a/packages/docs/content/api/CFormCheck.api.mdx +++ b/packages/docs/content/api/CFormCheck.api.mdx @@ -21,15 +21,19 @@ 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# + + className# undefined {`string`} - A string of all className you want applied to the component. + +

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

+ feedback#4.2.0+ @@ -37,39 +41,49 @@ import CFormCheck from '@coreui/react/src/components/form/CFormCheck' {`ReactNode`} - Provide valuable, actionable feedback. + +

Provide valuable, actionable feedback.

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

Provide valuable, actionable feedback.

+ - - feedbackValid#4.2.0+ + + feedbackValid#4.2.0+ undefined {`ReactNode`} - Provide valuable, actionable invalid feedback when using standard HTML form validation which applied two CSS pseudo-classes, {`:invalid`} and {`:valid`}. + +

Provide valuable, actionable invalid feedback when using standard HTML form validation which applied two CSS pseudo-classes, {`:invalid`} and {`:valid`}.

+ - - floatingLabel#4.2.0+ + + floatingLabel#4.2.0+ undefined {`ReactNode`} - Provide valuable, actionable valid feedback when using standard HTML form validation which applied two CSS pseudo-classes, {`:invalid`} and {`:valid`}. + +

Provide valuable, actionable valid feedback when using standard HTML form validation which applied two CSS pseudo-classes, {`:invalid`} and {`:valid`}.

+ - - hitArea# + + hitArea# undefined {`"full"`} - Sets hit area to the full area of the component. + +

Sets hit area to the full area of the component.

+ id# @@ -77,7 +91,9 @@ 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 +101,9 @@ import CFormCheck from '@coreui/react/src/components/form/CFormCheck' {`boolean`} - Input Checkbox indeterminate Property. + +

Input Checkbox indeterminate Property.

+ inline# @@ -93,7 +111,9 @@ 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 +121,9 @@ import CFormCheck from '@coreui/react/src/components/form/CFormCheck' {`boolean`} - Set component validation state to invalid. + +

Set component validation state to invalid.

+ label# @@ -109,7 +131,9 @@ 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# @@ -117,15 +141,19 @@ import CFormCheck from '@coreui/react/src/components/form/CFormCheck' {`boolean`} - Put checkboxes or radios on the opposite side. + +

Put checkboxes or radios on the opposite side.

+ - - tooltipFeedback#4.2.0+ + + tooltipFeedback#4.2.0+ undefined {`boolean`} - Display validation feedback in a styled tooltip. + +

Display validation feedback in a styled tooltip.

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

Specifies the type of component.

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

Set component validation state to valid.

+ diff --git a/packages/docs/content/api/CFormControlValidation.api.mdx b/packages/docs/content/api/CFormControlValidation.api.mdx index be49958a..49863167 100644 --- a/packages/docs/content/api/CFormControlValidation.api.mdx +++ b/packages/docs/content/api/CFormControlValidation.api.mdx @@ -21,31 +21,39 @@ import CFormControlValidation from '@coreui/react/src/components/form/CFormContr {`ReactNode`} - Provide valuable, actionable feedback. + +

Provide valuable, actionable feedback.

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

Provide valuable, actionable feedback.

+ - - feedbackValid#4.2.0+ + + feedbackValid#4.2.0+ undefined {`ReactNode`} - Provide valuable, actionable invalid feedback when using standard HTML form validation which applied two CSS pseudo-classes, {`:invalid`} and {`:valid`}. + +

Provide valuable, actionable invalid feedback when using standard HTML form validation which applied two CSS pseudo-classes, {`:invalid`} and {`:valid`}.

+ - - floatingLabel#4.2.0+ + + floatingLabel#4.2.0+ undefined {`ReactNode`} - Provide valuable, actionable valid feedback when using standard HTML form validation which applied two CSS pseudo-classes, {`:invalid`} and {`:valid`}. + +

Provide valuable, actionable valid feedback when using standard HTML form validation which applied two CSS pseudo-classes, {`:invalid`} and {`:valid`}.

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

Set component validation state to invalid.

+ - - tooltipFeedback#4.2.0+ + + tooltipFeedback#4.2.0+ undefined {`boolean`} - Display validation feedback in a styled tooltip. + +

Display validation feedback in a styled tooltip.

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

Set component validation state to valid.

+ diff --git a/packages/docs/content/api/CFormControlWrapper.api.mdx b/packages/docs/content/api/CFormControlWrapper.api.mdx index 49ab36b1..24b0d2ec 100644 --- a/packages/docs/content/api/CFormControlWrapper.api.mdx +++ b/packages/docs/content/api/CFormControlWrapper.api.mdx @@ -21,39 +21,49 @@ import CFormControlWrapper from '@coreui/react/src/components/form/CFormControlW {`ReactNode`} - Provide valuable, actionable feedback. + +

Provide valuable, actionable feedback.

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

Provide valuable, actionable feedback.

+ - - feedbackValid#4.2.0+ + + feedbackValid#4.2.0+ undefined {`ReactNode`} - Provide valuable, actionable invalid feedback when using standard HTML form validation which applied two CSS pseudo-classes, {`:invalid`} and {`:valid`}. + +

Provide valuable, actionable invalid feedback when using standard HTML form validation which applied two CSS pseudo-classes, {`:invalid`} and {`:valid`}.

+ - - floatingClassName#4.5.0+ + + floatingClassName#4.5.0+ undefined {`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+ + + floatingLabel#4.2.0+ undefined {`ReactNode`} - Provide valuable, actionable valid feedback when using standard HTML form validation which applied two CSS pseudo-classes, {`:invalid`} and {`:valid`}. + +

Provide valuable, actionable valid feedback when using standard HTML form validation which applied two CSS pseudo-classes, {`:invalid`} and {`:valid`}.

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

Set component validation state to invalid.

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

Add a caption for a component.

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

Add helper text to the component.

+ - - tooltipFeedback#4.2.0+ + + tooltipFeedback#4.2.0+ undefined {`boolean`} - Display validation feedback in a styled tooltip. + +

Display validation feedback in a styled tooltip.

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

Set component validation state to valid.

+ diff --git a/packages/docs/content/api/CFormFeedback.api.mdx b/packages/docs/content/api/CFormFeedback.api.mdx index 0ee22dde..db5b54fe 100644 --- a/packages/docs/content/api/CFormFeedback.api.mdx +++ b/packages/docs/content/api/CFormFeedback.api.mdx @@ -21,15 +21,19 @@ 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. + +

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

+ - - className# + + className# undefined {`string`} - A string of all className you want applied to the component. + +

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

+ invalid# @@ -37,7 +41,9 @@ import CFormFeedback from '@coreui/react/src/components/form/CFormFeedback' {`boolean`} - Method called immediately after the {`value`} prop changes. + +

Method called immediately after the {`value`} prop changes.

+ tooltip# @@ -45,7 +51,9 @@ 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 your form layout allows it, you can display validation feedback in a styled tooltip.

+ valid# @@ -53,7 +61,9 @@ import CFormFeedback from '@coreui/react/src/components/form/CFormFeedback' {`boolean`} - Set component validation state to valid. + +

Set component validation state to valid.

+ diff --git a/packages/docs/content/api/CFormFloating.api.mdx b/packages/docs/content/api/CFormFloating.api.mdx index 0ba29670..5f456c6c 100644 --- a/packages/docs/content/api/CFormFloating.api.mdx +++ b/packages/docs/content/api/CFormFloating.api.mdx @@ -15,13 +15,15 @@ import CFormFloating from '@coreui/react/src/components/form/CFormFloating' - - className# + + className# undefined {`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/CFormInput.api.mdx b/packages/docs/content/api/CFormInput.api.mdx index b69c5cfb..c1e48174 100644 --- a/packages/docs/content/api/CFormInput.api.mdx +++ b/packages/docs/content/api/CFormInput.api.mdx @@ -15,13 +15,15 @@ import CFormInput from '@coreui/react/src/components/form/CFormInput' - - className# + + className# undefined {`string`} - A string of all className you want applied to the component. + +

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

+ delay# @@ -29,7 +31,9 @@ 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 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.

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

Toggle the disabled state for the component.

+ feedback#4.2.0+ @@ -45,39 +51,49 @@ import CFormInput from '@coreui/react/src/components/form/CFormInput' {`ReactNode`} - Provide valuable, actionable feedback. + +

Provide valuable, actionable feedback.

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

Provide valuable, actionable feedback.

+ - - feedbackValid#4.2.0+ + + feedbackValid#4.2.0+ undefined {`ReactNode`} - Provide valuable, actionable invalid feedback when using standard HTML form validation which applied two CSS pseudo-classes, {`:invalid`} and {`:valid`}. + +

Provide valuable, actionable invalid feedback when using standard HTML form validation which applied two CSS pseudo-classes, {`:invalid`} and {`:valid`}.

+ - - floatingClassName#4.5.0+ + + floatingClassName#4.5.0+ undefined {`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+ + + floatingLabel#4.2.0+ undefined {`ReactNode`} - Provide valuable, actionable valid feedback when using standard HTML form validation which applied two CSS pseudo-classes, {`:invalid`} and {`:valid`}. + +

Provide valuable, actionable valid feedback when using standard HTML form validation which applied two CSS pseudo-classes, {`:invalid`} and {`:valid`}.

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

Set component validation state to invalid.

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

Add a caption for a component.

+ - - onChange# + + onChange# undefined {`ChangeEventHandler\`} - Method called immediately after the {`value`} prop changes. + +

Method called immediately after the {`value`} prop changes.

+ - - plainText# + + plainText# undefined {`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 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`}.

+ - - readOnly# + + readOnly# undefined {`boolean`} - Toggle the readonly state for the component. + +

Toggle the readonly state for the component.

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

Size the component small or large.

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

Add helper text to the component.

+ - - tooltipFeedback#4.2.0+ + + tooltipFeedback#4.2.0+ undefined {`boolean`} - Display validation feedback in a styled tooltip. + +

Display validation feedback in a styled tooltip.

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

Specifies the type of component.

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

Set component validation state to valid.

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

The {`value`} attribute of component.

+ diff --git a/packages/docs/content/api/CFormLabel.api.mdx b/packages/docs/content/api/CFormLabel.api.mdx index d6d7ab74..1f30c9e1 100644 --- a/packages/docs/content/api/CFormLabel.api.mdx +++ b/packages/docs/content/api/CFormLabel.api.mdx @@ -15,21 +15,25 @@ import CFormLabel from '@coreui/react/src/components/form/CFormLabel' - - className# + + className# undefined {`string`} - A string of all className you want applied to the component. + +

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

+ - - customClassName# + + customClassName# undefined {`string`} - A string of all className you want to be applied to the component, and override standard className value. + +

A string of all className you want to be applied to the component, and override standard className value.

+ diff --git a/packages/docs/content/api/CFormRange.api.mdx b/packages/docs/content/api/CFormRange.api.mdx index 65ea10c7..ef1a9732 100644 --- a/packages/docs/content/api/CFormRange.api.mdx +++ b/packages/docs/content/api/CFormRange.api.mdx @@ -15,13 +15,15 @@ import CFormRange from '@coreui/react/src/components/form/CFormRange' - - className# + + className# undefined {`string`} - A string of all className you want applied to the component. + +

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

+ disabled# @@ -29,7 +31,9 @@ import CFormRange from '@coreui/react/src/components/form/CFormRange' {`boolean`} - Toggle the disabled state for the component. + +

Toggle the disabled state for the component.

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

Add a caption for a component.

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

Specifies the maximum value for the component.

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

Specifies the minimum value for the component.

+ - - onChange# + + onChange# undefined {`ChangeEventHandler\`} - Method called immediately after the {`value`} prop changes. + +

Method called immediately after the {`value`} prop changes.

+ - - readOnly# + + readOnly# undefined {`boolean`} - Toggle the readonly state for the component. + +

Toggle the readonly state for the component.

+ step# @@ -77,7 +91,9 @@ 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 component.

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

The {`value`} attribute of component.

+ diff --git a/packages/docs/content/api/CFormSelect.api.mdx b/packages/docs/content/api/CFormSelect.api.mdx index 105db26a..90343476 100644 --- a/packages/docs/content/api/CFormSelect.api.mdx +++ b/packages/docs/content/api/CFormSelect.api.mdx @@ -15,13 +15,15 @@ import CFormSelect from '@coreui/react/src/components/form/CFormSelect' - - className# + + className# undefined {`string`} - A string of all className you want applied to the component. + +

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

+ feedback#4.2.0+ @@ -29,47 +31,59 @@ import CFormSelect from '@coreui/react/src/components/form/CFormSelect' {`ReactNode`} - Provide valuable, actionable feedback. + +

Provide valuable, actionable feedback.

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

Provide valuable, actionable feedback.

+ - - feedbackValid#4.2.0+ + + feedbackValid#4.2.0+ undefined {`ReactNode`} - Provide valuable, actionable invalid feedback when using standard HTML form validation which applied two CSS pseudo-classes, {`:invalid`} and {`:valid`}. + +

Provide valuable, actionable invalid feedback when using standard HTML form validation which applied two CSS pseudo-classes, {`:invalid`} and {`:valid`}.

+ - - floatingClassName#4.5.0+ + + floatingClassName#4.5.0+ undefined {`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+ + + floatingLabel#4.2.0+ undefined {`ReactNode`} - Provide valuable, actionable valid feedback when using standard HTML form validation which applied two CSS pseudo-classes, {`:invalid`} and {`:valid`}. + +

Provide valuable, actionable valid feedback when using standard HTML form validation which applied two CSS pseudo-classes, {`:invalid`} and {`:valid`}.

+ - - htmlSize# + + htmlSize# undefined {`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 +91,9 @@ import CFormSelect from '@coreui/react/src/components/form/CFormSelect' {`boolean`} - Set component validation state to invalid. + +

Set component validation state to invalid.

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

Add a caption for a component.

+ - - onChange# + + onChange# undefined {`ChangeEventHandler\`} - Method called immediately after the {`value`} prop changes. + +

Method called immediately after the {`value`} prop changes.

+ options# @@ -101,7 +121,14 @@ 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`}.
+Examples:

+
    +
  • {`options={[{ value: 'js', label: 'JavaScript' }, { value: 'html', label: 'HTML', disabled: true }]}`}
  • +
  • {`options={['js', 'html']}`}
  • +
+ size# @@ -109,7 +136,9 @@ import CFormSelect from '@coreui/react/src/components/form/CFormSelect' {`"sm"`}, {`"lg"`} - Size the component small or large. + +

Size the component small or large.

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

Add helper text to the component.

+ - - tooltipFeedback#4.2.0+ + + tooltipFeedback#4.2.0+ undefined {`boolean`} - Display validation feedback in a styled tooltip. + +

Display validation feedback in a styled tooltip.

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

Set component validation state to valid.

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

The {`value`} attribute of component.

+ diff --git a/packages/docs/content/api/CFormSwitch.api.mdx b/packages/docs/content/api/CFormSwitch.api.mdx index 5c420a83..415810d4 100644 --- a/packages/docs/content/api/CFormSwitch.api.mdx +++ b/packages/docs/content/api/CFormSwitch.api.mdx @@ -15,13 +15,15 @@ import CFormSwitch from '@coreui/react/src/components/form/CFormSwitch' - - className# + + className# undefined {`string`} - A string of all className you want applied to the component. + +

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

+ id# @@ -29,7 +31,9 @@ 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 global attribute defines an identifier (ID) that must be unique in the whole document.

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

Set component validation state to invalid.

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

The element represents a caption for a component.

+ reverse# @@ -53,7 +61,9 @@ import CFormSwitch from '@coreui/react/src/components/form/CFormSwitch' {`boolean`} - Put switch on the opposite side. + +

Put switch on the opposite side.

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

Size the component large or extra large. Works only with {`switch`}.

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

Specifies the type of component.

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

Set component validation state to valid.

+ diff --git a/packages/docs/content/api/CFormText.api.mdx b/packages/docs/content/api/CFormText.api.mdx index 2f666b98..d029eefb 100644 --- a/packages/docs/content/api/CFormText.api.mdx +++ b/packages/docs/content/api/CFormText.api.mdx @@ -21,15 +21,19 @@ 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. + +

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

+ - - className# + + className# undefined {`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/CFormTextarea.api.mdx b/packages/docs/content/api/CFormTextarea.api.mdx index 6f831f59..8618fcb7 100644 --- a/packages/docs/content/api/CFormTextarea.api.mdx +++ b/packages/docs/content/api/CFormTextarea.api.mdx @@ -15,13 +15,15 @@ import CFormTextarea from '@coreui/react/src/components/form/CFormTextarea' - - className# + + className# undefined {`string`} - A string of all className you want applied to the component. + +

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

+ disabled# @@ -29,7 +31,9 @@ import CFormTextarea from '@coreui/react/src/components/form/CFormTextarea' {`boolean`} - Toggle the disabled state for the component. + +

Toggle the disabled state for the component.

+ feedback#4.2.0+ @@ -37,39 +41,49 @@ import CFormTextarea from '@coreui/react/src/components/form/CFormTextarea' {`ReactNode`} - Provide valuable, actionable feedback. + +

Provide valuable, actionable feedback.

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

Provide valuable, actionable feedback.

+ - - feedbackValid#4.2.0+ + + feedbackValid#4.2.0+ undefined {`ReactNode`} - Provide valuable, actionable invalid feedback when using standard HTML form validation which applied two CSS pseudo-classes, {`:invalid`} and {`:valid`}. + +

Provide valuable, actionable invalid feedback when using standard HTML form validation which applied two CSS pseudo-classes, {`:invalid`} and {`:valid`}.

+ - - floatingClassName#4.5.0+ + + floatingClassName#4.5.0+ undefined {`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+ + + floatingLabel#4.2.0+ undefined {`ReactNode`} - Provide valuable, actionable valid feedback when using standard HTML form validation which applied two CSS pseudo-classes, {`:invalid`} and {`:valid`}. + +

Provide valuable, actionable valid feedback when using standard HTML form validation which applied two CSS pseudo-classes, {`:invalid`} and {`:valid`}.

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

Set component validation state to invalid.

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

Add a caption for a component.

+ - - onChange# + + onChange# undefined {`ChangeEventHandler\`} - Method called immediately after the {`value`} prop changes. + +

Method called immediately after the {`value`} prop changes.

+ - - plainText# + + plainText# undefined {`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 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`}.

+ - - readOnly# + + readOnly# undefined {`boolean`} - Toggle the readonly state for the component. + +

Toggle the readonly state for the component.

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

Add helper text to the component.

+ - - tooltipFeedback#4.2.0+ + + tooltipFeedback#4.2.0+ undefined {`boolean`} - Display validation feedback in a styled tooltip. + +

Display validation feedback in a styled tooltip.

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

Set component validation state to valid.

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

The {`value`} attribute of component.

+ diff --git a/packages/docs/content/api/CHeader.api.mdx b/packages/docs/content/api/CHeader.api.mdx index 692cee33..2b225673 100644 --- a/packages/docs/content/api/CHeader.api.mdx +++ b/packages/docs/content/api/CHeader.api.mdx @@ -15,13 +15,15 @@ import CHeader from '@coreui/react/src/components/header/CHeader' - - className# + + className# undefined {`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..abfd6005 100644 --- a/packages/docs/content/api/CHeaderBrand.api.mdx +++ b/packages/docs/content/api/CHeaderBrand.api.mdx @@ -21,15 +21,19 @@ 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# + + className# undefined {`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..78046399 100644 --- a/packages/docs/content/api/CHeaderDivider.api.mdx +++ b/packages/docs/content/api/CHeaderDivider.api.mdx @@ -15,13 +15,15 @@ import CHeaderDivider from '@coreui/react/src/components/header/CHeaderDivider' - - className# + + className# undefined {`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..6ce66614 100644 --- a/packages/docs/content/api/CHeaderNav.api.mdx +++ b/packages/docs/content/api/CHeaderNav.api.mdx @@ -21,15 +21,19 @@ 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# + + className# undefined {`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..e4bed1f7 100644 --- a/packages/docs/content/api/CHeaderText.api.mdx +++ b/packages/docs/content/api/CHeaderText.api.mdx @@ -15,13 +15,15 @@ import CHeaderText from '@coreui/react/src/components/header/CHeaderText' - - className# + + className# undefined {`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..9294a16c 100644 --- a/packages/docs/content/api/CHeaderToggler.api.mdx +++ b/packages/docs/content/api/CHeaderToggler.api.mdx @@ -15,13 +15,15 @@ import CHeaderToggler from '@coreui/react/src/components/header/CHeaderToggler' - - className# + + className# undefined {`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..9555a4ff 100644 --- a/packages/docs/content/api/CIcon.api.mdx +++ b/packages/docs/content/api/CIcon.api.mdx @@ -1,8 +1,8 @@ ```jsx -import { CIcon } from '@coreui/..' +import { CIcon } from '@coreui/icons-react' // or -import CIcon from '@coreui/../node_modules/@coreui/icons-react/src/CIcon' +import CIcon from '@coreui/icons-react/src/CIcon' ```
@@ -15,29 +15,35 @@ import CIcon from '@coreui/../node_modules/@coreui/icons-react/src/CIcon' - - className# + + className# undefined {`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# + + customClassName# undefined {`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,15 +101,19 @@ 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# + + viewBox# undefined {`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..cbbc7a1c 100644 --- a/packages/docs/content/api/CIconSvg.api.mdx +++ b/packages/docs/content/api/CIconSvg.api.mdx @@ -15,21 +15,25 @@ import CIconSvg from '@coreui/icons-react/src/CIconSvg' - - className# + + className# undefined {`string`} - A string of all className you want applied to the component. + +

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

+ - - customClassName# + + customClassName# undefined {`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,10 +71,10 @@ 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.

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

Set the horizontal aligment.

+ - - className# + + className# undefined {`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..44487540 100644 --- a/packages/docs/content/api/CInputGroup.api.mdx +++ b/packages/docs/content/api/CInputGroup.api.mdx @@ -15,13 +15,15 @@ import CInputGroup from '@coreui/react/src/components/form/CInputGroup' - - className# + + className# undefined {`string`} - A string of all className you want applied to the component. + +

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

+ size# @@ -29,7 +31,9 @@ import CInputGroup from '@coreui/react/src/components/form/CInputGroup' {`"sm"`}, {`"lg"`} - Size the component small or large. + +

Size the component small or large.

+ diff --git a/packages/docs/content/api/CInputGroupText.api.mdx b/packages/docs/content/api/CInputGroupText.api.mdx index 7333ae46..49bcb81e 100644 --- a/packages/docs/content/api/CInputGroupText.api.mdx +++ b/packages/docs/content/api/CInputGroupText.api.mdx @@ -21,15 +21,19 @@ 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.

+ - - className# + + className# undefined {`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/CLink.api.mdx b/packages/docs/content/api/CLink.api.mdx index 297687c3..765d243f 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,15 +31,19 @@ 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# + + className# undefined {`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..9651e1c3 100644 --- a/packages/docs/content/api/CListGroup.api.mdx +++ b/packages/docs/content/api/CListGroup.api.mdx @@ -21,15 +21,19 @@ 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# + + className# undefined {`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., {``}).

+ 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..b80d7ab2 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,15 +31,19 @@ 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# + + className# undefined {`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..5431acb5 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,15 +31,19 @@ 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# + + className# undefined {`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,31 +81,39 @@ 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# + + onClose# undefined {`() => void`} - Callback fired when the component requests to be closed. + +

Callback fired when the component requests to be closed.

+ - - onClosePrevented# + + onClosePrevented# undefined {`() => void`} - Callback fired when the component requests to be closed. + +

Callback fired when the component requests to be closed.

+ - - onShow# + + onShow# undefined {`() => 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,15 +151,19 @@ 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# + + unmountOnClose# {`true`} {`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..4f47fab6 100644 --- a/packages/docs/content/api/CModalBody.api.mdx +++ b/packages/docs/content/api/CModalBody.api.mdx @@ -15,13 +15,15 @@ import CModalBody from '@coreui/react/src/components/modal/CModalBody' - - className# + + className# undefined {`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..45fc3002 100644 --- a/packages/docs/content/api/CModalContent.api.mdx +++ b/packages/docs/content/api/CModalContent.api.mdx @@ -15,13 +15,15 @@ import CModalContent from '@coreui/react/src/components/modal/CModalContent' - - className# + + className# undefined {`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..a0486d4e 100644 --- a/packages/docs/content/api/CModalDialog.api.mdx +++ b/packages/docs/content/api/CModalDialog.api.mdx @@ -21,15 +21,19 @@ 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# + + className# undefined {`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..73ee5ccd 100644 --- a/packages/docs/content/api/CModalFooter.api.mdx +++ b/packages/docs/content/api/CModalFooter.api.mdx @@ -15,13 +15,15 @@ import CModalFooter from '@coreui/react/src/components/modal/CModalFooter' - - className# + + className# undefined {`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..0dddfa96 100644 --- a/packages/docs/content/api/CModalHeader.api.mdx +++ b/packages/docs/content/api/CModalHeader.api.mdx @@ -15,21 +15,25 @@ import CModalHeader from '@coreui/react/src/components/modal/CModalHeader' - - className# + + className# undefined {`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# + + closeButton# {`true`} {`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..9b14bbb1 100644 --- a/packages/docs/content/api/CModalTitle.api.mdx +++ b/packages/docs/content/api/CModalTitle.api.mdx @@ -21,15 +21,19 @@ 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# + + className# undefined {`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..f87d8e1e 100644 --- a/packages/docs/content/api/CNav.api.mdx +++ b/packages/docs/content/api/CNav.api.mdx @@ -21,15 +21,19 @@ 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# + + className# undefined {`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..59506032 100644 --- a/packages/docs/content/api/CNavGroup.api.mdx +++ b/packages/docs/content/api/CNavGroup.api.mdx @@ -21,15 +21,19 @@ 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# + + className# undefined {`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..eaca90f5 100644 --- a/packages/docs/content/api/CNavGroupItems.api.mdx +++ b/packages/docs/content/api/CNavGroupItems.api.mdx @@ -21,15 +21,19 @@ 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# + + className# undefined {`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..e635d32c 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,15 +31,19 @@ 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# + + className# undefined {`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..d6f838e3 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,15 +31,19 @@ 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# + + className# undefined {`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..f9489cb0 100644 --- a/packages/docs/content/api/CNavTitle.api.mdx +++ b/packages/docs/content/api/CNavTitle.api.mdx @@ -21,15 +21,19 @@ 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# + + className# undefined {`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..662d80c2 100644 --- a/packages/docs/content/api/CNavbar.api.mdx +++ b/packages/docs/content/api/CNavbar.api.mdx @@ -21,15 +21,19 @@ 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# + + className# undefined {`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,15 +41,19 @@ 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# + + colorScheme# undefined {`"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..bdd3e6f7 100644 --- a/packages/docs/content/api/CNavbarBrand.api.mdx +++ b/packages/docs/content/api/CNavbarBrand.api.mdx @@ -21,15 +21,19 @@ 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# + + className# undefined {`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..f7e05623 100644 --- a/packages/docs/content/api/CNavbarNav.api.mdx +++ b/packages/docs/content/api/CNavbarNav.api.mdx @@ -21,15 +21,19 @@ 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# + + className# undefined {`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..17ce32d4 100644 --- a/packages/docs/content/api/CNavbarText.api.mdx +++ b/packages/docs/content/api/CNavbarText.api.mdx @@ -15,13 +15,15 @@ import CNavbarText from '@coreui/react/src/components/navbar/CNavbarText' - - className# + + className# undefined {`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..7470ace3 100644 --- a/packages/docs/content/api/CNavbarToggler.api.mdx +++ b/packages/docs/content/api/CNavbarToggler.api.mdx @@ -15,13 +15,15 @@ import CNavbarToggler from '@coreui/react/src/components/navbar/CNavbarToggler' - - className# + + className# undefined {`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..e2377df9 100644 --- a/packages/docs/content/api/COffcanvas.api.mdx +++ b/packages/docs/content/api/COffcanvas.api.mdx @@ -21,15 +21,19 @@ 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# + + className# undefined {`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,23 +51,29 @@ 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# + + onHide# undefined {`() => void`} - Callback fired when the component requests to be hidden. + +

Callback fired when the component requests to be hidden.

+ - - onShow# + + onShow# undefined {`() => 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..29c8479a 100644 --- a/packages/docs/content/api/COffcanvasBody.api.mdx +++ b/packages/docs/content/api/COffcanvasBody.api.mdx @@ -15,13 +15,15 @@ import COffcanvasBody from '@coreui/react/src/components/offcanvas/COffcanvasBod - - className# + + className# undefined {`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..c896e1b1 100644 --- a/packages/docs/content/api/COffcanvasHeader.api.mdx +++ b/packages/docs/content/api/COffcanvasHeader.api.mdx @@ -15,13 +15,15 @@ import COffcanvasHeader from '@coreui/react/src/components/offcanvas/COffcanvasH - - className# + + className# undefined {`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..b22e4b6c 100644 --- a/packages/docs/content/api/COffcanvasTitle.api.mdx +++ b/packages/docs/content/api/COffcanvasTitle.api.mdx @@ -21,15 +21,19 @@ 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# + + className# undefined {`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..d969c7f0 100644 --- a/packages/docs/content/api/CPagination.api.mdx +++ b/packages/docs/content/api/CPagination.api.mdx @@ -21,15 +21,19 @@ 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# + + className# undefined {`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..83565b12 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,15 +31,19 @@ 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# + + className# undefined {`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..752bc171 100644 --- a/packages/docs/content/api/CPopover.api.mdx +++ b/packages/docs/content/api/CPopover.api.mdx @@ -21,15 +21,19 @@ 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# + + className# undefined {`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,15 +61,19 @@ 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+ + + fallbackPlacements#4.9.0+ {`['top', 'right', 'bottom', 'left']`} {`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,23 +81,29 @@ 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# + + onHide# undefined {`() => void`} - Callback fired when the component requests to be hidden. + +

Callback fired when the component requests to be hidden.

+ - - onShow# + + onShow# undefined {`() => 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..3012a109 100644 --- a/packages/docs/content/api/CProgress.api.mdx +++ b/packages/docs/content/api/CProgress.api.mdx @@ -21,15 +21,19 @@ 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# + + className# undefined {`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,15 +51,19 @@ 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 {``} will automatically resize accordingly.

+ - - progressBarClassName#4.9.0+ + + progressBarClassName#4.9.0+ undefined {`string`} - A string of all className you want applied to the \ component. + +

A string of all className you want applied to the {``} 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..8a5e99f7 100644 --- a/packages/docs/content/api/CProgressBar.api.mdx +++ b/packages/docs/content/api/CProgressBar.api.mdx @@ -21,15 +21,19 @@ 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# + + className# undefined {`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..81f146f0 100644 --- a/packages/docs/content/api/CProgressStacked.api.mdx +++ b/packages/docs/content/api/CProgressStacked.api.mdx @@ -15,13 +15,15 @@ import CProgressStacked from '@coreui/react/src/components/progress/CProgressSta - - className# + + className# undefined {`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..46a6b5b6 100644 --- a/packages/docs/content/api/CRow.api.mdx +++ b/packages/docs/content/api/CRow.api.mdx @@ -15,13 +15,15 @@ import CRow from '@coreui/react/src/components/grid/CRow' - - className# + + className# undefined {`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..a0ae96ee 100644 --- a/packages/docs/content/api/CSidebar.api.mdx +++ b/packages/docs/content/api/CSidebar.api.mdx @@ -15,21 +15,25 @@ import CSidebar from '@coreui/react/src/components/sidebar/CSidebar' - - className# + + className# undefined {`string`} - A string of all className you want applied to the component. + +

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

+ - - colorScheme# + + colorScheme# undefined {`'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,31 +41,39 @@ import CSidebar from '@coreui/react/src/components/sidebar/CSidebar' {`boolean`} - Make sidebar narrow. + +

Make sidebar narrow.

+ - - onHide# + + onHide# undefined {`() => void`} - Callback fired when the component requests to be hidden. + +

Callback fired when the component requests to be hidden.

+ - - onShow# + + onShow# undefined {`() => void`} - Callback fired when the component requests to be shown. + +

Callback fired when the component requests to be shown.

+ - - onVisibleChange# + + onVisibleChange# undefined {`(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..3494b5d8 100644 --- a/packages/docs/content/api/CSidebarBrand.api.mdx +++ b/packages/docs/content/api/CSidebarBrand.api.mdx @@ -21,15 +21,19 @@ 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# + + className# undefined {`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..745c2f6c 100644 --- a/packages/docs/content/api/CSidebarFooter.api.mdx +++ b/packages/docs/content/api/CSidebarFooter.api.mdx @@ -15,13 +15,15 @@ import CSidebarFooter from '@coreui/react/src/components/sidebar/CSidebarFooter' - - className# + + className# undefined {`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..4379c56f 100644 --- a/packages/docs/content/api/CSidebarHeader.api.mdx +++ b/packages/docs/content/api/CSidebarHeader.api.mdx @@ -15,13 +15,15 @@ import CSidebarHeader from '@coreui/react/src/components/sidebar/CSidebarHeader' - - className# + + className# undefined {`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..7bcb30df 100644 --- a/packages/docs/content/api/CSidebarNav.api.mdx +++ b/packages/docs/content/api/CSidebarNav.api.mdx @@ -21,15 +21,19 @@ 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# + + className# undefined {`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..59755018 100644 --- a/packages/docs/content/api/CSidebarToggler.api.mdx +++ b/packages/docs/content/api/CSidebarToggler.api.mdx @@ -15,13 +15,15 @@ import CSidebarToggler from '@coreui/react/src/components/sidebar/CSidebarToggle - - className# + + className# undefined {`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..159c58a9 100644 --- a/packages/docs/content/api/CSpinner.api.mdx +++ b/packages/docs/content/api/CSpinner.api.mdx @@ -21,15 +21,19 @@ 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# + + className# undefined {`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,15 +61,19 @@ 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# + + visuallyHiddenLabel# {`Loading...`} {`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..138639d0 100644 --- a/packages/docs/content/api/CTab.api.mdx +++ b/packages/docs/content/api/CTab.api.mdx @@ -15,13 +15,15 @@ import CTab from '@coreui/react/src/components/tabs/CTab' - - className# + + className# undefined {`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,15 +31,19 @@ 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# + + itemKey# undefined {`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..467a7d97 100644 --- a/packages/docs/content/api/CTabContent.api.mdx +++ b/packages/docs/content/api/CTabContent.api.mdx @@ -15,13 +15,15 @@ import CTabContent from '@coreui/react/src/components/tabs/CTabContent' - - className# + + className# undefined {`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..2be37d8c 100644 --- a/packages/docs/content/api/CTabList.api.mdx +++ b/packages/docs/content/api/CTabList.api.mdx @@ -15,13 +15,15 @@ import CTabList from '@coreui/react/src/components/tabs/CTabList' - - className# + + className# undefined {`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..197dc805 100644 --- a/packages/docs/content/api/CTabPane.api.mdx +++ b/packages/docs/content/api/CTabPane.api.mdx @@ -15,29 +15,35 @@ import CTabPane from '@coreui/react/src/components/tabs/CTabPane' - - className# + + className# undefined {`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# + + onHide# undefined {`() => void`} - Callback fired when the component requests to be hidden. + +

Callback fired when the component requests to be hidden.

+ - - onShow# + + onShow# undefined {`() => 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..3b6f9bd6 100644 --- a/packages/docs/content/api/CTabPanel.api.mdx +++ b/packages/docs/content/api/CTabPanel.api.mdx @@ -15,37 +15,45 @@ import CTabPanel from '@coreui/react/src/components/tabs/CTabPanel' - - className# + + className# undefined {`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# + + itemKey# undefined {`string`}, {`number`} - Item key. + +

Item key.

+ - - onHide# + + onHide# undefined {`() => void`} - Callback fired when the component requests to be hidden. + +

Callback fired when the component requests to be hidden.

+ - - onShow# + + onShow# undefined {`() => 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..75db1ece 100644 --- a/packages/docs/content/api/CTable.api.mdx +++ b/packages/docs/content/api/CTable.api.mdx @@ -21,15 +21,19 @@ import CTable from '@coreui/react/src/components/table/CTable' {`string`} - Set the vertical aligment. + +

Set the vertical aligment.

+ - - borderColor# + + borderColor# undefined {`'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,23 +61,29 @@ 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+ + + captionTop#4.3.0+ undefined {`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# + + className# undefined {`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 {``}.

+ 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,31 +176,39 @@ 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 {``}.

+ - - stripedColumns#4.3.0+ + + stripedColumns#4.3.0+ undefined {`boolean`} - Add zebra-striping to any table column. + +

Add zebra-striping to any table column.

+ - - tableFootProps#4.3.0+ + + tableFootProps#4.3.0+ undefined {`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+ + + tableHeadProps#4.3.0+ undefined {`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..c056b40d 100644 --- a/packages/docs/content/api/CTableBody.api.mdx +++ b/packages/docs/content/api/CTableBody.api.mdx @@ -15,13 +15,15 @@ import CTableBody from '@coreui/react/src/components/table/CTableBody' - - className# + + className# undefined {`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..7dcc4370 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,15 +31,19 @@ import CTableDataCell from '@coreui/react/src/components/table/CTableDataCell' {`string`} - Set the vertical aligment. + +

Set the vertical aligment.

+ - - className# + + className# undefined {`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..02c7a033 100644 --- a/packages/docs/content/api/CTableFoot.api.mdx +++ b/packages/docs/content/api/CTableFoot.api.mdx @@ -15,13 +15,15 @@ import CTableFoot from '@coreui/react/src/components/table/CTableFoot' - - className# + + className# undefined {`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..b1473088 100644 --- a/packages/docs/content/api/CTableHead.api.mdx +++ b/packages/docs/content/api/CTableHead.api.mdx @@ -15,13 +15,15 @@ import CTableHead from '@coreui/react/src/components/table/CTableHead' - - className# + + className# undefined {`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..ec1078ab 100644 --- a/packages/docs/content/api/CTableHeaderCell.api.mdx +++ b/packages/docs/content/api/CTableHeaderCell.api.mdx @@ -15,13 +15,15 @@ import CTableHeaderCell from '@coreui/react/src/components/table/CTableHeaderCel - - className# + + className# undefined {`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..21c4cc31 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,15 +31,19 @@ import CTableRow from '@coreui/react/src/components/table/CTableRow' {`string`} - Set the vertical aligment. + +

Set the vertical aligment.

+ - - className# + + className# undefined {`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..7a3a0d19 100644 --- a/packages/docs/content/api/CTabs.api.mdx +++ b/packages/docs/content/api/CTabs.api.mdx @@ -15,29 +15,35 @@ import CTabs from '@coreui/react/src/components/tabs/CTabs' - - activeItemKey# + + activeItemKey# undefined {`string`}, {`number`} - The active item key. + +

The active item key.

+ - - className# + + className# undefined {`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# + + onChange# undefined {`(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..e05ba87d 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,15 +31,19 @@ import CToast from '@coreui/react/src/components/toast/CToast' {`boolean`} - Auto hide the toast. + +

Auto hide the toast.

+ - - className# + + className# undefined {`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,23 +61,29 @@ import CToast from '@coreui/react/src/components/toast/CToast' {`number`} - Delay hiding the toast (ms). + +

Delay hiding the toast (ms).

+ - - onClose# + + onClose# undefined {`(index: number) => void`} - Callback fired when the component requests to be closed. + +

Callback fired when the component requests to be closed.

+ - - onShow# + + onShow# undefined {`(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..467c581a 100644 --- a/packages/docs/content/api/CToastBody.api.mdx +++ b/packages/docs/content/api/CToastBody.api.mdx @@ -15,13 +15,15 @@ import CToastBody from '@coreui/react/src/components/toast/CToastBody' - - className# + + className# undefined {`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..6b865f4b 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,15 +31,19 @@ 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# + + className# undefined {`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..3ff5a3b0 --- /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..41200c16 --- /dev/null +++ b/packages/docs/content/components/modal/styling.mdx @@ -0,0 +1,35 @@ +--- +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 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..dc5a13de --- /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..70c6b9fa --- /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..2376135f --- /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..6356d37c --- /dev/null +++ b/packages/docs/content/components/navbar/index.mdx @@ -0,0 +1,154 @@ +--- +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 +--- + +## 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/bootstrap/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..f3f41df9 --- /dev/null +++ b/packages/docs/content/components/navbar/styling.mdx @@ -0,0 +1,47 @@ +--- +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 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.mdx b/packages/docs/content/components/navs-tabs.mdx deleted file mode 100644 index 86f52b5c..00000000 --- a/packages/docs/content/components/navs-tabs.mdx +++ /dev/null @@ -1,719 +0,0 @@ ---- -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 -other_frameworks: navs-tabs ---- - -import { useState } from 'react' - -import { - CDropdown, - CDropdownDivider, - CDropdownHeader, - CDropdownItem, - CDropdownItemPlain, - CDropdownMenu, - CDropdownToggle, - CNav, - CNavItem, - CNavLink, - CTabContent, - CTabPane, -} from '@coreui/react/src/index' - -## Base nav - -Navigation available in CoreUI for React share general markup and styles, from the base `.nav` class to the active and disabled states. Swap modifier classes to switch between each style. - -The base `` component is built with flexbox and provide a strong foundation for building all types of navigation components. It includes some style overrides (for working with lists), some link padding for larger hit areas, and basic disabled styling. - -```jsx preview - - - - Active - - - - Link - - - Link - - - - Disabled - - - -``` - -Classes are used throughout, so your markup can be super flexible. Use `