Typography
indiacn/typographyFreeComponent
21 typography components: 6 Display, 6 Headline, 3 Title, 3 Label, 3 Body. Required by every other IndiaCN component.
Install it
npx shadcn@latest add https://indiacn.in/r/typography.jsonSource
1import { FC, HTMLAttributes } from 'react';23import { cn } from '@/lib/utils';45/**6 * Display1 Component - 80px display text for prominent titles and hero sections.7 *8 * @component9 * @example10 * ```tsx11 * <Display1>Large Hero Title</Display1>12 * <Display1 className="text-center">Centered Title</Display1>13 * ```14 *15 * @param props - Standard HTML heading attributes16 * @returns An h1 element with 80px font size and medium weight17 */18const Display1: FC<HTMLAttributes<HTMLHeadingElement>> = ({ children, className, ...props }) => {19 return (20 <h1 className={cn('text-[5rem] leading-25 font-medium', className)} {...props}>21 {children}22 </h1>23 );24};2526/**27 * Display2 Component - 72px display text for large headings.28 *29 * @component30 * @example31 * ```tsx32 * <Display2>Section Title</Display2>33 * ```34 *35 * @param props - Standard HTML heading attributes36 * @returns An h1 element with 72px font size and medium weight37 */38const Display2: FC<HTMLAttributes<HTMLHeadingElement>> = ({ children, className, ...props }) => {39 return (40 <h1 className={cn('text-[4.5rem] leading-25 font-medium', className)} {...props}>41 {children}42 </h1>43 );44};4546/**47 * Display3 Component - 64px display text for medium-large headings.48 *49 * @component50 * @example51 * ```tsx52 * <Display3>Page Title</Display3>53 * ```54 *55 * @param props - Standard HTML heading attributes56 * @returns An h1 element with 64px font size and medium weight57 */58const Display3: FC<HTMLAttributes<HTMLHeadingElement>> = ({ children, className, ...props }) => {59 return (60 <h1 className={cn('text-[4rem] leading-20 font-medium', className)} {...props}>61 {children}62 </h1>63 );64};6566/**67 * Display4 Component - 56px display text for prominent headings.68 *69 * @component70 * @example71 * ```tsx72 * <Display4>Feature Title</Display4>73 * ```74 *75 * @param props - Standard HTML heading attributes76 * @returns An h1 element with 56px font size and medium weight77 */78const Display4: FC<HTMLAttributes<HTMLHeadingElement>> = ({ children, className, ...props }) => {79 return (80 <h1 className={cn('text-[3.5rem] leading-18 font-medium', className)} {...props}>81 {children}82 </h1>83 );84};8586/**87 * Display5 Component - 48px display text for section headings.88 *89 * @component90 * @example91 * ```tsx92 * <Display5>Content Section</Display5>93 * ```94 *95 * @param props - Standard HTML heading attributes96 * @returns An h1 element with 48px font size and medium weight97 */98// … truncated
What it pulls in
Other registry items
Files it writes
More from indiacn
All 26 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Accordionaccordion | indiacn | Components | Free | 2 deps | |
| Alertalert | indiacn | Components | Free | 2 deps | |
| Badgebadge | indiacn | Components | Free | 1 dep | |
| Breadcrumbbreadcrumb | indiacn | Components | Free | 1 dep | |
| Buttonbutton | indiacn | Components | Free | 3 deps | |
| Button Groupbutton-group | indiacn | Components | Free | no deps | |
| Cardcard | indiacn | Components | Free | 1 dep | |
| Chipchip | indiacn | Components | Free | 2 deps |
