Components

Base Components

1. Introduction

Base components are the core components that are used in the Nexus AI. They are used in other section or card components and can be used directly in the content. Think of them as the base building blocks of the website.

Base components are located in the components/base folder. There are about 37 base components in total.

Each component has props and slots to customize them. They are typically size, variant, label etc.

Here is the list of all the base components:

  1. Accordion
  2. BackgroundSpotlight
  3. BackgroundSpotlightWave
  4. Badge
  5. Breadcrumbs
  6. Button
  7. Container
  8. Divider
  9. DocsContentArticle
  10. DocsContentBody
  11. DocsContentDivider
  12. DocsContentFooter
  13. DocsContentHeader
  14. DocsContentPagination
  15. DocsGrid
  16. DocsSearchButton
  17. DocsSearchDialog
  18. DocsSidebar
  19. FeatureIcon
  20. FeaturesTable
  21. FooterLinks
  22. IconButton
  23. IntegSidebar
  24. Logo
  25. MenuButton
  26. NavBar
  27. NavItems
  28. NavLink
  29. SearchInput
  30. Section
  31. SectionHeader
  32. SidebarItem
  33. SocialLink
  34. SubscribeInput
  35. Tag
  36. TextArea
  37. TextInput
2. Usage

In the nuxt config, components/ directory is set to globally register and without path prefix. This means that you can directly use the components by its name.

Here is an example of Accordion and Divider components used in the FaqSection component:

<template v-for="(faq, index) in faqs">
  <Divider v-if="index != 0" />
  <Accordion :title="faq.question" :desc="faq.answer" />
</template>

To keep the DRY principle, base components are designed to be used in other components.

Nuxt Image
Layout Components

© 2024 Stylokit. All rights reserved.