├── .eslintignore ├── .eslintrc.js ├── .github └── workflows │ └── studio.yml ├── .gitignore ├── .husky └── commit-msg ├── .npmrc ├── .prettierrc.json ├── README.md ├── app.vue ├── assets └── fonts │ ├── dm-sans-all-400-normal.woff │ ├── dm-sans-all-500-normal.woff │ ├── dm-sans-all-700-normal.woff │ ├── dm-sans-latin-400-normal.woff2 │ ├── dm-sans-latin-500-normal.woff2 │ ├── dm-sans-latin-700-normal.woff2 │ ├── dm-sans-latin-ext-400-normal.woff2 │ ├── dm-sans-latin-ext-500-normal.woff2 │ ├── dm-sans-latin-ext-700-normal.woff2 │ ├── ibm-plex-mono-latin-400-normal.woff │ ├── ibm-plex-mono-latin-400-normal.woff2 │ ├── ibm-plex-mono-latin-ext-400-normal.woff │ └── ibm-plex-mono-latin-ext-400-normal.woff2 ├── commitlint.config.js ├── components.d.ts ├── components ├── ChakraLogo.vue ├── ChakraLogoIcon.vue ├── SponsorButton.server.vue ├── TheNavbar.vue ├── VersionSwitcher.tsx ├── backgrounds │ ├── dotted-background.server.tsx │ └── squared-background.tsx ├── content │ ├── CarbonAd.vue │ ├── CodeEditor.vue │ ├── DiscordBanner.vue │ ├── Editor │ │ ├── CodeEditorLayout.vue │ │ ├── CodeEditorParts.tsx │ │ ├── CodeHighlight.vue │ │ ├── code-container.tsx │ │ ├── code-highlight.tsx │ │ ├── copy-button.tsx │ │ └── editable-notice.tsx │ ├── FrameworkList │ │ ├── FrameworkCard.vue │ │ ├── FrameworkList.vue │ │ ├── NuxtLogo.vue │ │ └── VueLogo.vue │ ├── common │ │ ├── Code.vue │ │ ├── Showcase.vue │ │ ├── Stack.vue │ │ └── Wrap.vue │ ├── examples │ │ ├── accordion │ │ │ ├── ExpandedStyle.vue │ │ │ └── SimpleAccordion.vue │ │ ├── alert │ │ │ ├── AccentAlert.vue │ │ │ ├── Alert.vue │ │ │ ├── BaseAlert.vue │ │ │ ├── Composition.vue │ │ │ ├── CompositionExample2.vue │ │ │ ├── IconAlert.vue │ │ │ └── StatusAlert.vue │ │ ├── aspectratio │ │ │ ├── AspectRatioEImage.vue │ │ │ ├── AspectRatioEMap.vue │ │ │ └── AspectRatioEVideo.vue │ │ ├── avatar │ │ │ ├── Avatar.vue │ │ │ ├── AvatarBadge.vue │ │ │ └── AvatarGroup.vue │ │ ├── badge │ │ │ ├── BaseBadge.vue │ │ │ ├── ColorBadge.vue │ │ │ ├── CompositionBadge.vue │ │ │ ├── CompositionBadgeTwo.vue │ │ │ └── VariantBadge.vue │ │ ├── breadcrumb │ │ │ ├── BreadcrumbComposition.vue │ │ │ ├── DefaultSeparator.vue │ │ │ ├── FunctionalSeparator.vue │ │ │ ├── SimpleBreadcrumb.vue │ │ │ ├── SlotSeparator.vue │ │ │ └── StringSeparator.vue │ │ ├── button │ │ │ ├── BaseButton.vue │ │ │ ├── ButtonComposition.vue │ │ │ ├── ButtonGroup.vue │ │ │ ├── CustomButton.vue │ │ │ ├── IconButton.vue │ │ │ ├── LoadingButton.vue │ │ │ ├── SizesButton.vue │ │ │ └── VariantButton.vue │ │ ├── center │ │ │ ├── IconCenter.vue │ │ │ ├── SimpleCenter.vue │ │ │ └── SquareAndCircle.vue │ │ ├── checkbox │ │ │ ├── Checkbox.vue │ │ │ ├── CheckboxGroup.vue │ │ │ ├── ColorsCheckbox.vue │ │ │ ├── DisabledCheckbox.vue │ │ │ ├── Indeterminate.vue │ │ │ └── SizesCheckbox.vue │ │ ├── closebutton │ │ │ ├── CloseButton.vue │ │ │ └── CloseButtonSizes.vue │ │ ├── code │ │ │ ├── ColorsCode.vue │ │ │ ├── SimpleCode.vue │ │ │ └── VariantCode.vue │ │ ├── collapse │ │ │ ├── HeightCollapse.vue │ │ │ └── SimpleCollapse.vue │ │ ├── flex │ │ │ ├── CompareFlex.vue │ │ │ ├── SignUpFlex.vue │ │ │ ├── SimpleFlex.vue │ │ │ └── SpacerFlex.vue │ │ ├── heading │ │ │ ├── BasicHeading.vue │ │ │ ├── CompositionHeading.vue │ │ │ ├── OverrideHeading.vue │ │ │ ├── SizesHeading.vue │ │ │ └── TruncatedHeading.vue │ │ ├── icons │ │ │ └── Icon.vue │ │ ├── image │ │ │ ├── BoxImage.vue │ │ │ ├── FallbackImage.vue │ │ │ ├── RoundedImage.vue │ │ │ └── SimpleImage.vue │ │ ├── input │ │ │ ├── BasicInput.vue │ │ │ ├── InputAddon.vue │ │ │ ├── InputAppearance.vue │ │ │ ├── InputDate.vue │ │ │ ├── InputElements.vue │ │ │ ├── InputFocus.vue │ │ │ ├── InputHtmlSize.vue │ │ │ ├── InputPassword.vue │ │ │ ├── InputPlaceholderStyle.vue │ │ │ └── SizeInput.vue │ │ ├── simplegrid │ │ │ ├── SimpleGridAutoResponsive.vue │ │ │ ├── SimpleGridExample.vue │ │ │ ├── SimpleGridResponsive.vue │ │ │ └── SimpleGridSpacing.vue │ │ ├── stack │ │ │ ├── BasicStack.vue │ │ │ ├── HorizontalStack.vue │ │ │ ├── HorizontalStackTwo.vue │ │ │ ├── HtmlStack.vue │ │ │ └── ReverseStack.vue │ │ ├── tabs │ │ │ ├── ColoredTabs.vue │ │ │ ├── FittedTabs.vue │ │ │ ├── SimpleTabs.vue │ │ │ ├── SizesTabs.vue │ │ │ └── VariantTabs.vue │ │ ├── tag │ │ │ ├── Tag.vue │ │ │ ├── TagCloseButton.vue │ │ │ ├── TagLabel.vue │ │ │ ├── TagLeftIcon.vue │ │ │ └── TagRightIcon.vue │ │ └── wrap │ │ │ ├── AlignWrap.vue │ │ │ ├── JustifyWrap.vue │ │ │ ├── SimpleWrap.vue │ │ │ └── SpacingWrap.vue │ └── prose │ │ ├── ProseA.vue │ │ ├── ProseBlockquote.vue │ │ ├── ProseCodeInline.vue │ │ ├── ProseEm.vue │ │ ├── ProseH1.vue │ │ ├── ProseH2.vue │ │ ├── ProseH3.vue │ │ ├── ProseH4.vue │ │ ├── ProseH5.vue │ │ ├── ProseLi.vue │ │ ├── ProseOl.vue │ │ ├── ProseP.vue │ │ ├── ProseTable.vue │ │ ├── ProseTd.vue │ │ ├── ProseTh.vue │ │ └── ProseUl.vue ├── home │ ├── ComponentApi.server.vue │ ├── DiscordHero.server.vue │ ├── Footer.server.vue │ ├── PilersHero.server.vue │ ├── StartHero.server.vue │ └── features.server.vue ├── icons │ ├── accessibility-icon.tsx │ ├── composable-icon.tsx │ ├── external-link-icon.tsx │ ├── moon-icon.tsx │ ├── state-machine-icon.tsx │ ├── sun-icon.tsx │ └── theme-icon.tsx └── navigation │ ├── ProseCode.vue │ ├── doc-link.vue │ ├── sidebar.vue │ ├── table-of-contents.vue │ └── top-navigation.vue ├── config └── site-config.ts ├── content ├── 1.getting-started │ ├── 0.index.md │ ├── 1.installation.md │ ├── 2.nuxt.md │ ├── 3.design-principles.md │ └── _dir.yml ├── 2.styled-system │ ├── 0.index.md │ ├── 1.style-props.md │ └── 2.responsive-styles.md └── 4.components │ ├── accordion.md │ ├── alert.md │ ├── aspectratio.md │ ├── avatar.md │ ├── badge.md │ ├── breadcrumb.md │ ├── button.md │ ├── center.md │ ├── checkbox.md │ ├── closebutton.md │ ├── code.md │ ├── collapse.md │ ├── flex.md │ ├── heading.md │ ├── image.md │ ├── input.md │ ├── simplegrid.md │ ├── stack.md │ ├── tabs.md │ ├── tag.md │ └── wrap.md ├── env.d.ts ├── layouts ├── default.vue └── home.vue ├── middleware └── redirection.middleware.ts ├── modules └── content-chunks.module.ts ├── nuxt.config.ts ├── package.json ├── pages ├── [...slug].vue └── index.vue ├── pnpm-lock.yaml ├── public └── favicon.ico ├── server └── routes │ └── sitemap.xml.ts ├── styles ├── prism.scss └── typography │ ├── 400.css │ ├── 500.css │ ├── 700.css │ └── all.css ├── theme ├── components │ ├── button.ts │ └── index.ts ├── global-styles.ts ├── index.ts ├── layer-styles.ts ├── semantic-tokens.ts └── text-styles.ts ├── tsconfig.json └── utils └── icons.ts /.eslintignore: -------------------------------------------------------------------------------- 1 | dist 2 | .output 3 | .nuxt 4 | .idea 5 | -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | env: { 3 | node: true 4 | }, 5 | extends: [ 6 | 'plugin:vue/vue3-recommended', 7 | '@nuxtjs/eslint-config-typescript', 8 | 'prettier' 9 | ], 10 | rules: { 11 | // override/add rules settings here, such as: 12 | // 'vue/no-unused-vars': 'error' 13 | 'vue/multi-word-component-names': 'off' 14 | } 15 | }; 16 | -------------------------------------------------------------------------------- /.github/workflows/studio.yml: -------------------------------------------------------------------------------- 1 | 2 | name: studio-nuxt-build 3 | run-name: studio nuxt build 4 | 5 | on: 6 | # Runs on pushes targeting the default branch 7 | push: 8 | branches: 9 | - 'main' 10 | 11 | # Allows you to run this workflow manually from the Actions tab 12 | workflow_dispatch: 13 | 14 | # Add write workflow permissions 15 | permissions: 16 | contents: write 17 | 18 | # Allow one concurrent deployment 19 | concurrency: 20 | group: "pages" 21 | cancel-in-progress: true 22 | 23 | jobs: 24 | # Build job 25 | build-and-deploy: 26 | runs-on: ${{ matrix.os }} 27 | defaults: 28 | run: 29 | working-directory: . 30 | 31 | strategy: 32 | matrix: 33 | os: [ubuntu-latest] 34 | node: [18] 35 | 36 | steps: 37 | - name: Checkout 38 | uses: actions/checkout@v4 39 | 40 | - name: Identify package manager 41 | id: pkgman 42 | run: | 43 | cache=`[ -f "./pnpm-lock.yaml" ] && echo "pnpm" || ([ -f "./package-lock.json" ] && echo "npm" || ([ -f "./yarn.lock" ] && echo "yarn" || echo ""))` 44 | package_manager=`[ ! -z "$cache" ] && echo "$cache" || echo "pnpm"` 45 | echo "cache=$cache" >> $GITHUB_OUTPUT 46 | echo "package_manager=$package_manager" >> $GITHUB_OUTPUT 47 | 48 | - uses: pnpm/action-setup@v2.4.0 49 | if: ${{ steps.pkgman.outputs.package_manager == 'pnpm' }} 50 | name: Install pnpm 51 | id: pnpm-install 52 | with: 53 | version: 8 54 | 55 | - uses: actions/setup-node@v3 56 | with: 57 | version: ${{ matrix.node }} 58 | cache: ${{ steps.pkgman.outputs.cache }} 59 | 60 | - name: Install dependencies 61 | run: ${{ steps.pkgman.outputs.package_manager }} install 62 | 63 | - name: Install @nuxthq/studio 64 | run: ${{ steps.pkgman.outputs.package_manager }} add -D @nuxthq/studio 65 | 66 | - name: Create .nuxtrc 67 | run: echo $'\nautoImport=true\nmodules[]=@nuxthq/studio' >> .nuxtrc 68 | 69 | - name: Generate 70 | run: npx nuxi generate 71 | env: 72 | NUXT_PUBLIC_STUDIO_API_URL: https://api.nuxt.studio 73 | NUXT_PUBLIC_STUDIO_TOKENS: 941a11660f3736aed07c48f6d809a8ccf1b150df7626d5ad24bc6464b66022ad 74 | 75 | - name: Add .nojekyll file 76 | run: touch .output/public/.nojekyll 77 | 78 | # Deployment job 79 | - name: Deploy 🚀 80 | uses: JamesIves/github-pages-deploy-action@v4 81 | with: 82 | folder: ./.output/public 83 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | *.log* 3 | .nuxt 4 | .nitro 5 | .cache 6 | .output 7 | .env 8 | .idea 9 | .yarn 10 | .DS_Store 11 | dist 12 | .DS_Store 13 | -------------------------------------------------------------------------------- /.husky/commit-msg: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | . "$(dirname -- "$0")/_/husky.sh" 3 | 4 | npx --no -- commitlint --edit 5 | -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | shamefully-hoist=true 2 | -------------------------------------------------------------------------------- /.prettierrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "endOfLine": "auto", 3 | "singleQuote": true, 4 | "trailingComma": "none", 5 | "arrowParens": "always" 6 | } 7 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Chakra UI Vue Next Documentation Site 2 | 3 | Look at the [Content documentation](https://content-v2.nuxtjs.org/) to learn more. 4 | 5 | ## Setup 6 | 7 | Make sure to install the dependencies: 8 | 9 | ```bash 10 | # pnpm 11 | pnpm install --shamefully-hoist 12 | ``` 13 | 14 | ## Development Server 15 | 16 | Start the development server on http://localhost:3000 17 | 18 | ```bash 19 | pnpm run dev 20 | ``` 21 | 22 | ## Production 23 | 24 | Build the application for production: 25 | 26 | ```bash 27 | pnpm run build 28 | ``` 29 | 30 | Locally preview production build: 31 | 32 | ```bash 33 | pnpm run preview 34 | ``` 35 | 36 | Checkout the [deployment documentation](https://v3.nuxtjs.org/docs/deployment) for more information. 37 | -------------------------------------------------------------------------------- /app.vue: -------------------------------------------------------------------------------- 1 | 19 | 22 | -------------------------------------------------------------------------------- /assets/fonts/dm-sans-all-400-normal.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chakra-ui/vue-docs/863e34f3689da318ffd67922a418ba39c9638e56/assets/fonts/dm-sans-all-400-normal.woff -------------------------------------------------------------------------------- /assets/fonts/dm-sans-all-500-normal.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chakra-ui/vue-docs/863e34f3689da318ffd67922a418ba39c9638e56/assets/fonts/dm-sans-all-500-normal.woff -------------------------------------------------------------------------------- /assets/fonts/dm-sans-all-700-normal.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chakra-ui/vue-docs/863e34f3689da318ffd67922a418ba39c9638e56/assets/fonts/dm-sans-all-700-normal.woff -------------------------------------------------------------------------------- /assets/fonts/dm-sans-latin-400-normal.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chakra-ui/vue-docs/863e34f3689da318ffd67922a418ba39c9638e56/assets/fonts/dm-sans-latin-400-normal.woff2 -------------------------------------------------------------------------------- /assets/fonts/dm-sans-latin-500-normal.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chakra-ui/vue-docs/863e34f3689da318ffd67922a418ba39c9638e56/assets/fonts/dm-sans-latin-500-normal.woff2 -------------------------------------------------------------------------------- /assets/fonts/dm-sans-latin-700-normal.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chakra-ui/vue-docs/863e34f3689da318ffd67922a418ba39c9638e56/assets/fonts/dm-sans-latin-700-normal.woff2 -------------------------------------------------------------------------------- /assets/fonts/dm-sans-latin-ext-400-normal.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chakra-ui/vue-docs/863e34f3689da318ffd67922a418ba39c9638e56/assets/fonts/dm-sans-latin-ext-400-normal.woff2 -------------------------------------------------------------------------------- /assets/fonts/dm-sans-latin-ext-500-normal.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chakra-ui/vue-docs/863e34f3689da318ffd67922a418ba39c9638e56/assets/fonts/dm-sans-latin-ext-500-normal.woff2 -------------------------------------------------------------------------------- /assets/fonts/dm-sans-latin-ext-700-normal.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chakra-ui/vue-docs/863e34f3689da318ffd67922a418ba39c9638e56/assets/fonts/dm-sans-latin-ext-700-normal.woff2 -------------------------------------------------------------------------------- /assets/fonts/ibm-plex-mono-latin-400-normal.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chakra-ui/vue-docs/863e34f3689da318ffd67922a418ba39c9638e56/assets/fonts/ibm-plex-mono-latin-400-normal.woff -------------------------------------------------------------------------------- /assets/fonts/ibm-plex-mono-latin-400-normal.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chakra-ui/vue-docs/863e34f3689da318ffd67922a418ba39c9638e56/assets/fonts/ibm-plex-mono-latin-400-normal.woff2 -------------------------------------------------------------------------------- /assets/fonts/ibm-plex-mono-latin-ext-400-normal.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chakra-ui/vue-docs/863e34f3689da318ffd67922a418ba39c9638e56/assets/fonts/ibm-plex-mono-latin-ext-400-normal.woff -------------------------------------------------------------------------------- /assets/fonts/ibm-plex-mono-latin-ext-400-normal.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chakra-ui/vue-docs/863e34f3689da318ffd67922a418ba39c9638e56/assets/fonts/ibm-plex-mono-latin-ext-400-normal.woff2 -------------------------------------------------------------------------------- /commitlint.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { extends: ['@commitlint/config-conventional'] } 2 | -------------------------------------------------------------------------------- /components.d.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | /* prettier-ignore */ 3 | // @ts-nocheck 4 | // Generated by unplugin-vue-components 5 | // Read more: https://github.com/vuejs/core/pull/3399 6 | import '@vue/runtime-core' 7 | 8 | export {} 9 | 10 | declare module '@vue/runtime-core' { 11 | export interface GlobalComponents { 12 | RouterLink: typeof import('vue-router')['RouterLink'] 13 | RouterView: typeof import('vue-router')['RouterView'] 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /components/ChakraLogoIcon.vue: -------------------------------------------------------------------------------- 1 | 34 | -------------------------------------------------------------------------------- /components/SponsorButton.server.vue: -------------------------------------------------------------------------------- 1 | 5 | 6 | 32 | -------------------------------------------------------------------------------- /components/TheNavbar.vue: -------------------------------------------------------------------------------- 1 | 35 | 36 | 136 | -------------------------------------------------------------------------------- /components/VersionSwitcher.tsx: -------------------------------------------------------------------------------- 1 | import { chakra, useColorModeValue } from "@chakra-ui/vue-next"; 2 | import pkgJSON from "../package.json"; 3 | 4 | const versions = [ 5 | { label: `v${pkgJSON.version}`, url: "https://next.vue.chakra-ui.com/" }, 6 | { label: "v0.8.x", url: "https://vue.chakra-ui.com" }, 7 | ]; 8 | 9 | const v1Url = versions[0].url; 10 | 11 | export default defineComponent(() => { 12 | return () => ( 13 | { 25 | document.location = e.target.value; 26 | }} 27 | > 28 | {versions.map(({ label, url }) => ( 29 | 32 | ))} 33 | 34 | ); 35 | }); 36 | -------------------------------------------------------------------------------- /components/content/CarbonAd.vue: -------------------------------------------------------------------------------- 1 | 5 | 6 | 32 | -------------------------------------------------------------------------------- /components/content/CodeEditor.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 13 | -------------------------------------------------------------------------------- /components/content/DiscordBanner.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 61 | -------------------------------------------------------------------------------- /components/content/Editor/CodeEditorLayout.vue: -------------------------------------------------------------------------------- 1 | 22 | 23 | 46 | -------------------------------------------------------------------------------- /components/content/Editor/CodeEditorParts.tsx: -------------------------------------------------------------------------------- 1 | import { defineComponent, renderSlot, h } from "vue" 2 | import { chakra, CButton } from "@chakra-ui/vue-next" 3 | 4 | export const CodeContainer = defineComponent({ 5 | name: "CodeContainer", 6 | setup(props, { attrs, slots }) { 7 | return () => { 8 | return ( 9 | 18 | {slots} 19 | 20 | ) 21 | } 22 | }, 23 | }) 24 | 25 | export const CopyButton = defineComponent({ 26 | name: "CopyButton", 27 | setup(props: any, { attrs, slots }) { 28 | return () => { 29 | return ( 30 | 42 | {renderSlot(slots, "default")} 43 | 44 | ) 45 | } 46 | }, 47 | }) 48 | 49 | export const EditableNotice = defineComponent({ 50 | name: "EditableNotice", 51 | setup(_, { attrs }) { 52 | return () => { 53 | return ( 54 | 72 | Editable Example 73 | 74 | ) 75 | } 76 | }, 77 | }) 78 | -------------------------------------------------------------------------------- /components/content/Editor/CodeHighlight.vue: -------------------------------------------------------------------------------- 1 | 31 | 32 | 40 | -------------------------------------------------------------------------------- /components/content/Editor/code-container.tsx: -------------------------------------------------------------------------------- 1 | import { chakra } from '@chakra-ui/vue-next'; 2 | 3 | const CodeContainer = defineComponent({ 4 | name: 'CodeContainer', 5 | setup(_, { attrs, slots }) { 6 | return () => { 7 | return ( 8 | 17 | {slots} 18 | 19 | ); 20 | }; 21 | } 22 | }); 23 | 24 | export default CodeContainer; 25 | -------------------------------------------------------------------------------- /components/content/Editor/code-highlight.tsx: -------------------------------------------------------------------------------- 1 | import { computed } from 'vue'; 2 | import { PrismEditor } from 'vue-prism-editor'; 3 | import 'vue-prism-editor/dist/prismeditor.min.css'; 4 | 5 | import { highlight, languages } from 'prismjs'; 6 | import 'prismjs/components/prism-clike'; 7 | import 'prismjs/components/prism-javascript'; 8 | import 'prismjs/components/prism-bash'; 9 | import 'prismjs/components/prism-jsx'; 10 | 11 | export default defineComponent({ 12 | name: 'CodeHighlight', 13 | props: { 14 | code: String as PropType, 15 | language: String as PropType 16 | }, 17 | setup(props) { 18 | const lang = computed(() => { 19 | if (props.language === 'vue') { 20 | return 'html'; 21 | } 22 | return props.language; 23 | }); 24 | 25 | const highlighter = (code: string) => { 26 | // @ts-ignore 27 | return highlight(code.trim(), languages?.[lang.value]); // languages. to return html with markup 28 | }; 29 | 30 | return () => ( 31 | 37 | ); 38 | } 39 | }); 40 | -------------------------------------------------------------------------------- /components/content/Editor/copy-button.tsx: -------------------------------------------------------------------------------- 1 | import { CButton } from '@chakra-ui/vue-next'; 2 | 3 | const CopyButton = defineComponent({ 4 | name: 'CopyButton', 5 | setup(_, { attrs, slots }) { 6 | return () => { 7 | return ( 8 | 20 | {slots.default?.()} 21 | 22 | ); 23 | }; 24 | } 25 | }); 26 | 27 | export default CopyButton; 28 | -------------------------------------------------------------------------------- /components/content/Editor/editable-notice.tsx: -------------------------------------------------------------------------------- 1 | import { chakra } from '@chakra-ui/vue-next'; 2 | 3 | const EditableNotice = defineComponent({ 4 | name: 'EditableNotice', 5 | setup(_, { attrs }) { 6 | return () => { 7 | return ( 8 | 26 | Editable Example 27 | 28 | ); 29 | }; 30 | } 31 | }); 32 | 33 | export default EditableNotice; 34 | -------------------------------------------------------------------------------- /components/content/FrameworkList/FrameworkCard.vue: -------------------------------------------------------------------------------- 1 | 14 | 15 | -------------------------------------------------------------------------------- /components/content/FrameworkList/FrameworkList.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | -------------------------------------------------------------------------------- /components/content/FrameworkList/NuxtLogo.vue: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /components/content/FrameworkList/VueLogo.vue: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /components/content/common/Code.vue: -------------------------------------------------------------------------------- 1 | 4 | -------------------------------------------------------------------------------- /components/content/common/Showcase.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | -------------------------------------------------------------------------------- /components/content/common/Stack.vue: -------------------------------------------------------------------------------- 1 | 6 | 9 | -------------------------------------------------------------------------------- /components/content/common/Wrap.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | -------------------------------------------------------------------------------- /components/content/examples/accordion/ExpandedStyle.vue: -------------------------------------------------------------------------------- 1 | 14 | 15 | 23 | -------------------------------------------------------------------------------- /components/content/examples/accordion/SimpleAccordion.vue: -------------------------------------------------------------------------------- 1 | 32 | 33 | 41 | -------------------------------------------------------------------------------- /components/content/examples/alert/AccentAlert.vue: -------------------------------------------------------------------------------- 1 | 22 | 25 | -------------------------------------------------------------------------------- /components/content/examples/alert/Alert.vue: -------------------------------------------------------------------------------- 1 | 8 | 16 | -------------------------------------------------------------------------------- /components/content/examples/alert/BaseAlert.vue: -------------------------------------------------------------------------------- 1 | 14 | 17 | -------------------------------------------------------------------------------- /components/content/examples/alert/Composition.vue: -------------------------------------------------------------------------------- 1 | 23 | 31 | -------------------------------------------------------------------------------- /components/content/examples/alert/CompositionExample2.vue: -------------------------------------------------------------------------------- 1 | 39 | 40 | 53 | -------------------------------------------------------------------------------- /components/content/examples/alert/IconAlert.vue: -------------------------------------------------------------------------------- 1 | 24 | 27 | -------------------------------------------------------------------------------- /components/content/examples/alert/StatusAlert.vue: -------------------------------------------------------------------------------- 1 | 16 | 19 | -------------------------------------------------------------------------------- /components/content/examples/aspectratio/AspectRatioEImage.vue: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /components/content/examples/aspectratio/AspectRatioEMap.vue: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /components/content/examples/aspectratio/AspectRatioEVideo.vue: -------------------------------------------------------------------------------- 1 | 8 | -------------------------------------------------------------------------------- /components/content/examples/avatar/Avatar.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 10 | -------------------------------------------------------------------------------- /components/content/examples/avatar/AvatarBadge.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 10 | -------------------------------------------------------------------------------- /components/content/examples/avatar/AvatarGroup.vue: -------------------------------------------------------------------------------- 1 | 25 | 26 | 29 | -------------------------------------------------------------------------------- /components/content/examples/badge/BaseBadge.vue: -------------------------------------------------------------------------------- 1 | 4 | -------------------------------------------------------------------------------- /components/content/examples/badge/ColorBadge.vue: -------------------------------------------------------------------------------- 1 | 9 | -------------------------------------------------------------------------------- /components/content/examples/badge/CompositionBadge.vue: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /components/content/examples/badge/CompositionBadgeTwo.vue: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /components/content/examples/badge/VariantBadge.vue: -------------------------------------------------------------------------------- 1 | 8 | -------------------------------------------------------------------------------- /components/content/examples/breadcrumb/BreadcrumbComposition.vue: -------------------------------------------------------------------------------- 1 | 14 | 21 | -------------------------------------------------------------------------------- /components/content/examples/breadcrumb/DefaultSeparator.vue: -------------------------------------------------------------------------------- 1 | 14 | 21 | -------------------------------------------------------------------------------- /components/content/examples/breadcrumb/FunctionalSeparator.vue: -------------------------------------------------------------------------------- 1 | 16 | 30 | -------------------------------------------------------------------------------- /components/content/examples/breadcrumb/SimpleBreadcrumb.vue: -------------------------------------------------------------------------------- 1 | 14 | 21 | -------------------------------------------------------------------------------- /components/content/examples/breadcrumb/SlotSeparator.vue: -------------------------------------------------------------------------------- 1 | 17 | 25 | -------------------------------------------------------------------------------- /components/content/examples/breadcrumb/StringSeparator.vue: -------------------------------------------------------------------------------- 1 | 14 | 21 | -------------------------------------------------------------------------------- /components/content/examples/button/BaseButton.vue: -------------------------------------------------------------------------------- 1 | 4 | 7 | -------------------------------------------------------------------------------- /components/content/examples/button/ButtonComposition.vue: -------------------------------------------------------------------------------- 1 | 14 | 17 | -------------------------------------------------------------------------------- /components/content/examples/button/ButtonGroup.vue: -------------------------------------------------------------------------------- 1 | 7 | 10 | -------------------------------------------------------------------------------- /components/content/examples/button/CustomButton.vue: -------------------------------------------------------------------------------- 1 | 14 | 17 | -------------------------------------------------------------------------------- /components/content/examples/button/IconButton.vue: -------------------------------------------------------------------------------- 1 | 21 | -------------------------------------------------------------------------------- /components/content/examples/button/LoadingButton.vue: -------------------------------------------------------------------------------- 1 | 27 | 51 | -------------------------------------------------------------------------------- /components/content/examples/button/SizesButton.vue: -------------------------------------------------------------------------------- 1 | 7 | 10 | -------------------------------------------------------------------------------- /components/content/examples/button/VariantButton.vue: -------------------------------------------------------------------------------- 1 | 8 | 11 | -------------------------------------------------------------------------------- /components/content/examples/center/IconCenter.vue: -------------------------------------------------------------------------------- 1 | 13 | 14 | -------------------------------------------------------------------------------- /components/content/examples/center/SimpleCenter.vue: -------------------------------------------------------------------------------- 1 | 6 | -------------------------------------------------------------------------------- /components/content/examples/center/SquareAndCircle.vue: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /components/content/examples/checkbox/Checkbox.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 8 | -------------------------------------------------------------------------------- /components/content/examples/checkbox/CheckboxGroup.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | -------------------------------------------------------------------------------- /components/content/examples/checkbox/ColorsCheckbox.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | -------------------------------------------------------------------------------- /components/content/examples/checkbox/DisabledCheckbox.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | -------------------------------------------------------------------------------- /components/content/examples/checkbox/Indeterminate.vue: -------------------------------------------------------------------------------- 1 | 38 | 39 | -------------------------------------------------------------------------------- /components/content/examples/checkbox/SizesCheckbox.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | -------------------------------------------------------------------------------- /components/content/examples/closebutton/CloseButton.vue: -------------------------------------------------------------------------------- 1 | 4 | 7 | -------------------------------------------------------------------------------- /components/content/examples/closebutton/CloseButtonSizes.vue: -------------------------------------------------------------------------------- 1 | 6 | 9 | -------------------------------------------------------------------------------- /components/content/examples/code/ColorsCode.vue: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /components/content/examples/code/SimpleCode.vue: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /components/content/examples/code/VariantCode.vue: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /components/content/examples/collapse/HeightCollapse.vue: -------------------------------------------------------------------------------- 1 | 13 | 14 | 15 | 20 | -------------------------------------------------------------------------------- /components/content/examples/collapse/SimpleCollapse.vue: -------------------------------------------------------------------------------- 1 | 13 | 14 | 19 | -------------------------------------------------------------------------------- /components/content/examples/flex/CompareFlex.vue: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /components/content/examples/flex/SignUpFlex.vue: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /components/content/examples/flex/SimpleFlex.vue: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /components/content/examples/flex/SpacerFlex.vue: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /components/content/examples/heading/BasicHeading.vue: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /components/content/examples/heading/CompositionHeading.vue: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /components/content/examples/heading/OverrideHeading.vue: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /components/content/examples/heading/SizesHeading.vue: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /components/content/examples/heading/TruncatedHeading.vue: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /components/content/examples/icons/Icon.vue: -------------------------------------------------------------------------------- 1 | 4 | -------------------------------------------------------------------------------- /components/content/examples/image/BoxImage.vue: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /components/content/examples/image/FallbackImage.vue: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /components/content/examples/image/RoundedImage.vue: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /components/content/examples/image/SimpleImage.vue: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /components/content/examples/input/BasicInput.vue: -------------------------------------------------------------------------------- 1 | 4 | -------------------------------------------------------------------------------- /components/content/examples/input/InputAddon.vue: -------------------------------------------------------------------------------- 1 | 16 | -------------------------------------------------------------------------------- /components/content/examples/input/InputAppearance.vue: -------------------------------------------------------------------------------- 1 | 9 | -------------------------------------------------------------------------------- /components/content/examples/input/InputDate.vue: -------------------------------------------------------------------------------- 1 | 6 | -------------------------------------------------------------------------------- /components/content/examples/input/InputElements.vue: -------------------------------------------------------------------------------- 1 | 19 | -------------------------------------------------------------------------------- /components/content/examples/input/InputFocus.vue: -------------------------------------------------------------------------------- 1 | 9 | -------------------------------------------------------------------------------- /components/content/examples/input/InputHtmlSize.vue: -------------------------------------------------------------------------------- 1 | 4 | -------------------------------------------------------------------------------- /components/content/examples/input/InputPassword.vue: -------------------------------------------------------------------------------- 1 | 11 | 12 | -------------------------------------------------------------------------------- /components/content/examples/input/InputPlaceholderStyle.vue: -------------------------------------------------------------------------------- 1 | 9 | -------------------------------------------------------------------------------- /components/content/examples/input/SizeInput.vue: -------------------------------------------------------------------------------- 1 | 9 | -------------------------------------------------------------------------------- /components/content/examples/simplegrid/SimpleGridAutoResponsive.vue: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /components/content/examples/simplegrid/SimpleGridExample.vue: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /components/content/examples/simplegrid/SimpleGridResponsive.vue: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /components/content/examples/simplegrid/SimpleGridSpacing.vue: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /components/content/examples/stack/BasicStack.vue: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /components/content/examples/stack/HorizontalStack.vue: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /components/content/examples/stack/HorizontalStackTwo.vue: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /components/content/examples/stack/HtmlStack.vue: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /components/content/examples/stack/ReverseStack.vue: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /components/content/examples/tabs/ColoredTabs.vue: -------------------------------------------------------------------------------- 1 | 24 | 25 | 37 | -------------------------------------------------------------------------------- /components/content/examples/tabs/FittedTabs.vue: -------------------------------------------------------------------------------- 1 | 24 | 25 | 37 | -------------------------------------------------------------------------------- /components/content/examples/tabs/SimpleTabs.vue: -------------------------------------------------------------------------------- 1 | 24 | 25 | 37 | -------------------------------------------------------------------------------- /components/content/examples/tabs/SizesTabs.vue: -------------------------------------------------------------------------------- 1 | 24 | 25 | 37 | -------------------------------------------------------------------------------- /components/content/examples/tabs/VariantTabs.vue: -------------------------------------------------------------------------------- 1 | 24 | 25 | 37 | -------------------------------------------------------------------------------- /components/content/examples/tag/Tag.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | -------------------------------------------------------------------------------- /components/content/examples/tag/TagCloseButton.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | -------------------------------------------------------------------------------- /components/content/examples/tag/TagLabel.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | -------------------------------------------------------------------------------- /components/content/examples/tag/TagLeftIcon.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | -------------------------------------------------------------------------------- /components/content/examples/tag/TagRightIcon.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | -------------------------------------------------------------------------------- /components/content/examples/wrap/AlignWrap.vue: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /components/content/examples/wrap/JustifyWrap.vue: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /components/content/examples/wrap/SimpleWrap.vue: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /components/content/examples/wrap/SpacingWrap.vue: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /components/content/prose/ProseA.vue: -------------------------------------------------------------------------------- 1 | 29 | 30 | 39 | 40 | 41 | 46 | 47 | -------------------------------------------------------------------------------- /components/content/prose/ProseBlockquote.vue: -------------------------------------------------------------------------------- 1 | 14 | -------------------------------------------------------------------------------- /components/content/prose/ProseCodeInline.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 12 | -------------------------------------------------------------------------------- /components/content/prose/ProseEm.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 10 | -------------------------------------------------------------------------------- /components/content/prose/ProseH1.vue: -------------------------------------------------------------------------------- 1 | 5 | 6 | 17 | -------------------------------------------------------------------------------- /components/content/prose/ProseH2.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 10 | -------------------------------------------------------------------------------- /components/content/prose/ProseH3.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 10 | -------------------------------------------------------------------------------- /components/content/prose/ProseH4.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 10 | -------------------------------------------------------------------------------- /components/content/prose/ProseH5.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 28 | -------------------------------------------------------------------------------- /components/content/prose/ProseLi.vue: -------------------------------------------------------------------------------- 1 | 6 | -------------------------------------------------------------------------------- /components/content/prose/ProseOl.vue: -------------------------------------------------------------------------------- 1 | 6 | -------------------------------------------------------------------------------- /components/content/prose/ProseP.vue: -------------------------------------------------------------------------------- 1 | 6 | -------------------------------------------------------------------------------- /components/content/prose/ProseTable.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 12 | -------------------------------------------------------------------------------- /components/content/prose/ProseTd.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 16 | -------------------------------------------------------------------------------- /components/content/prose/ProseTh.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 12 | -------------------------------------------------------------------------------- /components/content/prose/ProseUl.vue: -------------------------------------------------------------------------------- 1 | 6 | -------------------------------------------------------------------------------- /components/home/ComponentApi.server.vue: -------------------------------------------------------------------------------- 1 | 35 | 36 | 102 | -------------------------------------------------------------------------------- /components/home/DiscordHero.server.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 64 | -------------------------------------------------------------------------------- /components/home/Footer.server.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 44 | -------------------------------------------------------------------------------- /components/home/PilersHero.server.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 77 | -------------------------------------------------------------------------------- /components/home/StartHero.server.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 126 | -------------------------------------------------------------------------------- /components/home/features.server.vue: -------------------------------------------------------------------------------- 1 | 51 | 52 | 86 | -------------------------------------------------------------------------------- /components/icons/accessibility-icon.tsx: -------------------------------------------------------------------------------- 1 | import { createIcon } from '@chakra-ui/vue-next'; 2 | 3 | const AccessibilityIcon = createIcon({ 4 | name: 'AccessibilityIcon', 5 | viewBox: '0 0 32 32', 6 | path: ` 7 | 8 | ` 9 | }); 10 | 11 | export default AccessibilityIcon; 12 | -------------------------------------------------------------------------------- /components/icons/composable-icon.tsx: -------------------------------------------------------------------------------- 1 | import { createIcon } from '@chakra-ui/vue-next'; 2 | 3 | const ComposableIcon = createIcon({ 4 | name: 'ComposableIcon', 5 | viewBox: '0 0 24 24', 6 | path: `` 7 | }); 8 | 9 | export default ComposableIcon; 10 | -------------------------------------------------------------------------------- /components/icons/external-link-icon.tsx: -------------------------------------------------------------------------------- 1 | import { createIcon } from '@chakra-ui/vue-next'; 2 | 3 | const ExternalLinkIcon = createIcon({ 4 | name: 'MoonIcon', 5 | viewBox: '0 0 24 24', 6 | path: ` 7 | 8 | ` 9 | }); 10 | 11 | export default ExternalLinkIcon; 12 | -------------------------------------------------------------------------------- /components/icons/moon-icon.tsx: -------------------------------------------------------------------------------- 1 | import { createIcon } from '@chakra-ui/vue-next'; 2 | 3 | const MoonIcon = createIcon({ 4 | name: 'MoonIcon', 5 | viewBox: '0 0 24 24', 6 | path: ` 7 | 8 | ` 9 | }); 10 | 11 | export default MoonIcon; 12 | -------------------------------------------------------------------------------- /components/icons/state-machine-icon.tsx: -------------------------------------------------------------------------------- 1 | import { createIcon } from '@chakra-ui/vue-next'; 2 | 3 | const StateMachineIcon = createIcon({ 4 | name: 'StateMachineIcon', 5 | viewBox: '0 0 32 32', 6 | path: ` 7 | 8 | ` 9 | }); 10 | 11 | export default StateMachineIcon; 12 | -------------------------------------------------------------------------------- /components/icons/sun-icon.tsx: -------------------------------------------------------------------------------- 1 | import { createIcon } from '@chakra-ui/vue-next'; 2 | 3 | const SunIcon = createIcon({ 4 | name: 'MoonIcon', 5 | viewBox: '0 0 24 24', 6 | path: ` 7 | 8 | ` 9 | }); 10 | 11 | export default SunIcon; 12 | -------------------------------------------------------------------------------- /components/icons/theme-icon.tsx: -------------------------------------------------------------------------------- 1 | import { createIcon } from '@chakra-ui/vue-next'; 2 | 3 | const ThemeIcon = createIcon({ 4 | name: 'ThemeIcon', 5 | viewBox: '0 0 32 32', 6 | path: `` 7 | }); 8 | 9 | export default ThemeIcon; 10 | -------------------------------------------------------------------------------- /components/navigation/ProseCode.vue: -------------------------------------------------------------------------------- 1 | 23 | 24 | 35 | 36 | 48 | -------------------------------------------------------------------------------- /components/navigation/doc-link.vue: -------------------------------------------------------------------------------- 1 | 36 | 37 | 50 | -------------------------------------------------------------------------------- /components/navigation/sidebar.vue: -------------------------------------------------------------------------------- 1 | 31 | 32 | 43 | -------------------------------------------------------------------------------- /components/navigation/table-of-contents.vue: -------------------------------------------------------------------------------- 1 | 129 | 130 | 139 | -------------------------------------------------------------------------------- /components/navigation/top-navigation.vue: -------------------------------------------------------------------------------- 1 | 26 | 27 | 131 | -------------------------------------------------------------------------------- /config/site-config.ts: -------------------------------------------------------------------------------- 1 | const baseUrl = 'https://github.com/chakra-ui/chakra-ui-vue-next'; 2 | 3 | const siteUrl = 'https://vue.chakra-ui.com'; 4 | const siteDescription = 5 | 'Simple, Modular and Accessible UI Components for your Vue Applications.'; 6 | const siteName = 'Chakra UI Vue | Build accessible Vue apps with speed'; 7 | const siteLang = 'en'; 8 | 9 | const siteConfig = { 10 | repo: { 11 | url: baseUrl, 12 | editUrl: `${baseUrl}/edit/main/website`, 13 | blobUrl: `${baseUrl}/blob/main` 14 | }, 15 | openCollective: { 16 | url: 'https://opencollective.com/chakra-ui' 17 | }, 18 | discord: 'https://discord.gg/dQHfcWF', 19 | youtube: 'https://www.youtube.com/channel/UC4TmDovH46TB4S0SM0Y4CIg', 20 | twitter: 'https://twitter.com/chakraui_vue', 21 | seo: { 22 | title: 'Chakra UI Vue', 23 | titleTemplate: '%s - Chakra UI Vue', 24 | siteDescription, 25 | siteUrl, 26 | twitter: { 27 | handle: '@chakraui_vue', 28 | site: '@chakraui_vue', 29 | cardType: 'summary_large_image' 30 | }, 31 | openGraph: { 32 | type: 'website', 33 | locale: 'en_US', 34 | url: siteUrl, 35 | title: 'Chakra UI', 36 | siteDescription, 37 | site_name: siteName, 38 | images: [ 39 | { 40 | url: 'https://chakra-ui.com/og-image.png', 41 | width: 1240, 42 | height: 480, 43 | alt: siteName 44 | }, 45 | { 46 | url: 'https://chakra-ui.com/twitter-og-image.png', 47 | width: 1012, 48 | height: 506, 49 | alt: siteName 50 | } 51 | ] 52 | } 53 | } 54 | }; 55 | 56 | export default siteConfig; 57 | export { baseUrl, siteDescription, siteLang, siteName, siteUrl }; 58 | -------------------------------------------------------------------------------- /content/1.getting-started/0.index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Chakra UI Vue 3 | description: Introduction to Chakra UI Vue 4 | version: 2.0+ 5 | --- 6 | 7 | # Chakra UI Vue 8 | 9 | Welcome to the documentation of Chakra UI Vue. Here you can find more about Chakra UI Vue, what it is, how it can help you build applications, explore the components and theme, etc. 10 | 11 | ## What is Chakra UI Vue? 12 | 13 | Chakra UI Vue is a design system implementation that allows you to build applications and design systems with **speed**. Chakra UI Vue comes with a list of `components`, like a button, accordion component, etc. All the components are build with accessibility in mind and will ship with the needed `ARIA-labels` and `keyboard interactions` out of the box. 14 | 15 | Chakra UI Vue also comes with a default `theme`, with colors, sizes, component styles, to get you started. But allows for a fully customization to make your application look exactly as you want it, thanks to the `extensive` theming API. 16 | 17 | Chakra UI Vue is build for [Vue.js 3](https://vuejs.org/) and is part of the `Chakra-verse` ecosystem, along with [Chakra UI](https://chakra-ui.com/) and [Zag.js](https://zagjs.com/). 18 | 19 | ## Why Chakra UI Vue? 20 | 21 | **@chakra-ui/vue-next** is a design system implementation whose mission is to make building accessible 22 | and composable Vue.js web applications fun. 23 | 24 | In order to make our components as accessible as possible, we've carefully crafted each component 25 | to be WAI-ARIA compliant while still making it possible to customize Chakra components based on 26 | constraint-based design principles. 27 | 28 | Chakra UI Vue is able to do this because of principles adopted from patterns in the web development space 29 | that proved to be successful. We've borrowed tons of knowledge and inspiration from React's 30 | [Chakra UI](http://chakra-ui.com) (The mother ship 😁) by Segun Adebayo, 31 | [Tailwind CSS](https://tailwindcss.com) by Adam Wathan, [Vuetify](https://vuetifyjs.com) by 32 | John Leider, [Buefy](https://buefy.org) by Walter Thomasi, [Reach UI](https://reacttraining.com/reach-ui/) 33 | from the folks over at React Training, and many other tools that make web development a colorful field. 34 | 35 | ## Core Concepts 36 | 37 | Chakra UI is built from the ground up with two main guiding principles in mind: 38 | 39 | 1. Accessibility 40 | 2. Constraint based design 41 | 42 | ## Vision 43 | 44 | - Provide accessible components out of the box. 45 | - Bridge the gap between design and development, by providing a styling API that utilizes constraint-based design principles. 46 | - Provide composable components that consumers can extend to create their own custom components. 47 | - Find new ways to make building accessible Vue applications fun and fast. 48 | 49 | ## Getting started 50 | 51 | To get started, you can use the [Codesandbox](https://codesandbox.io/s/vue-chakra-next-with-autoimport-r1shkt?from-embed){:target="\_blank"} starter template: 52 | 53 | 59 | 60 | Stackblitz starter template is coming soon. 61 | 62 | There are starter demo's available on GitHub thanks to @Codebender828: 63 | 64 | - Vue 3: [https://github.com/codebender828/chakra-vue-v1-demo](https://github.com/codebender828/chakra-vue-v1-demo) 65 | - Nuxt 3: [https://github.com/codebender828/chakra-nuxt-v1-demo](https://github.com/codebender828/chakra-nuxt-v1-demo) 66 | 67 | Or follow along with the [installation](1.installation.md) guide. 68 | 69 | ## Community 70 | 71 | Please feel free to connect with the **Chakra UI** community on [Discord](https://discord.gg/sq2Kp6x). 72 | ::DiscordBanner 73 | :: 74 | -------------------------------------------------------------------------------- /content/1.getting-started/1.installation.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Installation 3 | description: How to install and set up Chakra UI in your project 4 | version: 2.0+ 5 | --- 6 | 7 | # Getting Started with Chakra UI Vue 8 | 9 | > Please note that our docs are still under development. 10 | 11 | Let's see how you can get started with **Chakra UI Vue** 🥳. 12 | 13 | You will start from a [Vue 3](https://vuejs.org/) project. Don't worry, this can be a new or existing project. 14 | If you are looking to install `Chakra UI Vue` in [Nuxt 3](https://nuxt.com/), you can take a look [here](./2.nuxt.md). 15 | 16 | The first thing you will need to do is install the `Chakra UI Vue` package and its dependencies in the Vue project. 17 | This can be achieved with the following terminal command: 18 | 19 | ```bash 20 | pnpm install @chakra-ui/vue-next 21 | ``` 22 | 23 | Or if you prefer using yarn: 24 | 25 | ```bash 26 | yarn add @chakra-ui/vue-next 27 | ``` 28 | 29 | ## Usage 30 | 31 | Perfect, now before you can use the features of Chakra UI, you will have to add it to the app instance. 32 | For this, you have to import the `createChakra` function from the `Chakra UI Vue` package in the `main.ts` file. 33 | This allows you to create the `Chakra UI Vue` plugin instance and will make it easy to add plugin options like `extendTheme` for example. 34 | Then you need to tell the application that you want to use the plugin, this will make the Chakra UI Vue features available to use in your Vue app. 35 | 36 | ```tsx 37 | // main.ts 38 | import { createChakra } from "@chakra-ui/vue-next" 39 | import { createApp } from 'vue' 40 | import App from './App.vue' 41 | 42 | const chakra = createChakra() 43 | 44 | const app = createApp(App).use(chakra) 45 | app.mount('#app') 46 | ``` 47 | 48 | This will also be the place where you can add extra `options` to the Chakra UI Vue plugin to extend Chakra's features for the application. 49 | But let's not dive into that yet, let's first see how you can use Chakra UI Components. An overview of all the components can be found here. 50 | 51 | ## Using Chakra Components 52 | 53 | Once you've installed and imported Chakra UI Vue, you can start using its components in your app. 54 | Let's pick the `Button` component, which is called `CButton` from the package. 55 | (Note the use of the [script setup](https://vuejs.org/api/sfc-script-setup.html) here) 56 | 57 | ```tsx 58 | // App.vue 59 | 62 | ``` 63 | 64 | Next, you want to display the button on the page. After it is imported, the button will be available in the template. 65 | 66 | ```tsx 67 | // App.vue 68 | 71 | ``` 72 | 73 | There you go! 🚀 74 | 75 | You have a working button with some styling. Thanks to styled props, you can style `Chakra UI Vue` components. 76 | Like you did here with our button, making it use the `green` color scheme. 77 | Let's learn about styled props and the theming API of Chakra UI Vue here. 78 | -------------------------------------------------------------------------------- /content/1.getting-started/2.nuxt.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Using Nuxt 3 | description: How to use Chakra UI Vue with Nuxt 4 | version: 2.0+ 5 | --- 6 | # Chakra UI Nuxt 7 | 8 | 💚 We all love [Nuxt 3](https://nuxt.com/)! Getting started with Chakra UI Nuxt is also just as simple. 9 | 10 | ## Installation 11 | 12 | If you wish to use Chakra UI Vue with Nuxt, you will have to install the `@Chakra-ui/nuxt-next` package. This package will install all the required dependencies. 13 | 14 | ```bash 15 | pnpm install @chakra-ui/nuxt-next 16 | ``` 17 | 18 | or 19 | 20 | ```bash 21 | yarn add @chakra-ui/nuxt-next 22 | ``` 23 | 24 | ### Registering the Chakra module 25 | 26 | We then register the Chakra UI module in the `modules` key of our `nuxt.config.ts`. [See the Nuxt documentation to learn more about modules in Nuxt.js](https://nuxt.com/docs/api/configuration/nuxt-config#modules) 27 | 28 | Chakra module options are the same as the Vue CLI plugin options. Learn more about the [Chakra plugin options here](./plugin-options). 29 | 30 | ```tsx 31 | //nuxt.config.ts 32 | export default { 33 | modules: [ 34 | '@chakra-ui/nuxt-next', 35 | ], 36 | /** 37 | * Add extend the plugin options under the `chakra` key. 38 | **/ 39 | chakra: { 40 | extendTheme: { 41 | colors: { 42 | brand: { /* ... */ } 43 | } 44 | } 45 | } 46 | } 47 | ``` 48 | 49 | That is it! 🚀 50 | You can now use the Chakra UI components and features in your Nuxt application. 51 | 52 | ### Starters 53 | 54 | Here is a Nuxt 3 Github repo that contains a starter for Chakra UI Nuxt: [https://github.com/codebender828/chakra-nuxt-v1-demo](https://github.com/codebender828/chakra-nuxt-v1-demo). -------------------------------------------------------------------------------- /content/1.getting-started/3.design-principles.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Design Principles 3 | description: Principles that keeps Chakra's components fairly consistent 4 | tags: ['principles'] 5 | --- 6 | 7 | # Design Principles 8 | 9 | Chakra UI Vue is established on principles that keep its components fairly 10 | consistent. Understanding these concepts will help you better contribute to 11 | Chakra UI Vue. 12 | 13 | Our goal is to design simple, composable components that cater to real-life UI 14 | design problems. In order to do that, we developed a set of principles that help 15 | us always be on that path. 16 | 17 | - **Style Props:** All component styles can be overridden or extended via style 18 | props to reduce the use of `css` prop or `styled()`. Compose new components 19 | from `Box`. 20 | 21 | - **Simplicity:** Strive to keep the component API fairly simple and show real 22 | world scenarios of using the component. 23 | 24 | - **Composition:** Break down components into smaller parts with minimal props 25 | to keep complexity low, and compose them together. This will ensure that the 26 | styles and functionality are flexible and extensible. 27 | 28 | - **Accessibility:** When creating a component, keep accessibility top of mind. 29 | This includes keyboard navigation, focus management, color contrast, voice 30 | over, and the correct `aria-*` attributes. 31 | 32 | - **Dark Mode:** Make components dark mode compatible. Use `useColorMode` hook 33 | to handle styling. 34 | 35 | - **Naming Props:** We all know naming is the hardest thing in this industry. 36 | Generally, ensure a prop name is indicative of what it does. Boolean props 37 | should be named using auxiliary verbs such as `does`, `has`, `is` and 38 | `should`. For example, `Button` uses `isDisabled`, `isLoading`, etc. -------------------------------------------------------------------------------- /content/1.getting-started/_dir.yml: -------------------------------------------------------------------------------- 1 | # navigation.redirect: '/getting-started/installation' 2 | -------------------------------------------------------------------------------- /content/2.styled-system/0.index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Styled System 3 | description: Introduction to Styled System of Chakra UI Vue 4 | version: 2.0+ 5 | --- 6 | 7 | # Styled System 8 | 9 | The styled system of Chakra UI Vue helps you to take care of anything style related. 10 | 11 | ## Constraint Based Design 12 | 13 | In order to help you create clean, consistent layouts, Chakra UI Vue provides building blocks that take 14 | advantage of [constraint-based design principles](https://react-ui.dev/core-concepts/constraints-based-design). 15 | 16 | Chakra UI Vue's design principles are built around two core concepts: 17 | 18 | - Design tokens 19 | - Space scales 20 | 21 | ### Design tokens 22 | 23 | [Design tokens](https://www.lightningdesignsystem.com/design-tokens) are named values that are 24 | used in place of hard-coded values (such as hex values for color or pixel values for spacing) 25 | in order to maintain a scalable and consistent visual system for UI development. 26 | 27 | These constraints help you to create consistent, high-quality user interfaces. 28 | 29 | Chakra UI Vue's theming system leverages design tokens for different style properties 30 | like color, spacing, font sizes, font weights, opacity, radii, shadows, z-indices, border widths, and breakpoints. 31 | 32 | This allows us to create a system that enables us to style our applications in ways that can be scaled 33 | across different scales. These include a typographic (`font-size`) 34 | scale, a spacing scale for `margin` and `padding`, and a color object. 35 | 36 | By default Chakra UI Vue uses the [System UI Theme Specification](https://system-ui.com/theme/) 37 | 38 | ## Space Scales 39 | 40 | Because Chakra UI Vue uses styled system under the hood, it allows you to reliably create consistent 41 | spacing of elements in your applications. The `space` key can directly be referenced by 42 | `padding`, `margin`, `top`, `right`, `bottom`, and `left` style properties. 43 | 44 | By default, Chakra UI Vue uses a comprehensive **4pt grid** as a single unit. So in order to apply a 45 | padding of `32px`, you can use the value `32px / 4px = 8`. i.e. `padding: 8` 46 | 47 | ```jsx 48 | export default { 49 | space: { 50 | px: '1px', 51 | '0': '0', 52 | '1': '0.25rem', 53 | '2': '0.5rem', 54 | '3': '0.75rem', 55 | '4': '1rem', 56 | '5': '1.25rem', 57 | '6': '1.5rem', 58 | '8': '2rem', 59 | '10': '2.5rem', 60 | '12': '3rem', 61 | '16': '4rem', 62 | '20': '5rem', 63 | '24': '6rem', 64 | '32': '8rem', 65 | '40': '10rem', 66 | '48': '12rem', 67 | '56': '14rem', 68 | '64': '16rem' 69 | } 70 | } 71 | ``` 72 | 73 | Below are some examples of how to apply spacing values to Chakra components. 74 | 75 | ```html 76 | 77 | 78 | Box 79 | 80 | 81 | 82 | 83 | Box 84 | 85 | 86 | 87 | 88 | Box 89 | 90 | ``` 91 | 92 | > Chakra UI Vue's default space scale uses `rems` as the CSS unit which is relative to the default root HTML font size of 16px 93 | 94 | ### Theme 95 | 96 | By default, Chakra UI Vue uses a theme object that you can extend and customize as you see fit for your application. 97 | To learn more about theming in Chakra UI Vue, check out the [theme page](/). -------------------------------------------------------------------------------- /content/4.components/accordion.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Accordion 3 | description: Accordion component 4 | version: 2.0+ 5 | --- 6 | # Accordion 7 | 8 | An accordion is a vertically stacked set of interactive headings containing a title, content snippet, or thumbnail representing a section of content. 9 | 10 | ## Import 11 | 12 | Chakra UI Vue exports 5 accordion-related components. 13 | 14 | - **CAccordion**: The wrapper that contains accordion items. 15 | - **CAccordionItem**: A single accordion item. 16 | - **CAccordionButton**: The button that toggles the expand/collapse state of the accordion item. This button must be wrapped in an element with role heading. 17 | - **CAccordionPanel**: The container for the details to be revealed. 18 | - **CAccordionIcon**: A chevron-down icon that rotates based on the expanded/collapsed state 19 | 20 | ```js 21 | import { 22 | CAccordion, 23 | CAccordionItem, 24 | CAccordionButton, 25 | CAccordionPanel, 26 | CAccordionIcon, 27 | } from "@chakra-ui/vue-next" 28 | ``` 29 | 30 | ## Usage 31 | 32 | By default, only one item may be expanded and it can only be collapsed again by expanding another. 33 | 34 | `CAccordion` supports keyboard navigation between accordion buttons. Pressing the `up` or `down` key will move focus between accordion buttons. 35 | 36 | ::showcase 37 | 38 | :simple-accordion{width=full} 39 | 40 | :: 41 | 42 | ```html 43 | 44 | 45 | 46 | Watercraft 47 | 48 | Sample accordion content 49 | 50 | 51 | 52 | Automobiles 53 | 54 | Sample accordion content 55 | 56 | 57 | 58 | Aircrafts 59 | 60 | Sample accordion content 61 | 62 | 63 | ``` 64 | 65 | ## Expand multiple items at once 66 | 67 | If you set `allow-multiple` to `true` then the accordion will permit multiple items to be expanded at once. 68 | 69 | 70 | ::showcase 71 | 72 | :simple-accordion{width="full" allow-multiple=true} 73 | 74 | :: 75 | 76 | ```html 77 | 78 | 79 | 80 | Watercraft 81 | 82 | Sample accordion content 83 | 84 | 85 | 86 | Automobiles 87 | 88 | Sample accordion content 89 | 90 | 91 | 92 | Aircrafts 93 | 94 | Sample accordion content 95 | 96 | 97 | ``` 98 | 99 | ## Toggle each accordion item 100 | 101 | If you set `allow-toggle` to `true`, any expanded item may be collapsed again. 102 | 103 | 104 | ::showcase 105 | 106 | :simple-accordion{width="full" allow-toggle=true} 107 | 108 | :: 109 | 110 | ```html 111 | 112 | 113 | 114 | Watercraft 115 | 116 | Sample accordion content 117 | 118 | 119 | 120 | Automobiles 121 | 122 | Sample accordion content 123 | 124 | 125 | 126 | Aircrafts 127 | 128 | Sample accordion content 129 | 130 | 131 | ``` 132 | 133 | ## Styling the expanded state 134 | 135 | The `CAccordionButton` component has `aria-expanded` set to `true` or `false` depending on the state of the `CAccordionItem`. Use the style prop `_expanded` to style this state. 136 | 137 | ::showcase 138 | 139 | :expanded-style{width="full" allow-toggle=true} 140 | 141 | :: 142 | 143 | ## Accessibility 144 | 145 | Pressing `space` or `enter` when focus is on the accordion panel header will toggle (expand or collapse) the accordion. -------------------------------------------------------------------------------- /content/4.components/aspectratio.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Aspect Ratio 3 | description: Aspect ratio component 4 | version: 2.0+ 5 | --- 6 | 7 | # Aspect Ratio 8 | 9 | `CAspectRatio` component is used to embed responsive videos and maps, etc. 10 | 11 | ## Import 12 | 13 | ```js 14 | import { CAspectRatio } from '@chakra-ui/vue-next'; 15 | ``` 16 | 17 | ## Usage 18 | 19 | ### Embed Video 20 | 21 | To embed a video with a specific aspect ratio, use a `CBox` as an `iframe` with src pointing to the link of the video. 22 | 23 | Pass the `max-width` prop to `CAspectRatio` to control the width of the content. 24 | 25 | ::showcase 26 | ::aspect-ratio-e-video{width=full} 27 | :: 28 | :: 29 | 30 | ```html 31 | 32 | 33 | 34 | ``` 35 | 36 | ### Embed Image 37 | 38 | You can also embed image that has a 4:3 aspect ratio. 39 | 40 | ::showcase 41 | ::aspect-ratio-e-image{width=full} 42 | :: 43 | :: 44 | 45 | ```html 46 | 47 | 48 | 49 | ``` 50 | 51 | ### Embed a responsive map 52 | 53 | Here's how to embed a responsive Google map using `CAspectRatio`. To make the map take up the entire width, we can ignore the max-width prop. 54 | 55 | ::showcase 56 | ::aspect-ratio-e-map{width=full} 57 | :: 58 | :: 59 | -------------------------------------------------------------------------------- /content/4.components/badge.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Badge 3 | description: Badge Component 4 | version: 2.0+ 5 | --- 6 | 7 | # Badge 8 | 9 | The `CBadge` component is used to highlight an item's status for quick recognition. 10 | 11 | ## Import 12 | 13 | ```js 14 | import { CBadge } from '@chakra-ui/vue-next'; 15 | ``` 16 | 17 | ## Usage 18 | 19 | ::showcase 20 | ::base-badge 21 | :: 22 | :: 23 | 24 | ```html 25 | Default 26 | ``` 27 | 28 | ### Badge Color 29 | 30 | Pass the `color-scheme` prop to customize the color of the `CBadge`. `variant-color` can be any color key that exists in the `$chakra.theme.colors`. Here `$chakra.theme` is your theme object. 31 | 32 | 33 | ::showcase 34 | ::wrap{align="center"} 35 | ::color-badge 36 | :: 37 | 38 | ```html 39 | 40 | Default 41 | Success 42 | Removed 43 | New 44 | 45 | ``` 46 | 47 | ### Badge Variants 48 | 49 | Pass the `variant` prop and set it to either `subtle`, `solid`, or `outline` to get a different style. 50 | 51 | ::showcase 52 | ::variant-badge 53 | :: 54 | :: 55 | 56 | ```html 57 | 58 | Subtle 59 | Solid 60 | Outline 61 | 62 | ``` 63 | 64 | ## Compositon 65 | 66 | 67 | ::showcase 68 | ::composition-badge 69 | :: 70 | :: 71 | 72 | ```html 73 | 74 | 75 | 76 | 77 | Jonathan Bakebwa 78 | 79 | New 80 | 81 | 82 | UI Engineer 83 | 84 | 85 | ``` 86 | 87 | You can also change the size of the badge by passing `font-size` prop. 88 | 89 | ::showcase 90 | ::composition-badge-two 91 | :: 92 | :: 93 | 94 | ```html 95 | 96 | Jonathan Bakebwa 97 | 98 | New 99 | 100 | 101 | ``` 102 | 103 | ## Props 104 | 105 | > The `CBadge` component composes `CBox` component so you can pass props for `Box`. 106 | 107 | | Name | Type | Default | Description | 108 | |-----------------|------------------------------|----------|--------------------------------------------------------------------------------| 109 | | `variant` | `solid`, `subtle`, `outline` | `subtle` | The style variant of the badge | 110 | | `variant-color` | `string` | `gray` | The color scheme to use for the badge. Must be a key in `$chakra.theme.colors` | 111 | 112 | 113 | ## Slots 114 | 115 | | Name | Description | 116 | |---------|----------------------------| 117 | | default | Text rendered inside badge | 118 | 119 | -------------------------------------------------------------------------------- /content/4.components/center.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Center 3 | description: Center Component 4 | version: 2.0+ 5 | --- 6 | 7 | # Center 8 | 9 | Center is a layout component that centers its child within itself. 10 | 11 | ## Import 12 | 13 | ```js 14 | import { CCenter, CCircle, CSquare } from '@chakra-ui/vue-next'; 15 | ``` 16 | 17 | - CCenter: centers its child given `width` and `height` 18 | - CSquare: centers its child given `size` (width and height) 19 | - CCircle: a Square with round `border-radius` 20 | 21 | ## Usage 22 | 23 | Put any child element inside it, give it any `width` or/and `height`, it'll ensure the child is centered. 24 | 25 | ::showcase 26 | ::simple-center{width=full} 27 | :: 28 | :: 29 | 30 | ```html 31 | 32 | This is the Center 33 | 34 | ``` 35 | 36 | ## With Icons 37 | 38 | CCenter can be used to create frames around icons or numbers. 39 | 40 | ::showcase 41 | ::icon-center 42 | :: 43 | :: 44 | 45 | ```html 46 | 47 | 48 | 49 | 50 | 51 | 52 | 1 53 | 54 | 55 | 56 | ``` 57 | 58 | ## Square and Circle 59 | 60 | The Square and Circle components automatically centers its children given the size. 61 | 62 | ::showcase 63 | ::square-and-circle 64 | :: 65 | :: 66 | 67 | ```html 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | ``` 77 | -------------------------------------------------------------------------------- /content/4.components/closebutton.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Close Button 3 | description: Close Button Component 4 | version: 2.0+ 5 | --- 6 | 7 | # Close Button 8 | 9 | CloseButton is essentially a button with a close icon, that performsa close action on a component usually a dialogue or alert component. 10 | 11 | ## Usage 12 | 13 | Chakra-Ui Vue exports one Close-button component 14 | 15 | - **CloseButton**: The box container containing the close icon 16 | 17 | ```js 18 | import { CCloseButton } from '@chakra-ui/vue-next'; 19 | ``` 20 | 21 | Base button 22 | 23 | Simply display the close button by using the `CCloseButton` component 24 | 25 | ::showcase 26 | ::close-button 27 | :: 28 | :: 29 | 30 | ```html 31 | 32 | ``` 33 | 34 | ### Button Size 35 | 36 | You can adjust the button sizes by passing the `size` prop as either `sm`,`md`, or `lg` 37 | 38 | ::showcase 39 | ::close-button-sizes{spacing="4"} 40 | :: 41 | :: 42 | 43 | ```html 44 | 45 | 46 | 47 | 48 | 49 | ``` 50 | 51 | ## Composition 52 | 53 | The Close Button can be used to perform close actions with other components. See how; 54 | 55 | ::showcase 56 | ::close-button-composition 57 | :: 58 | :: 59 | -------------------------------------------------------------------------------- /content/4.components/code.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Code 3 | description: Code component 4 | version: 2.0+ 5 | --- 6 | # Code 7 | 8 | Code is a component used to display inline code. It is composed of the `Box` component with a font family of `mono` for displaying code. 9 | 10 | ## Import 11 | 12 | ```js 13 | import { CCode } from "@chakra-ui/vue-next" 14 | ``` 15 | 16 | ## Usage 17 | 18 | ::showcase 19 | :simple-code 20 | :: 21 | 22 | ```html 23 | Hello world 24 | ``` 25 | 26 | ## Colors 27 | 28 | You can change the color scheme of the component by passing the `colorScheme` prop. 29 | 30 | ::showcase 31 | :colors-code 32 | :: 33 | 34 | ```html 35 | 36 | console.log(welcome) 37 | var chakra = 'awesome!'> 38 | npm install chakra 39 | 40 | ``` 41 | 42 | ## Variant 43 | 44 | You can change the variant of the component by passing the `variant` prop. 45 | 46 | ::showcase 47 | :variant-code 48 | :: 49 | 50 | ```html 51 | 52 | Outline 53 | Solid 54 | Solid 55 | 56 | ``` 57 | 58 | ## Props 59 | 60 | | Name | Type | Default | Description | 61 | |---------------|------------------------------------|----------|---------------------------------------| 62 | | `colorScheme` | `string` | `grey` | The color scheme to use for the code. | 63 | | `variant` | `"solid" \| "subtle" \| "outline"` | `subtle` | The variant of the Code | 64 | 65 | ## Slots 66 | 67 | | Name | Description | 68 | |---------------|---------------------------------------| 69 | | `default` | Used for the `CCode` content. | -------------------------------------------------------------------------------- /content/4.components/collapse.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Collapse 3 | description: Collapse component 4 | version: 2.0+ 5 | --- 6 | # Collapse 7 | 8 | The Collapse component is used to create regions of content that can expand/collapse with a basic animation. It helps to hide content that's not immediately relevant to the user. 9 | 10 | This component leverages [animejs](https://animejs.com/){target="_blank"}, and composes the Box component. 11 | 12 | ## Import 13 | 14 | ```js 15 | import { CCollapse } from "@chakra-ui/vue-next"; 16 | ``` 17 | 18 | ## Usage 19 | 20 | ::showcase 21 | :simple-collapse{width=full} 22 | :: 23 | 24 | 25 | ```html 26 | 27 | 28 | Toggle 29 | 30 | 31 | Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's 32 | standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a 33 | type specimen book. 34 | 35 | 36 | ``` 37 | 38 | ## Change the Starting Height 39 | 40 | ::showcase 41 | :height-collapse{width=full} 42 | :: 43 | 44 | 45 | ```html 46 | 47 | 48 | Show {{ show ? 'Less' : 'More' }} 49 | 50 | 51 | Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's 52 | standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a 53 | type specimen book. 54 | 55 | 56 | ``` 57 | 58 | ## Props 59 | 60 | This component doesn't have any custom props. 61 | 62 | | Name | Type | Description | 63 | |----------------|-----------|---------------------------------------------------------------------------------------------------------------------------------------------------| 64 | | isOpen | `boolean` | If `true`, the content will be visible | 65 | | animateOpacity | `boolean` | If `true`, the opacity of the content will be animated | 66 | | duration | `number` | The animation duration as it expands | 67 | | startingHeight | `number` | he height you want the content in it's collapsed state. Set to `0` by default | 68 | | endingHeight | `number` | The height you want the content in it's expanded state. Set to `auto` by default | 69 | | easing | `string` | Add easing function for entering and leaving state. Accepts easing props from [animejs](https://animejs.com/documentation/#linearEasing){target="_blank"}. Set to `easeInOutSine` by default. | 70 | 71 | ## Events 72 | 73 | | Name | Payload | Description | 74 | |----------------|-----------|---------------------------------------------------------------------------------------------------------------------------------------------------| 75 | | `@start` | `Event` | The event to be called when the collapse animation starts. | 76 | | `@finish` | `Event` | The event to be called when the collapse animation ends. | 77 | -------------------------------------------------------------------------------- /content/4.components/flex.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Flex 3 | description: Flex Component 4 | version: 2.0+ 5 | --- 6 | 7 | # Flex 8 | 9 | Flex is `CBox` with `display: flex` and comes with helpful style shorthand. It renders a `div` element. 10 | 11 | ## Import 12 | 13 | ```js 14 | import { CFlex, CSpacer } from '@chakra-ui/vue-next'; 15 | ``` 16 | 17 | - Flex: A `CBox` with `display: flex`. 18 | - Spacer: Creates an adjustable, empty space that can be used to tune the spacing between child elements within Flex. 19 | 20 | ## Usage 21 | 22 | When using the Flex component, you can use some of the following helpful shorthand props: 23 | 24 | - `direction` for `flexDirection` 25 | - `wrap` for `flexWrap` 26 | - `align` for `alignItems` 27 | - `justify` for `justifyContent` 28 | 30 | While you can pass the verbose props, using the shorthand can save you some time. 31 | 32 | ::showcase 33 | ::simple-flex{width=full} 34 | :: 35 | :: 36 | 37 | ```html 38 | 39 | 40 | Box 1 41 | 42 | 43 | Box 2 44 | 45 | 46 | Box 3 47 | 48 | 49 | ``` 50 | 51 | ### Using the Spacer 52 | 53 | As an alternative to `CStack`, you can combine `CFlex` and `CSpacer` to create stackable and responsive layouts. 54 | 55 | ::showcase 56 | ::spacer-flex{width=full} 57 | :: 58 | :: 59 | 60 | ```html 61 | 62 | 63 | Box 1 64 | 65 | 66 | 67 | Box 2 68 | 69 | 70 | ``` 71 | 72 | ### Flex and Spacer vs Grid vs Stack 73 | 74 | The `CFlex` and `CSpacer` components, `CGrid` and `CHStack` treat children of different widths differently. 75 | 76 | - In `CHStack`, the children will have equal spacing between them but they won't span the entire width of the container. 77 | - In `CGrid`, the starting points of the children will be equally spaced but the gaps between them will not be equal. 78 | - With `CFlex` and `CSpacer`, the children will span the entire width of the container and also have equal spacing between them. 79 | 80 | ::showcase 81 | ::compare-flex{width=full} 82 | :: 83 | :: 84 | 85 | ```html 86 | 87 | Flex and Spacer: Full width, equal Spacing 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | Grid: The children start at the beginning, the 1/3 mark and 2/3 mark 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | HStack: The children have equal spacing but don't span the whole container 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | ``` 115 | 116 | A good use case for `CSpacer` is to create a navbar with a signup/login button aligned to the right. 117 | 118 | Since `CSpacer` renders a `div`, any `gap` value provided to the parent is applied to both sides of this component, and therefore make the gap appear doubled when the spacer is completely collapsed. 119 | 120 | > The example below is not responsive on purpose as you might switch to a collapsed menu on mobile. 121 | 122 | ::showcase 123 | ::sign-up-flex{width=full} 124 | :: 125 | :: 126 | 127 | ```html 128 | 129 | 130 | Chakra App 131 | 132 | 133 | 134 | Sign Up 135 | Log in 136 | 137 | 138 | ``` -------------------------------------------------------------------------------- /content/4.components/heading.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Heading 3 | description: Heading component 4 | version: 2.0+ 5 | --- 6 | 7 | # Heading 8 | 9 | Headings are used for rendering semantic HTML heading elements. 10 | 11 | Heading composes `CBox` so you can use all the style props and add responsive styles as well. It renders an `

` tag by default. 12 | 13 | ## Imports 14 | 15 | ```js 16 | import { CHeading } from '@chakra-ui/vue-next'; 17 | ``` 18 | 19 | ## Usage 20 | 21 | ::showcase 22 | :basic-heading 23 | :: 24 | 25 | 26 | ```html 27 | I'm a Heading 28 | ``` 29 | 30 | ### Changing font size 31 | 32 | To increase the size of the heading, you can use the `font-size` or `size` prop. If you use the `size` prop, the font size of the heading will automatically decrease in size for smaller screens. 33 | 34 | ::showcase 35 | :sizes-heading 36 | :: 37 | 38 | ```html 39 | 40 | 41 | In love with Vue & Nuxt 42 | 43 | 44 | In love with Vue & Nuxt 45 | 46 | 47 | In love with Vue & Nuxt 48 | 49 | 50 | In love with Vue & Nuxt 51 | 52 | 53 | In love with Vue & Nuxt 54 | 55 | 56 | In love with Vue & Nuxt 57 | 58 | 59 | ``` 60 | 61 | ### Truncate heading 62 | 63 | Pass the `is-truncated` prop to render an ellipsis when the headings exceed 64 | 65 | ::showcase 66 | :truncated-heading 67 | :: 68 | 69 | ```html 70 | 71 | Basic text writing, including headings, body text, lists, and more. 72 | 73 | ``` 74 | 75 | ### Override style 76 | 77 | You can override the size of the Heading component by passing the `font-size` prop. 78 | 79 | ::showcase 80 | :override-heading 81 | :: 82 | 83 | ## Composition 84 | 85 | ::showcase 86 | :composition-heading 87 | :: 88 | 89 | ```html 90 | 91 | Modern online and offline payments for Africa 92 | 93 | Paystack helps businesses in Africa get paid by anyone, anywhere in the 94 | world 95 | 96 | 97 | Create a free account 98 | 99 | 100 | ``` 101 | 102 | ## Props 103 | 104 | > The `CHeading` composes the `CBox` component. So it accepts all Box props along with the related CSS grid props. See Box component for list of props. 105 | 106 | | Name | Values | Default | Description | 107 | |--------|-------------------------------------|---------|--------------------------| 108 | | `size` | `2xl`, `xl`, `lg`, `md`, `sm`, `xs` | `xl` | The size of the heading. | 109 | | `as` | `h1`, `h2`, `h3`, `h4`, `h5`, `h6` | `h2` | The final tag rendered. | -------------------------------------------------------------------------------- /content/4.components/image.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Image 3 | description: Image component 4 | version: 2.0+ 5 | --- 6 | # Image 7 | 8 | The Image component is used to display images with support for fallback. 9 | 10 | ## Import 11 | 12 | ```js 13 | import { CImage } from "@chakra-ui/vue-next" 14 | ``` 15 | 16 | ## Usage 17 | 18 | ::showcase 19 | :simple-image 20 | :: 21 | 22 | 23 | ```html 24 | 25 | 26 | 27 | ``` 28 | 29 | ## Size 30 | 31 | The size of the image can be adjusted using the `box-size` prop. 32 | 33 | ::showcase 34 | :box-image 35 | :: 36 | 37 | 38 | ```html 39 | 40 | 41 | 42 | 43 | 44 | ``` 45 | 46 | ## Image with border radius 47 | 48 | ::showcase 49 | :rounded-image 50 | :: 51 | 52 | 53 | ```html 54 | 55 | 56 | 57 | ``` 58 | 59 | ## Fallback support 60 | 61 | The Image component allows you provide a fallback placeholder. The placeholder is displayed when: 62 | 63 | - The fallback or `fallback-src` prop is provided 64 | - The image provided in `src` is currently loading 65 | - An error occurred while loading the image `src` 66 | - No `src` prop was passed 67 | 68 | > You can also opt out of this behavior by passing the ignoreFallback prop. 69 | 70 | ::showcase 71 | ::fallback-image 72 | :: 73 | :: 74 | 75 | ```html 76 | 77 | ``` 78 | 79 | ## Props 80 | 81 | | Name | Type | Default | Description | 82 | |------------------|-----------------------------|---------|---------------------------------------------------------------------------------------------------------------------------------------| 83 | | `src` | `string` | | The path to the image source | 84 | | `fallback-src` | `string` | | In event there was an error loading the `src`, specify a fallback. In most cases, this can be an avatar or image placeholder | 85 | | `alt` | `string` | | The alt text that describes the image | 86 | | `ignoreFallback` | `boolean` | `false` | Opt out of the `fallback-src` logic and use the `CImage` directly | -------------------------------------------------------------------------------- /content/4.components/simplegrid.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: SimpleGrid 3 | description: SimpleGrid component 4 | version: 2.0+ 5 | --- 6 | 7 | # SimpleGrid 8 | 9 | 10 | SimpleGrid is a user-friendly tool for effortlessly creating responsive grid layouts, utilizing a div element with display: grid. 11 | 12 | ## Import 13 | 14 | ```js 15 | import { CSimpleGrid } from '@chakra-ui/vue-next'; 16 | ``` 17 | 18 | ## Usage 19 | 20 | Specifying the number of columns for the grid layout. 21 | 22 | ### Sample Tag : 23 | 24 | ::showcase 25 | ::simple-grid-example{width=full} 26 | :: 27 | :: 28 | 29 | ```html 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | ``` 38 | 39 | You can also make it responsive by passing array or object values into the `columns` prop. 40 | 41 | ::showcase 42 | ::simple-grid-responsive{width=full} 43 | :: 44 | :: 45 | 46 | ```html 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | ``` 55 | 56 | ### Auto-responsive grid# 57 | 58 | To make the grid responsive adjust automatically without passing `columns`, simply pass the `min-child-width` prop to specify the `min-width` a child should have before adjusting the layout. 59 | 60 | This uses css grid `auto-fit` and `minmax()` internally. 61 | 62 | ### Changing the spacing for columns and rows 63 | 64 | Simply pass the `spacing` prop to change the row and column spacing between the grid items. `SimpleGrid` also allows you pass `spacing-x` and `spacing-y` to define the space between columns and rows respectively. 65 | 66 | ::showcase 67 | ::simple-grid-spacing{width=full} 68 | :: 69 | :: 70 | 71 | ```html 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | ``` 80 | 81 | ## Props 82 | 83 | SimpleGrid composes `Box` so you can pass all the `Box` props and CSS grid props with the addition of these: 84 | 85 | | Name | Type | Description | 86 | |------------------|-----------------------------|---------------------------------------------------------------------------------------------------------------------------------------| 87 | | `columns` | `number` | The number of columns | 88 | | `spacing` | `GridProps["gridGap"]` | The gap between the grid items | 89 | | `spacingX` | `GridProps["gridGap"]` | The `column` gap between the grid items | 90 | | `spacingY` | `GridProps["gridGap"]` | The `row` gap between the grid items | 91 | | `minChildWidth` | `CSSProperties["minWidth"]` | The width at which child elements will break into columns. Pass a number for pixel values or a string for any other valid CSS length. | -------------------------------------------------------------------------------- /content/4.components/tabs.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Tabs 3 | description: Tabs component 4 | version: 2.0+ 5 | --- 6 | 7 | # Tabs 8 | 9 | An accessible tabs component. 10 | 11 | The `CTab` and `CTabPanel` elements are associated by their order in the tree. None of the components are empty wrappers, each is associated with a real DOM element in the document, giving you maximum control over styling and composition. 12 | 13 | ## Import 14 | 15 | ```js 16 | import { CTabs, CTabList, CTabPanels, CTab, CTabPanel } from "@chakra-ui/vue-next"; 17 | ``` 18 | 19 | ## Usage 20 | 21 | ::showcase 22 | :simple-tabs{width=full} 23 | :: 24 | 25 | 26 | ```html 27 | 50 | 51 | 55 | ``` 56 | 57 | ## Tab Variants 58 | 59 | Tabs come in 6 different variants to style the tabs: `line`,`enclosed`, `enclosed-colored`, `soft-rounded`, `solid-rounded`, `unstyled`. 60 | 61 | ::showcase 62 | ::variant-tabs{width=full} 63 | :: 64 | :: 65 | 66 | ```html 67 | 68 | 69 | 70 | One 71 | Two 72 | Three 73 | 74 | 75 | 76 | 77 |

Panel One

78 |
79 | 80 |

Panel Two

81 |
82 | 83 |

Panel Three

84 |
85 |
86 |
87 |
88 | ``` 89 | 90 | You can also change the color scheme for any specific variant by passing the `color-scheme`. 91 | > The value of `color-scheme` must exist in the theme object, and must be a key in theme.colors that has the 50 - 900 color values. 92 | 93 | ::showcase 94 | ::colored-tabs{width=full} 95 | :: 96 | :: 97 | 98 | ```html 99 | 100 | 101 | 102 | One 103 | Two 104 | Three 105 | 106 | 107 | 108 | 109 |

Panel One

110 |
111 | 112 |

Panel Two

113 |
114 | 115 |

Panel Three

116 |
117 |
118 |
119 |
120 | ``` 121 | 122 | ### Tab Sizes 123 | 124 | You can change the size of the tab by passing `size` prop. We support 3 sizes `sm`, `md`, `lg` 125 | 126 | ::showcase 127 | ::sizes-tabs{width=full} 128 | :: 129 | :: 130 | 131 | ```html 132 | 133 | 134 | 135 | One 136 | Two 137 | Three 138 | 139 | 140 | 141 | 142 |

Panel One

143 |
144 | 145 |

Panel Two

146 |
147 | 148 |

Panel Three

149 |
150 |
151 |
152 |
153 | ``` 154 | 155 | ## Fitted Tabs 156 | Stretch the tab list to fit the container by passing `is-fitted` prop. 157 | 158 | ::showcase 159 | ::fitted-tabs{width=full} 160 | :: 161 | :: 162 | -------------------------------------------------------------------------------- /env.d.ts: -------------------------------------------------------------------------------- 1 | declare module "vue-live"; 2 | -------------------------------------------------------------------------------- /layouts/default.vue: -------------------------------------------------------------------------------- 1 | 11 | 12 | 37 | -------------------------------------------------------------------------------- /layouts/home.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 14 | -------------------------------------------------------------------------------- /middleware/redirection.middleware.ts: -------------------------------------------------------------------------------- 1 | export default defineNuxtRouteMiddleware((to, _from) => { 2 | if (to.path === '/') { 3 | navigateTo('/getting-started') 4 | } else { 5 | navigateTo(to.path) 6 | } 7 | }) 8 | -------------------------------------------------------------------------------- /modules/content-chunks.module.ts: -------------------------------------------------------------------------------- 1 | import { 2 | addPlugin, 3 | createResolver, 4 | defineNuxtModule, 5 | useNuxt, 6 | } from "@nuxt/kit"; 7 | 8 | export default defineNuxtModule({ 9 | meta: { 10 | name: "components-chunk", 11 | }, 12 | setup() { 13 | const nuxt = useNuxt(); 14 | let dirs: string[]; 15 | 16 | nuxt.hook("components:dirs", (_dirs) => { 17 | dirs = _dirs.map((d) => (typeof d === "string" ? d : d.path)); 18 | }); 19 | 20 | const usedComponents = [ 21 | "ContentDoc", 22 | "ContentRendererMarkdown", 23 | "ProseP", 24 | "ProseA", 25 | "ProseH2", 26 | "ProseH3", 27 | "ProseLi", 28 | "ProseOl", 29 | "ProseUl", 30 | "ProseStrong", 31 | "ProseBlockquote", 32 | "ProseThead", 33 | "ProseTable", 34 | "ProseTr", 35 | "ProseTd", 36 | "ProseTh", 37 | "ProseTbody", 38 | "ProseCode", 39 | "ProseCodeInline", 40 | ]; 41 | 42 | // Exclude non-prose content components 43 | nuxt.hook("components:extend", (components) => { 44 | const toPurge = []; 45 | for (const component of components) { 46 | if ( 47 | "filePath" in component && 48 | component.filePath.includes("@nuxt/content") 49 | ) { 50 | if (!usedComponents.includes(component.pascalName)) { 51 | toPurge.push(component); 52 | } 53 | } 54 | } 55 | for (const component of toPurge) { 56 | components.splice(components.indexOf(component), 1); 57 | } 58 | }); 59 | 60 | nuxt.hook("vite:extendConfig", (config, { isServer }) => { 61 | config.build ||= {}; 62 | config.build.rollupOptions ||= {}; 63 | config.build.rollupOptions.output ||= {}; 64 | if (Array.isArray(config.build.rollupOptions.output) || isServer) return; 65 | config.build.rollupOptions.output.manualChunks = (id) => { 66 | if ( 67 | (id.includes("@nuxt/content") || id.includes("ProseImg")) && 68 | dirs.some((dir) => id.includes(dir)) 69 | ) { 70 | return "components-chunk"; 71 | } 72 | }; 73 | }); 74 | }, 75 | }); 76 | -------------------------------------------------------------------------------- /nuxt.config.ts: -------------------------------------------------------------------------------- 1 | import { componentResolver } from '@chakra-ui/vue-auto-import'; 2 | import Components from 'unplugin-vue-components/vite'; 3 | import { siteLang, siteName } from './config/site-config'; 4 | import * as iconSet from './utils/icons'; 5 | import extendedTheme from './theme'; 6 | 7 | const { extendedIcons: extend, ...library } = iconSet; 8 | 9 | export default defineNuxtConfig({ 10 | nitro: { 11 | prerender: { 12 | routes: [ 13 | '/', 14 | '/getting-started', 15 | '/getting-started/installation', 16 | '/getting-started/nuxt', 17 | '/getting-started/design-principles', 18 | '/styled-system', 19 | '/styled-system/responsive-styles', 20 | '/components/accordion', 21 | '/components/alert', 22 | '/components/avatar', 23 | '/components/checkbox', 24 | '/components/tag', 25 | '/sitemap.xml' 26 | ] 27 | }, 28 | serveStatic: true 29 | }, 30 | app: { 31 | head: { 32 | title: siteName, 33 | htmlAttrs: { 34 | lang: siteLang 35 | }, 36 | link: [{ rel: 'icon', type: 'image/png', href: '/favicon.ico' }] 37 | } 38 | }, 39 | experimental: { 40 | componentIslands: true 41 | }, 42 | // @ts-ignore 43 | chakra: { 44 | extendTheme: extendedTheme, 45 | icons: { 46 | library, 47 | extend 48 | } 49 | }, 50 | // @ts-ignore 51 | modules: [ 52 | '@nuxt/content', 53 | '~/modules/content-chunks.module.ts', 54 | '@chakra-ui/nuxt-next', 55 | '@nuxtjs/fontaine', 56 | '@nuxtjs/html-validator', 57 | '@nuxtjs/robots', 58 | '@nuxthq/studio' 59 | ], 60 | fontMetrics: { 61 | fonts: [ 62 | 'DM Sans', 63 | { 64 | family: 'DM Sans', 65 | src: '@/styles/typography/files/dm-sans-all-400-normal.woff2' 66 | } 67 | ] 68 | }, 69 | css: ['@/styles/typography/all.css', '~/styles/prism.scss'], 70 | content: { 71 | // documentDriven: true, 72 | markdown: { 73 | toc: { depth: 5, searchDepth: 3 }, 74 | // anchorLinks: true, 75 | remarkPlugins: ['remark-prism'], 76 | rehypePlugins: [ 77 | 'rehype-prism-plus', 78 | [ 79 | 'rehype-autolink-headings', 80 | { 81 | behavior: 'append', 82 | test: ['h2', 'h3', 'h4'], 83 | properties: { className: ['anchor'] } 84 | } 85 | ] 86 | ] 87 | } 88 | }, 89 | vite: { 90 | plugins: [ 91 | Components({ 92 | resolvers: [componentResolver] 93 | }) 94 | ] 95 | } 96 | }); 97 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@chakra-ui/vue-docs-next", 3 | "version": "2.0.0-beta.0", 4 | "description": "Website for Chakra UI Vue Next", 5 | "main": "index.html", 6 | "private": true, 7 | "repository": "https://github.com/chakra-ui/chakra-ui-vue-next/tree/master/website", 8 | "author": "Jonathan Bakebwa codebender828@gmail.com", 9 | "scripts": { 10 | "clean": "rimraf dist", 11 | "build": "nuxt build", 12 | "dev": "nuxt dev", 13 | "generate": "nuxt generate", 14 | "preview": "nuxt preview", 15 | "postinstall": "nuxt prepare", 16 | "lint": "eslint --ext .ts,.js,.vue .", 17 | "format": "prettier . --write" 18 | }, 19 | "devDependencies": { 20 | "@commitlint/cli": "^17.3.0", 21 | "@commitlint/config-conventional": "^17.3.0", 22 | "@nuxt/content": "^2.4.3", 23 | "@nuxthq/studio": "^1.0.0", 24 | "@nuxtjs/eslint-config-typescript": "^12.0.0", 25 | "@nuxtjs/fontaine": "^0.2.5", 26 | "@nuxtjs/html-validator": "^1.2.5", 27 | "@typescript-eslint/parser": "^5.47.0", 28 | "add": "^2.0.6", 29 | "eslint": "^8.30.0", 30 | "eslint-config-prettier": "^8.5.0", 31 | "eslint-plugin-prettier": "^4.2.1", 32 | "eslint-plugin-vue": "^9.8.0", 33 | "husky": "^8.0.2", 34 | "nuxt": "^3.4.2", 35 | "prettier": "^2.8.1", 36 | "typescript": "^4.9.4" 37 | }, 38 | "dependencies": { 39 | "@babel/core": "^7.12.9", 40 | "@chakra-ui/nuxt-next": "2.1.0-beta.11", 41 | "@chakra-ui/vue-auto-import": "3.0.0-beta.7", 42 | "@chakra-ui/vue-next": "0.0.0-dev-20230410112159", 43 | "@fontsource/dm-sans": "^4.5.9", 44 | "@fontsource/ibm-plex-mono": "^4.5.13", 45 | "@nuxt/vite-builder": "^3.0.0", 46 | "@nuxtjs/color-mode": "^3.2.0", 47 | "@nuxtjs/robots": "^3.0.0", 48 | "@types/prismjs": "^1.26.0", 49 | "@vueuse/core": "^9.13.0", 50 | "add": "^2.0.6", 51 | "feather-icons-paths": "^1.1.1", 52 | "highlight.js": "^11.7.0", 53 | "prismjs": "^1.29.0", 54 | "rehype-autolink-headings": "^6.1.1", 55 | "rehype-prism-plus": "^1.5.0", 56 | "remark-prism": "^1.3.6", 57 | "sass": "^1.56.2", 58 | "sitemap": "^7.1.1", 59 | "slugify": "^1.6.5", 60 | "unplugin-vue-components": "^0.24.0", 61 | "vue": "^3.2.47", 62 | "vue-live": "^2.1.0", 63 | "vue-prism-editor": "^2.0.0-alpha.2", 64 | "vue-router": "^4.1.6" 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /pages/[...slug].vue: -------------------------------------------------------------------------------- 1 | 6 | -------------------------------------------------------------------------------- /pages/index.vue: -------------------------------------------------------------------------------- 1 | 30 | 31 | 39 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chakra-ui/vue-docs/863e34f3689da318ffd67922a418ba39c9638e56/public/favicon.ico -------------------------------------------------------------------------------- /server/routes/sitemap.xml.ts: -------------------------------------------------------------------------------- 1 | import { SitemapStream, streamToPromise } from 'sitemap'; 2 | import { serverQueryContent } from '#content/server'; 3 | 4 | export default defineEventHandler(async (event) => { 5 | // Fetch all documents 6 | const docs = await serverQueryContent(event).find(); 7 | const sitemap = new SitemapStream({ 8 | hostname: 'https://next.vue.chakra-ui.com' 9 | }); 10 | 11 | for (const doc of docs) { 12 | sitemap.write({ 13 | url: doc._path, 14 | changefreq: 'daily' 15 | }); 16 | } 17 | sitemap.end(); 18 | 19 | return streamToPromise(sitemap); 20 | }); 21 | -------------------------------------------------------------------------------- /styles/typography/400.css: -------------------------------------------------------------------------------- 1 | /* dm-sans-latin-ext-400-normal*/ 2 | @font-face { 3 | font-family: 'DM Sans'; 4 | font-style: normal; 5 | font-display: swap; 6 | font-weight: 400; 7 | src: url('~/assets/fonts/dm-sans-latin-ext-400-normal.woff2') format('woff2'), url('~/assets/fonts/dm-sans-all-400-normal.woff') format('woff'); 8 | unicode-range: U+0100-024F,U+0259,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF; 9 | } 10 | /* dm-sans-latin-400-normal*/ 11 | @font-face { 12 | font-family: 'DM Sans'; 13 | font-style: normal; 14 | font-display: swap; 15 | font-weight: 400; 16 | src: url('~/assets/fonts/dm-sans-latin-400-normal.woff2') format('woff2'), url('~/assets/fonts/dm-sans-all-400-normal.woff') format('woff'); 17 | unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; 18 | } 19 | 20 | 21 | /* ibm-plex-mono-latin-400-normal*/ 22 | @font-face { 23 | font-family: 'IBM Plex Mono'; 24 | font-style: normal; 25 | font-display: swap; 26 | font-weight: 400; 27 | src: url('~/assets/fonts/ibm-plex-mono-latin-400-normal.woff2') format('woff2'), url('~/assets/fonts/ibm-plex-mono-latin-400-normal.woff') format('woff'); 28 | } 29 | 30 | /* ibm-plex-mono-latin-ext-400-normal*/ 31 | @font-face { 32 | font-family: 'IBM Plex Mono'; 33 | font-style: normal; 34 | font-display: swap; 35 | font-weight: 400; 36 | src: url('~/assets/fonts/ibm-plex-mono-latin-ext-400-normal.woff2') format('woff2'), url('~/assets/fonts/ibm-plex-mono-latin-ext-400-normal.woff') format('woff'); 37 | } 38 | 39 | -------------------------------------------------------------------------------- /styles/typography/500.css: -------------------------------------------------------------------------------- 1 | /* dm-sans-latin-ext-500-normal*/ 2 | @font-face { 3 | font-family: 'DM Sans'; 4 | font-style: normal; 5 | font-display: swap; 6 | font-weight: 500; 7 | src: url('~/assets/fonts/dm-sans-latin-ext-500-normal.woff2') format('woff2'), url('~/assets/fonts/dm-sans-all-500-normal.woff') format('woff'); 8 | unicode-range: U+0100-024F,U+0259,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF; 9 | } 10 | /* dm-sans-latin-500-normal*/ 11 | @font-face { 12 | font-family: 'DM Sans'; 13 | font-style: normal; 14 | font-display: swap; 15 | font-weight: 500; 16 | src: url('~/assets/fonts/dm-sans-latin-500-normal.woff2') format('woff2'), url('~/assets/fonts/dm-sans-all-500-normal.woff') format('woff'); 17 | unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; 18 | } 19 | -------------------------------------------------------------------------------- /styles/typography/700.css: -------------------------------------------------------------------------------- 1 | /* dm-sans-latin-ext-700-normal*/ 2 | @font-face { 3 | font-family: 'DM Sans'; 4 | font-style: normal; 5 | font-display: swap; 6 | font-weight: 700; 7 | src: url('~/assets/fonts/dm-sans-latin-ext-700-normal.woff2') format('woff2'), url('~/assets/fonts/dm-sans-all-700-normal.woff') format('woff'); 8 | unicode-range: U+0100-024F,U+0259,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF; 9 | } 10 | /* dm-sans-latin-700-normal*/ 11 | @font-face { 12 | font-family: 'DM Sans'; 13 | font-style: normal; 14 | font-display: swap; 15 | font-weight: 700; 16 | src: url('~/assets/fonts/dm-sans-latin-700-normal.woff2') format('woff2'), url('~/assets/fonts/dm-sans-all-700-normal.woff') format('woff'); 17 | unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; 18 | } 19 | -------------------------------------------------------------------------------- /styles/typography/all.css: -------------------------------------------------------------------------------- 1 | /* @import url(./300.css); */ 2 | @import url(./400.css); 3 | @import url(./500.css); 4 | @import url(./700.css); 5 | 6 | 7 | :root { 8 | --chakra-fonts-heading: "DM Sans", sans-serif !important; 9 | --chakra-fonts-body: "DM Sans", sans-serif !important; 10 | --chakra-fonts-mono: "IBM Plex Mono", monospace !important; 11 | } 12 | 13 | html { 14 | font-family: var(--chakra-fonts-body) !important; 15 | } 16 | 17 | pre, code { 18 | font-family: var(--chakra-fonts-mono) !important; 19 | } 20 | -------------------------------------------------------------------------------- /theme/components/button.ts: -------------------------------------------------------------------------------- 1 | import { defineStyleConfig } from '@chakra-ui/vue-next'; 2 | 3 | export const Button = defineStyleConfig({ 4 | baseStyle: { 5 | rounded: 'full' 6 | }, 7 | defaultProps: { 8 | colorScheme: 'emerald' 9 | } 10 | }); 11 | -------------------------------------------------------------------------------- /theme/components/index.ts: -------------------------------------------------------------------------------- 1 | export * from './button'; 2 | -------------------------------------------------------------------------------- /theme/global-styles.ts: -------------------------------------------------------------------------------- 1 | export const globalStyles = { 2 | 'html, body': { 3 | color: 'bodyText', 4 | bg: 'bodyBg', 5 | fontFamily: 'body !important' 6 | }, 7 | table: { 8 | width: '100%', 9 | marginY: '8', 10 | th: { 11 | bg: 'gray.100' 12 | }, 13 | 'th, td': { 14 | borderWidth: '1px', 15 | py: '3', 16 | px: '5', 17 | textAlign: 'start' 18 | } 19 | }, 20 | 21 | mark: { 22 | bg: 'transparent' 23 | }, 24 | 25 | '.chakra-prose': { 26 | output: { 27 | fontFeatureSettings: 'tnum', 28 | fontVariantNumeric: 'tabular-nums' 29 | }, 30 | 'li:not([role])': { 31 | marginY: '1' 32 | }, 33 | 'ol:not([role]), ul:not([role])': { 34 | marginY: '5', 35 | paddingLeft: '4' 36 | }, 37 | 'h2,h3,h4': { 38 | scrollMarginTop: '24', 39 | '&:hover': { 40 | 'a.anchor': { opacity: 1 } 41 | }, 42 | 'a:focus': { opacity: 1 } 43 | }, 44 | 'p, li:not([role])': { 45 | lineHeight: 'tall' 46 | }, 47 | 'p + p': { 48 | marginTop: '6' 49 | }, 50 | 'a.anchor': { 51 | opacity: 0, 52 | color: 'green.400', 53 | transition: 'opacity 0.2s ease-in-out', 54 | marginX: '3', 55 | '&:before': { 56 | content: '"#"' 57 | }, 58 | '&:hover': { 59 | opacity: '1' 60 | } 61 | } 62 | } 63 | }; 64 | -------------------------------------------------------------------------------- /theme/index.ts: -------------------------------------------------------------------------------- 1 | import { extendTheme } from '@chakra-ui/vue-next'; 2 | import { textStyles } from './text-styles'; 3 | import { globalStyles } from './global-styles'; 4 | import { layerStyles } from './layer-styles'; 5 | import { semanticTokens } from './semantic-tokens'; 6 | import * as components from './components'; 7 | 8 | export default extendTheme({ 9 | colors: { 10 | emerald: { 11 | DEFAULT: '#30855F', 12 | default: '#30855F', 13 | 50: '#B6E5D0', 14 | 100: '#A3DEC4', 15 | 200: '#7ED0AB', 16 | 300: '#58C393', 17 | 400: '#3EAA7A', 18 | 500: '#30855F', 19 | 600: '#226044', 20 | 700: '#153A29', 21 | 800: '#07150F', 22 | 900: '#000000' 23 | }, 24 | discord: { 25 | primary: '#7289DA', 26 | accessible: '#5570D2' 27 | } 28 | }, 29 | fonts: { 30 | heading: 31 | 'DM Sans, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"', 32 | body: 'DM Sans, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"', 33 | mono: 'IBM Plex Mono' 34 | }, 35 | shadows: { 36 | outline: '0 0 0 4px rgba(47, 133, 90, 0.62)', 37 | search: 38 | '0 0 0 1px rgba(16,22,26,.1), 0 4px 8px rgba(16,22,26,.2), 0 18px 46px 6px rgba(16,22,26,.2)' 39 | }, 40 | styles: { 41 | global: globalStyles 42 | }, 43 | textStyles, 44 | layerStyles, 45 | semanticTokens, 46 | components 47 | }); 48 | -------------------------------------------------------------------------------- /theme/layer-styles.ts: -------------------------------------------------------------------------------- 1 | import type { SystemStyleObject } from '@chakra-ui/vue-next'; 2 | 3 | const hero: Record = { 4 | notice: { 5 | bg: 'pillNoticeBg', 6 | color: 'pillNoticeText', 7 | rounded: 'full', 8 | px: 3, 9 | py: 1 10 | } 11 | }; 12 | 13 | export const layerStyles = { 14 | hero 15 | }; 16 | -------------------------------------------------------------------------------- /theme/semantic-tokens.ts: -------------------------------------------------------------------------------- 1 | export const semanticTokens = { 2 | colors: { 3 | bodyBg: { 4 | default: `white`, 5 | _dark: `#0e0f15` 6 | }, 7 | pageBackgroundGradiant: `radial-gradient(circle at 10% 45%,rgba(149,176,241,0), rgba(149,176,241,0) 50%),radial-gradient(circle at 82% 26%,rgba(43,199,119,0.05), rgba(43,199,119,0) 50%),radial-gradient(circle at 11% 15%,rgba(149,0,255,0.06), rgba(149,0,255,0) 50%),radial-gradient(circle at 27% 54%,rgba(86,210,146,0.06), rgba(86,210,146,0) 30%),radial-gradient(circle at 67% 70%,rgba(101,0,255,0.05), rgba(101,0,255,0) 10%)`, 8 | bodyText: { 9 | default: 'gray.700', 10 | _dark: 'whiteAlpha.900' 11 | }, 12 | _bodyBg: { 13 | default: 'white', 14 | _dark: 'gray.900' 15 | }, 16 | subtitleText: { 17 | default: 'gray.500', 18 | _dark: 'whiteAlpha.600' 19 | }, 20 | pillNoticeBg: { 21 | default: 'emerald.50', 22 | _dark: 'rgba(41, 236, 139, 0.14)' 23 | }, 24 | pillNoticeText: { 25 | default: '#226044', 26 | _dark: 'rgb(170, 255, 213)' 27 | }, 28 | featuresBorderColor: { 29 | default: `#19b971`, 30 | _dark: `rgba(41, 236, 139, 0.5)` 31 | }, 32 | featuresBorderColorHover: { 33 | default: `#19b971`, 34 | _dark: `rgba(41, 236, 139, 0.7)` 35 | }, 36 | featuresTextColor: { 37 | default: `rgba(41, 236, 139, 0.1)`, 38 | _dark: `rgba(41, 236, 139, 0.2)` 39 | }, 40 | featuresTextColorHover: { 41 | default: `rgba(41, 236, 139, 0.2)`, 42 | _dark: `rgba(41, 236, 139, 0.3)` 43 | } 44 | } 45 | }; 46 | -------------------------------------------------------------------------------- /theme/text-styles.ts: -------------------------------------------------------------------------------- 1 | import { SystemStyleObject } from '@chakra-ui/vue-system' 2 | 3 | const sidebarLink: SystemStyleObject = { 4 | display: 'inline-block', 5 | paddingY: '1', 6 | transition: 'color 0.2s ease-in-out', 7 | _activeLink: { 8 | '&:after': { 9 | content: "''", 10 | position: 'absolute', 11 | width: '100%', 12 | height: '1px', 13 | transform: 'scaleX(1)', 14 | top: '85%', 15 | left: '0px', 16 | right: '0px', 17 | backgroundColor: 'currentColor' 18 | }, 19 | fontWeight: 'bold' 20 | } 21 | } 22 | 23 | const display: Record = { 24 | '2xl': { 25 | fontSize: { base: '4xl', sm: '5xl', md: '7xl' }, 26 | fontWeight: 'bold', 27 | lineHeight: 'shorter', 28 | letterSpacing: 'tight' 29 | }, 30 | 31 | xl: { 32 | fontSize: { base: '4xl', md: '6xl' }, 33 | fontWeight: 'bold', 34 | lineHeight: 'shorter', 35 | letterSpacing: 'tight' 36 | }, 37 | lg: { 38 | fontSize: { base: '3xl', md: '4xl' }, 39 | fontWeight: 'bold', 40 | letterSpacing: 'tight', 41 | lineHeight: '1.2' 42 | }, 43 | md: { 44 | fontSize: { base: 'xl', md: '2xl' }, 45 | fontWeight: 'bold', 46 | lineHeight: '1.4', 47 | letterSpacing: 'tight' 48 | }, 49 | sm: { 50 | fontSize: 'xl', 51 | fontWeight: 'semibold', 52 | lineHeight: '1.5' 53 | }, 54 | xs: { 55 | fontWeight: 'semibold', 56 | lineHeight: '1.5' 57 | } 58 | } 59 | 60 | const text: Record = { 61 | '2xl': { 62 | fontSize: { base: 'xl', md: '2xl' }, 63 | lineHeight: 'tall' 64 | }, 65 | xl: { 66 | fontSize: { base: 'lg', md: 'xl' }, 67 | lineHeight: 'tall' 68 | }, 69 | lg: { 70 | fontSize: 'lg', 71 | lineHeight: 'tall' 72 | }, 73 | md: { 74 | fontSize: '16px', 75 | lineHeight: '24px' 76 | }, 77 | sm: { 78 | fontSize: '14px', 79 | lineHeight: '20px' 80 | }, 81 | xs: { 82 | fontSize: '12px', 83 | lineHeight: '18px' 84 | } 85 | } 86 | 87 | const link: SystemStyleObject = { 88 | color: 'textLink', 89 | cursor: 'pointer', 90 | fontWeight: 'medium', 91 | textDecoration: 'underline', 92 | textDecorationColor: 'cyan.default', 93 | textDecorationThickness: '1px', 94 | textUnderlineOffset: '2px', 95 | _hover: { 96 | textDecorationThickness: '2px' 97 | } 98 | } 99 | 100 | export const textStyles: Record = { 101 | heading: { 102 | fontFamily: 'heading', 103 | textAlign: 'center', 104 | fontWeight: 'bold', 105 | letterSpacing: '-0.015em', 106 | lineHeight: '1.24', 107 | fontSize: { base: '2rem', md: '3.5rem' } 108 | }, 109 | 'heading-2': { 110 | fontFamily: 'heading', 111 | textAlign: 'center', 112 | fontWeight: 'bold', 113 | letterSpacing: '-0.015em', 114 | lineHeight: '1.24', 115 | fontSize: { base: '1.75rem', md: '2.75rem' } 116 | }, 117 | caps: { 118 | textTransform: 'uppercase', 119 | fontSize: 'sm', 120 | letterSpacing: 'widest', 121 | fontWeight: 'bold' 122 | }, 123 | sidebarLink, 124 | link, 125 | display, 126 | text 127 | } 128 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | // https://v3.nuxtjs.org/concepts/typescript 3 | "extends": "./.nuxt/tsconfig.json" 4 | } 5 | --------------------------------------------------------------------------------