HomeDocsComponentsBlocksChartsThemes
Introduction
  • Introduction
  • Installation
  • Themes
  • Artwork
  • llms.txt
Components
  • Accordion
  • Alert
  • Alert Dialog
  • Amount
  • Aspect Ratio
  • Audio Player
  • Avatar
  • Avatar Upload
  • Badge
  • Banner
  • Brand SVG
  • Breadcrumb
  • Button
  • Button Group
  • Calendar
  • Card
  • Carousel
  • Chart
  • Checkbox
  • Code Block
  • Collapsible
  • Color Picker
  • Combobox
  • Command
  • Context Menu
  • Copy Button
  • Countdown
  • Data Grid
  • Data Table
  • Date Picker
  • Date Range Picker
  • Description List
  • Device Mockup
  • Dialog
  • Direction
  • Dot Loader
  • Drawer
  • Dropdown Menu
  • Empty
  • Field
  • File Upload
  • Form Guide
  • Hover Card
  • Icon Tile
  • Image Export
  • Input
  • Input Group
  • Input OTP
  • Item
  • Kanban
  • Kbd
  • Label
  • League Table
  • Marquee
  • Match Score
  • Menubar
  • Meter
  • Multi Select
  • Native Select
  • Navigation Menu
  • Number Field
  • Pagination
  • Password Strength
  • Phone Input
  • Popover
  • Progress
  • Progress Circle
  • Radio Group
  • Rating
  • Resizable
  • Responsive Dialog
  • Rich Text Editor
  • Scroll Area
  • Segmented Control
  • Select
  • Separator
  • Sheet
  • Sidebar
  • Signature
  • Skeleton
  • Slider
  • Sortable
  • Spinner
  • Stat
  • Stat Tabs
  • Stepper
  • Switch
  • Table
  • Tabs
  • Tag Input
  • Terminal
  • Textarea
  • Time Field
  • Timeline
  • Toast
  • Toggle
  • Toggle Group
  • Tooltip
  • Tree
  • Typography
  • Video Player
  • Window Mockup
AI
  • Message Scroller
  • Message
  • Bubble
  • Marker
  • Attachment
  • Questionnaire
  • Composer
  • Reasoning
  • Tool Call
  • Approval Card
  • Citations
Blocks
  • Airtable
  • Airtable Kanban
  • ClickUp List
  • ClickUp Kanban
  • Repeatable Group
  • Command Palette
  • Sign In and Sign Up
  • Availability Scheduler
  • AI Chat
  • Action Bar
  • Notion
  • Banking
  • Lineup Builder
  • Sports Score
  • Standings
  • Strava
  • Sheets
  • Notices
  • Settings
  • Billing
Templates
  • Sign In Page
  • Upload Page
  • Agreement Sign
  • Email
  • Email Composer
  • Share Dialog
  • Integrations
  • Transactions
  • Analytics
Utilities
  • motion
  • sounds
  • scroll-fade
  • shimmer
Another UI. Built on shadcn/ui with Phosphor icons.

Brand SVG

PreviousNext

Render trusted SVG marks with separate gradient, mask and clip IDs for every instance.

Base UIReact AriaRadix UI

Installation#

pnpm dlx shadcn@latest add https://anotherui.dev/r/brand-svg.json

Usage#

import logo from "thesvg/lovable"
import { BrandSvg } from "@/components/ui/brand-svg"
 
export function Logo() {
  return <BrandSvg svg={logo.svg} label="Lovable" />
}

Pass trusted markup from a build-time package. This component does not sanitize SVG or HTML. Never pass user input, database markup or fetched SVG strings. It keeps the supplied colours and dimensions. Choose the package's mono or dark variant before passing the SVG.

Every instance prefixes IDs and local url(#id), href, xlink:href, aria-labelledby and aria-describedby references. Repeated marks keep their own gradients and masks. External URLs and colour values stay unchanged. Style elements are rejected because CSS ID selectors cannot be safely rewritten with this attribute-based parser. Use SVG presentation attributes. SMIL animation references are outside this contract.

Omit label for decorative marks beside a visible name. A labelled wrapper gets an image role. The inner SVG is always hidden from assistive technology and cannot receive focus. className and style apply to the wrapper. The component has no Tailwind or Another UI stylesheet dependency, so it can also be installed into existing apps on an older Tailwind version. Separate React roots should set distinct identifierPrefix values when creating or hydrating their roots.

SVG title elements stay intact and may show the package's native hover tooltip, even when the wrapper has a label. ARIA references are retained and namespaced to preserve valid source relationships, although the inner SVG is hidden from assistive technology.

Sizing the wrapper does not resize package SVG dimensions. Use a child selector such as className="inline-flex size-6 [&>svg]:size-full", or pass a prepared SVG with the dimensions you need.

Style elements throw a descriptive render error. Validate a package upgrade against the fixture test before shipping and wrap BrandSvg in your app's error boundary if package markup can change independently of your release. SMIL references and xml:id are unsupported. This is a trusted icon renderer, not a general XML processor.

The fixture in tests/fixtures/brand-svg.json records the 24 selected SVG variants from thesvg 3.3.12. Refresh it and run pnpm --filter=v4 test:brand-svg when changing the supplied icon package or variants.

BannerBreadcrumb

On This Page

InstallationUsage