Files
lucide/docs/icons/[name].md
ba6751ac45 feat(site): Better icon detail page and add unreleased flag (#4877)
* setup icon popularity call

* Adjust sort button

* Adjust sorting

* Adds aliases

* Format code

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Add check for env variable

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Improve styling on mobile

* Better icon detail page

* Update detail page

* feat: make edit button more visible

* Fix types

* Add unreleased version tag

* Adjust icon detail

* Added edit button

* format code

* Replace pencil sparkles

* Revert changes

* Fix types

* Add docs checks

* Fix types

* Fix awaiting release

* revert icons changes

* Format code

* Fix type issues

* Update CarbonAdOverlay to not display

Disable CarbonAdOverlay by setting drawerOpen to false.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Fix types

* Fix condition for showing awaiting release icons

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Format code

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Jakob Guddas <github@jguddas.de>
2026-09-18 14:22:47 +02:00

5.6 KiB

layout, footer, aside, editLink, next, prev, sidebar
layout footer aside editLink next prev sidebar
doc false false false false false true
<script setup> import { computed } from 'vue' import { useData } from 'vitepress' import IconPreview from '~/.vitepress/theme/components/icons/IconPreview.vue' import IconPreviewSmall from '~/.vitepress/theme/components/icons/IconPreviewSmall.vue' import EditInStudioButton from '~/.vitepress/theme/components/icons/EditInStudioButton.vue' import IconInfo from '~/.vitepress/theme/components/icons/IconInfo.vue' import IconContributors from '~/.vitepress/theme/components/icons/IconContributors.vue' import IconShowcase from '~/.vitepress/theme/components/icons/IconShowcase.vue' import RelatedIcons from '~/.vitepress/theme/components/icons/RelatedIcons.vue' import CodeGroup from '~/.vitepress/theme/components/base/CodeGroup.vue' import Badge from '~/.vitepress/theme/components/base/Badge.vue' import Label from '~/.vitepress/theme/components/base/Label.vue' import PageTabs from '~/.vitepress/theme/components/base/PageTabs.vue' import { data } from './codeExamples.data' import { toCamelCase, toPascalCase } from '@lucide/shared' import { satisfies } from 'semver' import CarbonAdOverlay from '~/.vitepress/theme/components/icons/CarbonAdOverlay.vue'; const { params } = useData() const tabs = computed(() => data.codeExamples?.map( (codeExample) => codeExample.title) ?? [] ) const codeExample = computed(() => data.codeExamples?.map( (codeExample) => { const pascalCaseName = toPascalCase( params.value.name) const camelCaseName = toCamelCase(params.value.name) return codeExample.code .replace(/\$(?:<[^>]+>)*PascalCase/g, pascalCaseName) .replace(/\$CamelCase/g, camelCaseName) .replace(/\$Name/g, params.value.name) } ).join('') ?? [] ) function releaseTagLink(version) { const shouldAddV = satisfies(version, `<0.266.0`) return `https://github.com/lucide-icons/lucide/releases/tag/${shouldAddV ? 'v' : ''}${version}` } </script>
Created: Unreleased
Created: {{params.createdRelease.version}}
Last changed: {{params.changedRelease.version}}

<PageTabs :tabs="['More like this', 'Code examples', 'See in action']"

<template #tab-0>

<template #tab-1>

<template #tab-2>

<style scoped> .preview { grid-area: preview; margin-bottom: 24px; max-width: 240px; width: 240px; flex-shrink: 0; } .layout { align-items: flex-start; } .actions { text-align: right; display: flex; justify-content: flex-end; margin: -12px -12px 24px 0; } .meta { display: flex; gap: 24px; align-items: flex-start; } .info { --tags-gradient-background: var(--vp-c-bg); } .icon-info { text-align: center; } .version .label { margin-top: 12px; } .badge { margin: 12px 0; } .version, .contributors { display: flex; flex-wrap: wrap; align-items: flex-start; margin-bottom: 0px; justify-content: flex-start; gap: 4px; } .version .awaiting-release { color: var(--vp-c-danger-3); } .iconPreviews { display: flex; justify-content: center; gap: 24px; } .smallPreview { flex-shrink: 2; flex-direction: column; align-items: flex-start; } @media (min-width: 640px) { .layout { align-items: flex-start; display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 24px; } .preview { margin: 0 auto; } .iconPreviews { flex-direction: column; justify-content: flex-start; } .actions { position: absolute; right: 0; margin: 0; } .smallPreview { flex-direction: row; align-items: center; } } </style> <style> .icon-page-sections h2.title { text-align: center; font-weight: 500; margin-block-end: 64px; padding-top: 32px; } .tab-list { margin: 24px -24px 24px; } @media (min-width: 640px) { .tab-list { margin: 24px 0 24px; } .iconPreviews { justify-content: flex-start; } } </style>