Overview
The TituloDetalle component is a simple but visually striking h1 heading component used to display project titles on detail pages. It features custom styling with a glowing text shadow effect.Props
The title text or content to display
Usage
Used at the top of project detail pages to display the project name:src/pages/ProyectoDetalle.jsx
Component Structure
src/components/TituloDetalle.jsx
Styling Details
Typography
| Property | Value | Purpose |
|---|---|---|
| fontSize | 2.5rem (40px) | Large, prominent heading |
| fontWeight | bold | Strong visual hierarchy |
| textAlign | center | Centered on page |
Colors
- Text color: #15F5BA (cyan accent from brand palette)
- Text shadow: Glowing effect with 20px blur and 50% opacity
Spacing
- marginBottom: 20px provides separation from content below
Visual Effects
Glow Effect
The text shadow creates a soft glow around the text:- 0 0: No horizontal or vertical offset (glow is centered)
- 20px: Blur radius (how far the glow extends)
- rgba(21,245,186,0.5): Cyan color at 50% opacity
Customization Examples
Stronger Glow
Multiple Shadows
Different Color
Larger Size
Left-Aligned
Responsive Design
For smaller screens, consider adjusting the font size:clamp() function ensures:
- Minimum: 1.75rem (28px) on small screens
- Preferred: 5vw (scales with viewport)
- Maximum: 2.5rem (40px) on large screens
Accessibility
Using a semantic
<h1> tag is important for screen readers and SEO. This properly identifies the main heading of the page.Browser Compatibility
Thetext-shadow property is supported in all modern browsers:
- Chrome ✓
- Firefox ✓
- Safari ✓
- Edge ✓
- Opera ✓
Performance
Text shadows have minimal performance impact. The glow effect is rendered efficiently by the browser’s text rendering engine.Usage in Context
Typical page structure:Related Components
DescripcionDetalle
Description component paired with title
TarjetasContenido
Content card for project information