diff --git a/src/_nav.js b/src/_nav.js index 19d78f5..f6c6717 100644 --- a/src/_nav.js +++ b/src/_nav.js @@ -91,6 +91,11 @@ const _nav = [ name: 'Pagination', to: '/base/paginations', }, + { + component: CNavItem, + name: 'Placeholders', + to: '/base/placeholders', + }, { component: CNavItem, name: 'Popovers', diff --git a/src/routes.js b/src/routes.js index 9214d17..d409392 100644 --- a/src/routes.js +++ b/src/routes.js @@ -13,6 +13,7 @@ const Collapses = React.lazy(() => import('./views/base/collapses/Collapses')) const ListGroups = React.lazy(() => import('./views/base/list-groups/ListGroups')) const Navs = React.lazy(() => import('./views/base/navs/Navs')) const Paginations = React.lazy(() => import('./views/base/paginations/Paginations')) +const Placeholders = React.lazy(() => import('./views/base/placeholders/Placeholders')) const Popovers = React.lazy(() => import('./views/base/popovers/Popovers')) const Progress = React.lazy(() => import('./views/base/progress/Progress')) const Spinners = React.lazy(() => import('./views/base/spinners/Spinners')) @@ -64,6 +65,7 @@ const routes = [ { path: '/base/list-groups', name: 'List Groups', component: ListGroups }, { path: '/base/navs', name: 'Navs', component: Navs }, { path: '/base/paginations', name: 'Paginations', component: Paginations }, + { path: '/base/placeholders', name: 'Placeholders', component: Placeholders }, { path: '/base/popovers', name: 'Popovers', component: Popovers }, { path: '/base/progress', name: 'Progress', component: Progress }, { path: '/base/spinners', name: 'Spinners', component: Spinners }, diff --git a/src/views/base/placeholders/Placeholders.js b/src/views/base/placeholders/Placeholders.js new file mode 100644 index 0000000..99c88b7 --- /dev/null +++ b/src/views/base/placeholders/Placeholders.js @@ -0,0 +1,196 @@ +import React from 'react' +import { + CButton, + CCard, + CCardBody, + CCardHeader, + CCardImage, + CCardText, + CCardTitle, + CCol, + CPlaceholder, + CRow, +} from '@coreui/react' +import { DocsCallout, DocsExample } from 'src/components' + +import ReactImg from 'src/assets/images/react.jpg' + +const Placeholders = () => { + return ( + + + + + + + + React Placeholder + + +

+ In the example below, we take a typical card component and recreate it with + placeholders applied to create a "loading card". Size and proportions are the + same between the two. +

+ +
+ + + + Card title + + Some quick example text to build on the card title and make up the bulk of the + card's content. + + Go somewhere + + + + + Placeholder + + + + + + + + + + + + + + + + +
+
+
+
+ + + React Placeholder + + +

+ Create placeholders with the <CPlaceholder> component and a grid + column propx (e.g., xs={6}) to set the width. They can + replace the text inside an element or be added as a modifier class to an existing + component. +

+ + + + +
+
+ + + React Placeholder Width + + +

+ You can change the width through grid column classes, width utilities, or + inline styles. +

+ + + + + +
+
+ + + React Placeholder Color + + +

+ By default, the <CPlaceholder> uses currentColor. This + can be overridden with a custom color or utility class. +

+ + + + + + + + + + + + +
+
+ + + React Placeholder Sizing + + +

+ The size of <CPlaceholder>s are based on the typographic style of + the parent element. Customize them with size prop: lg,{' '} + sm, or xs. +

+ + + + + + +
+
+ + + React Placeholder Animation + + +

+ Animate placeholders with animation="glow" or{' '} + animation="wave" to better convey the perception of something + being actively loaded. +

+ + + + + + + + + +
+
+
+
+ ) +} + +export default Placeholders