Search

Navigation

Navigation003

A navigation template. Items have a minimum width set, and the number of columns changes according to the container width.

大きい画面で見る
Code
en.astro
---
import DemoLayout from '@/layouts/DemoLayout.astro';

import { Container, Flex, AutoColumns, Icon, BoxLink, Stack, Text, Heading } from 'lism-css/astro';
import './_style.css';
---

<DemoLayout title="Navigation003">
  <Container isWrapper="l" bgc="base-2" py="50" hasGutter>
    <Stack g="50">
      <Heading level="2" class="u--trim" fz="2xl" fw="bold" ta="center">Product Categories</Heading>
      <Stack g="50">
        <AutoColumns cols="18rem" g="30">
          <BoxLink
            href="#"
            layout="flex"
            g="30"
            ai="center"
            jc="between"
            p="30"
            bd
            bgc="white"
            bdrs="10"
            set="var:hov"
            hasTransition
            hov={{ bxsh: '20' }}
          >
            <Text class="u--trim" fz="m" fw="bold" hasTransition hov="in:cLink">Kitchen Appliances</Text>
            <Flex ai="center" jc="center" bgc="black" bdrs="99" p="10">
              <Icon icon="arrow-right" fz="2xs" c="white" />
            </Flex>
          </BoxLink>
          <BoxLink
            href="#"
            layout="flex"
            g="30"
            ai="center"
            jc="between"
            p="30"
            bd
            bgc="white"
            bdrs="10"
            set="var:hov"
            hasTransition
            hov={{ bxsh: '20' }}
          >
            <Text class="u--trim" fz="m" fw="bold" hasTransition hov="in:cLink">Audio</Text>
            <Flex ai="center" jc="center" bgc="black" bdrs="99" p="10">
              <Icon icon="arrow-right" fz="2xs" c="white" />
            </Flex>
          </BoxLink>
          <BoxLink
            href="#"
            layout="flex"
            g="30"
            ai="center"
            jc="between"
            p="30"
            bd
            bgc="white"
            bdrs="10"
            set="var:hov"
            hasTransition
            hov={{ bxsh: '20' }}
          >
            <Text class="u--trim" fz="m" fw="bold" hasTransition hov="in:cLink">Home Appliances</Text>
            <Flex ai="center" jc="center" bgc="black" bdrs="99" p="10">
              <Icon icon="arrow-right" fz="2xs" c="white" />
            </Flex>
          </BoxLink>
          <BoxLink
            href="#"
            layout="flex"
            g="30"
            ai="center"
            jc="between"
            p="30"
            bd
            bgc="white"
            bdrs="10"
            set="var:hov"
            hasTransition
            hov={{ bxsh: '20' }}
          >
            <Text class="u--trim" fz="m" fw="bold" hasTransition hov="in:cLink">Refrigerators</Text>
            <Flex ai="center" jc="center" bgc="black" bdrs="99" p="10">
              <Icon icon="arrow-right" fz="2xs" c="white" />
            </Flex>
          </BoxLink>
          <BoxLink
            href="#"
            layout="flex"
            g="30"
            ai="center"
            jc="between"
            p="30"
            bd
            bgc="white"
            bdrs="10"
            set="var:hov"
            hasTransition
            hov={{ bxsh: '20' }}
          >
            <Text class="u--trim" fz="m" fw="bold" hasTransition hov="in:cLink">Washers & Garment Care</Text>
            <Flex ai="center" jc="center" bgc="black" bdrs="99" p="10">
              <Icon icon="arrow-right" fz="2xs" c="white" />
            </Flex>
          </BoxLink>
          <BoxLink
            href="#"
            layout="flex"
            g="30"
            ai="center"
            jc="between"
            p="30"
            bd
            bgc="white"
            bdrs="10"
            set="var:hov"
            hasTransition
            hov={{ bxsh: '20' }}
          >
            <Text class="u--trim" fz="m" fw="bold" hasTransition hov="in:cLink">Beauty</Text>
            <Flex ai="center" jc="center" bgc="black" bdrs="99" p="10">
              <Icon icon="arrow-right" fz="2xs" c="white" />
            </Flex>
          </BoxLink>
          <BoxLink
            href="#"
            layout="flex"
            g="30"
            ai="center"
            jc="between"
            p="30"
            bd
            bgc="white"
            bdrs="10"
            set="var:hov"
            hasTransition
            hov={{ bxsh: '20' }}
          >
            <Text class="u--trim" fz="m" fw="bold" hasTransition hov="in:cLink">Lighting</Text>
            <Flex ai="center" jc="center" bgc="black" bdrs="99" p="10">
              <Icon icon="arrow-right" fz="2xs" c="white" />
            </Flex>
          </BoxLink>
          <BoxLink
            href="#"
            layout="flex"
            g="30"
            ai="center"
            jc="between"
            p="30"
            bd
            bgc="white"
            bdrs="10"
            set="var:hov"
            hasTransition
            hov={{ bxsh: '20' }}
          >
            <Text class="u--trim" fz="m" fw="bold" hasTransition hov="in:cLink">PCs & Peripherals</Text>
            <Flex ai="center" jc="center" bgc="black" bdrs="99" p="10">
              <Icon icon="arrow-right" fz="2xs" c="white" />
            </Flex>
          </BoxLink>
        </AutoColumns>
        <Flex jc="flex-end">
          <BoxLink href="#" layout="flex" ai="center" g="10" hasTransition hov={{ c: 'link' }}>
            <Text class="u--trim">View All Categories</Text>
            <Icon icon="arrow-right" />
          </BoxLink>
        </Flex>
      </Stack>
    </Stack>
  </Container>
</DemoLayout>

<style>
  @media (any-hover: hover) {
    .-hov\:in\:cLink {
      color: var(--_isHov, var(--link));
    }
  }
</style>
style.css