Chevron icons
Custom chevron glyphs (select caret, sortable table headers) matching the Figma strokes.
Glyphs
Select carets and sortable table headers.
function ChevronsDemo() {
return (
<div className="flex flex-wrap items-center gap-6 text-foreground-icon-secondary">
<ChevronDownSmall className="size-4" />
<ChevronRightSmall className="size-4" />
<ChevronUpDownSmall className="size-4" />
<ChevronSortDown className="size-4" />
</div>
);
}function ChevronsDemo() {
return (
<div className="flex flex-wrap items-center gap-6 text-foreground-icon-secondary">
<ChevronDownSmall className="size-4" />
<ChevronRightSmall className="size-4" />
<ChevronUpDownSmall className="size-4" />
<ChevronSortDown className="size-4" />
</div>
);
}Installation
npx shadcn@latest add https://boardcn.dev/r/chevrons.jsonnpx shadcn@latest add https://boardcn.dev/r/chevrons.jsonSource
The file the CLI copies into your project.
import type { SVGProps } from "react";
type IconProps = SVGProps<SVGSVGElement>;
/** 16×16 rounded 2px-stroke chevron. Select triggers, disclosure affordances. */
export function ChevronDownSmall(props: IconProps) {
return (
<svg viewBox="0 0 16 16" fill="none" aria-hidden {...props}>
<path
d="M4 7L7.29289 10.2929C7.68342 10.6834 8.31658 10.6834 8.70711 10.2929L12 7"
stroke="currentColor"
strokeWidth="2"
strokeLinecap="round"
/>
</svg>
);
}
/** 12×12 rounded 1.5px-stroke chevron. Breadcrumb separator. */
export function ChevronRightSmall(props: IconProps) {
return (
<svg viewBox="0 0 12 12" fill="none" aria-hidden {...props}>
<path
d="M4.5 3L7.14645 5.64645C7.34171 5.84171 7.34171 6.15829 7.14645 6.35355L4.5 9"
stroke="currentColor"
strokeWidth="1.5"
strokeLinecap="round"
/>
</svg>
);
}
/** 16×16 stacked up/down chevrons. Workspace / account switchers. */
export function ChevronUpDownSmall(props: IconProps) {
return (
<svg viewBox="0 0 16 16" fill="none" aria-hidden {...props}>
<g transform="translate(4.25 2.56)">
<path
d="M0.75 7.43934L3.21967 9.90901C3.51256 10.2019 3.98744 10.2019 4.28033 9.90901L6.75 7.43934"
stroke="currentColor"
strokeWidth="1.5"
strokeLinecap="round"
/>
<path
d="M0.75 3.43934L3.21967 0.96967C3.51256 0.676777 3.98744 0.676777 4.28033 0.96967L6.75 3.43934"
stroke="currentColor"
strokeWidth="1.5"
strokeLinecap="round"
/>
</g>
</svg>
);
}
/** 24×24 filled rounded triangle chevron. Table column sort indicator. */
export function ChevronSortDown(props: IconProps) {
return (
<svg viewBox="0 0 24 24" fill="none" aria-hidden {...props}>
<path
d="M12.7071 15.2929C12.3166 15.6834 11.6834 15.6834 11.2929 15.2929L7.70711 11.7071C7.07714 11.0771 7.52331 10 8.41421 10H15.5858C16.4767 10 16.9229 11.0771 16.2929 11.7071L12.7071 15.2929Z"
fill="currentColor"
/>
</svg>
);
}import type { SVGProps } from "react";
type IconProps = SVGProps<SVGSVGElement>;
/** 16×16 rounded 2px-stroke chevron. Select triggers, disclosure affordances. */
export function ChevronDownSmall(props: IconProps) {
return (
<svg viewBox="0 0 16 16" fill="none" aria-hidden {...props}>
<path
d="M4 7L7.29289 10.2929C7.68342 10.6834 8.31658 10.6834 8.70711 10.2929L12 7"
stroke="currentColor"
strokeWidth="2"
strokeLinecap="round"
/>
</svg>
);
}
/** 12×12 rounded 1.5px-stroke chevron. Breadcrumb separator. */
export function ChevronRightSmall(props: IconProps) {
return (
<svg viewBox="0 0 12 12" fill="none" aria-hidden {...props}>
<path
d="M4.5 3L7.14645 5.64645C7.34171 5.84171 7.34171 6.15829 7.14645 6.35355L4.5 9"
stroke="currentColor"
strokeWidth="1.5"
strokeLinecap="round"
/>
</svg>
);
}
/** 16×16 stacked up/down chevrons. Workspace / account switchers. */
export function ChevronUpDownSmall(props: IconProps) {
return (
<svg viewBox="0 0 16 16" fill="none" aria-hidden {...props}>
<g transform="translate(4.25 2.56)">
<path
d="M0.75 7.43934L3.21967 9.90901C3.51256 10.2019 3.98744 10.2019 4.28033 9.90901L6.75 7.43934"
stroke="currentColor"
strokeWidth="1.5"
strokeLinecap="round"
/>
<path
d="M0.75 3.43934L3.21967 0.96967C3.51256 0.676777 3.98744 0.676777 4.28033 0.96967L6.75 3.43934"
stroke="currentColor"
strokeWidth="1.5"
strokeLinecap="round"
/>
</g>
</svg>
);
}
/** 24×24 filled rounded triangle chevron. Table column sort indicator. */
export function ChevronSortDown(props: IconProps) {
return (
<svg viewBox="0 0 24 24" fill="none" aria-hidden {...props}>
<path
d="M12.7071 15.2929C12.3166 15.6834 11.6834 15.6834 11.2929 15.2929L7.70711 11.7071C7.07714 11.0771 7.52331 10 8.41421 10H15.5858C16.4767 10 16.9229 11.0771 16.2929 11.7071L12.7071 15.2929Z"
fill="currentColor"
/>
</svg>
);
}