Tipografíatypographyeditorialparagraph
Drop Cap Paragraph
Párrafo editorial clásico con letra capitular inicial grande y estilizada.
Vista Previa en Vivo
Drop Cap Paragraph
Uso
Copia y pega este código directamente en tu componente React:
tsx
import { DropCapParagraph } from 'react-component-kit-ui/typography';
<DropCapParagraph>Content</DropCapParagraph>Instalación Manual
Si no estás usando el paquete npm, crea un archivo nuevo y pega el siguiente código: src/components/DropCapParagraph.tsx + DropCapParagraph.css:
DropCapParagraph.tsx
'use client';
import type { ReactNode } from 'react';
import './DropCapParagraph.css';
/** DropCapParagraph — ported from astro-component-kit. */
export interface DropCapParagraphProps {
children?: ReactNode;
}
export function DropCapParagraph({ children }: DropCapParagraphProps) {
return (
<>
<p className="drop-p" data-rk-1c2ef5="">{children}</p>
</>
);
}
export default DropCapParagraph;DropCapParagraph.css
/* DropCapParagraph — ported from astro-component-kit (typography/DropCapParagraph.astro) */
.drop-p:where([data-rk-1c2ef5]) { color: #94a3b8; line-height: 1.8; font-size: 1.1rem; }
.drop-p:where([data-rk-1c2ef5])::first-letter { float: left; font-size: 4rem; font-weight: 900; line-height: 0.8; margin-right: 0.5rem; margin-top: 0.5rem; color: #fff; background: linear-gradient(135deg, #6366f1, #c084fc); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }Información Rápida
- Categoría
- Tipografía
- Nombre de archivo
DropCapParagraph.tsx- Dependencias
- Ninguna — React + CSS puro
- Etiquetas
- typographyeditorialparagraph